-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Multiple issues with VisitorID when combining PHP and Javascript code #20864
Comments
This issue has been mentioned on Matomo forums. There might be relevant details there: |
Here's some additional info. Debug log below (php file was accessed with ?version=phpv1wITHlogs&Remarks=Testing%20dotrackevent%20in%20JS ) On the code that was executed via javascript, on dashboard, ID shows up as bef395150694378e . In PHP it had been set to 5dff9aeceb2eade1 On the code that was executed via PHP, on dashboard, ID shows up as 91d5dc88d771372c . In PHP it had been set to 5dff9aeceb2eade1 Also, the PHP code (for the log below) had 4 "doTrackEvent" which were captured and show up properly on the dashboard p.s. In the log below, I have removed the actual domains and actual IP address
|
Hi @itscvenk, thanks for raising this issue. I'm not familiar with the problems of running both the JavaScript and PHP tracker together, I don't think it's a common approach. You could try enabling the trust_visitor_cookies setting
which might prevent the JavaScript tracker using a new visitor ID and removing the existing cookie. |
Hi @itscvenk, could you let us know if the suggestion above re. the trust visitor cookies setting helped? If you think this is still an issue, can you please provide clear replication steps? If there's no further activity on the issue we will close it in a few weeks. |
I switched to http api to have full control. I don't have time to test above issue, sorry. So closing this for now |
See the behavior described at
https://forum.matomo.org/t/multiple-issues-with-visitorid-when-combining-php-and-javascript-code/51677
The cookie is set by the PHP code that runs and does some stuff
Then the javascript code by the browser just deletes the cookies!
Is this normal behaviour?
Tip: there is other PHP code, that's not present in the post above, which sends cookies that are HttpOnly (unlike the one set by pwik). Not sure if this is an issue because one can set various cookies with HttpOnly on and off
The text was updated successfully, but these errors were encountered: