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
The returned Visitor ID from the javascript tracker differs from what is saved in the db. #18941
Comments
@jonathonbyrdziak Are you maybe using the javascript tracking with cookies disabled? |
I believe that I am using cookies.
|
Yea, I'm definitely using cookies. This is the same ID that the Matomo.tracker is returning But this visitor ID is not to be found anywhere. No matter how much searching around in the tracker I do, I definitely get the same visitorid In the dashboard visitor log I've found my visit and it contains a much different visitor id |
Investigating the problem further and I've found that the js tracker is sending the appropriate visitor to matomo.php
|
here's the debug report for the tracker.
I checked the cookie for the website and it has 08c6f42bd5728f2b set against the website's domain/cookie. The matomo domain cookie has a different value, which is from the response to matomo.php. I'm noticing in this debug report that while the cookie seems to get updated, no value is specified. don't know what that means... |
I used the querystring to disable the queued tracking that I had turned on, &queuedtracking=0. Upon producing the following debug report, I noticed that it clearly states the idvisitor as being correct and stored in the db. So I check the db and was able to successfully find my visit. I'm going to disable queued tracking site wide and retest to see if that solves my problem. Here's the debug report.
|
I disabled queues tracking and my problem went away. I’ll have to dig into queued tracking at a later date to provide more details |
The cause is that you have enabled To fix this I have extended the matomo Javascript with a getGlobalVisitorId() function that reads the third party cookie in my setup. But this only works when Matomo is on the same domain (or on a subdomain). A better solution would maybe be a new api in Matomo php. I can create a pull request, but I need to know what the matomo team wants to do. |
I understand that the data FORMAT is different, that's not my issue.
I'm using console.log as follows:
which produces the following value:
Yet, in my database the following visitorId is being stored for the same visit.
These two values are making it impossible for me to enhance Matomo with my own plugin data.
Expected Behavior
I would expect that the system would give me the same visitor id in the javascript tracker as would be saved in the db.
Current Behavior
Possible Solution
Steps to Reproduce (for Bugs)
Context
Your Environment
The text was updated successfully, but these errors were encountered: