New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
getVisitorInfo() returning a previous ID #14381
Comments
The visitorId in the client doesn't always match the visitorId in the backend. Eg after deleting cookies and in some other cases. |
TL;DRI'm a colleague of the OP and want to offer some feedback, suggestions for improvement, and also details of a workaround because I've seen a few threads around various forums on this topic and nothing conclusive ever seems to be presented... so, here's everything we've learned so far on this since posting our original issue above:
Feature request?
A workaround for obtaining an accurate visitor_idFYI, for those who may stumble on this issue (not being able to reliably get the accurate visitor_id), in our particular use-case we got around this by using
Added tidbit for how to get
|
Thanks for the input. I was gonna keep the issue open with the enhancement label but realise it's better to close the issue as we very likely won't be working on it and there are already ways to achieve this right now as you mention using userId or custom dimensions. For example quite certain we won't ever return the The visitorId can be frustrating if it doesn't match for sure. By default it should match, but as the visitorId is created client side, it can't be 100% correct if you clear your cookies and you have meanwhile a different visitorId client side. A workaround (and the correct way of doing this) is for sure to use userId and manage the ids yourself. Or you use custom dimensions and segment the LiveAPI for example based on the custom dimension. If you are familiar with PHP, there are ways though in general to achieve this through a custom plugin I suppose. |
Thanks for the reply @tsteur — hopefully this conversation will help others in future. Appreciate the reply. |
Hello.
I am trying to get the current visitor ID of a piwik tracking session by using getVisitorInfo(), however it seems to be returning a previous ID. This is the code I am using.
`
var _paq = _paq || [];
`
From piwik's end of things this all works well, it shows up in the piwik dashboard with all the right data etc. However the visitor ID i see in the piwik backend is different from the ID returned by getVisitorId(). This used to work before I believe, perhaps broken by an update?
Any suggestions for how to proceed?
The text was updated successfully, but these errors were encountered: