-
-
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
Tracking Parameter 'cid' Custom Visitor ID, should be "enforced" when it is specified #3776
Comments
Attachment: Tracking Debug Output |
Attachment: Visitor Log: Only one visit (instead of several), wrong visitor id |
Using Piwik 1.10.1 . API key is admin user of idsite(2). |
Oh, sorry: auth_token should be token_auth, of course. Attached a new version of the output, as the problem remains:
In case of a forced (vs. indicated via _id) visitorId it should only match by visitorId. |
Attachment: 2nd test output |
I've sent a pull request on github: #35 - which fixed the issue for me. |
Thanks for the report, very nice find. I agree with your proposal, that when a user has called $tracker->setVisitorId( ) and has authenticated with token_auth, then the visitor ID should be enforced. |
In 12c3fbe: Fixes #3776, Fixes #3787 Adding integration test to test this code. I also updated tracking api reference to explain "cid" parameter. cid (requires token_auth to be set) defines the visitor ID for this request. You must set this value to exactly a 16 character hexadecimal string (containing only characters 01234567890abcdefABCDEF). When specified, the Visitor ID will be enforced. This means that if there is no recent visit with this visitor ID, a new one will be created. If a visit is found in the last 30 minutes with your specified Visitor Id, then the new action will be recorded to this existing visit. |
Tracking API updated |
see also #6109 |
This issue appears to still persist / exist again. What I did:
The same happens when you do what's mentioned above over and over, so I seemingly cannot enforce the visitorId using the PHP Package's Of course it is essential for a proper use of the user ID that the system allows to enforce the visitor ID via request from the server to the API, with the received visitor ID from the client-side cookie, such that the entire history of page views / whatever can be reconstructed. |
This issue has been mentioned on Matomo forums. There might be relevant details there: https://forum.matomo.org/t/cid-not-being-enforced-although-sent/54953/1 |
@fulstadev As this issue is closed, but your feedback is valued, could you please re-create a new issue with your information? |
In order to set a custom visitor Id, the parameter cid is used in PiwikTracker.php (see [https://github.com/piwik/piwik/blob/ce63a9fbc4727df77a351fc55a641693d10a4f5c/libs/PiwikTracker/PiwikTracker.php#L1047]). However, it cannot be used to distinguish Visitors as distinct.
Steps to reproduce:
(Complete output attached)
Also,
cid
is not documented in the FAQ [http://piwik.org/docs/tracking-api/reference/].May be related: #3312
The text was updated successfully, but these errors were encountered: