Is there some documentation of what the cookies should look like after using the method. The documentation on anonymous tracking says:
" From now on all following requests sent by trackPageView or any other function that sends requests to Collecting & Processing Pipeline, will be marked as a request that should be anonymized. Learn more how Piwik PRO anonymizes visitors data."
a) How can this be verified? Is there a particular parameters in the PiwikPro tracking request that tell me this mode is switched on? Is there a JS method I can call to the tracker object to get the info that this anonymization mode is switched on?
Update: I compared 2 Pageview requests, one with the anonymous setting, one without:
The only setting is the uia = 1 (probably “user is anonymous”) parameter. Everything else looks the same. And again, Visitor Cookie exists and lives for a year.
In this scenario, Piwik PRO deploys a session identifier as a cookie that collects session data but no personal data. After 30 minutes, which is the duration of a session, Piwik PRO removes the identifier from the web browser.
The major advantage of this approach is that it gives you more trustworthy data than any other anonymous data tracking method."
=> I thought this is what the setUserIsAnonymous method does, but it does not apparently…
The visitor cookies is our source of truth when it comes to the analytics session recognition. The _pk_ses.* cookie is just an addition used to calculate some of the engagement reports (I explained it in the other thread).
The call: _paq.push(["setUserIsAnonymous", true]); translates directly to the tracker HTTP api param uia=1. It drops the IP address and limits the geolocation to country level. In the future, we plan to add more control, to be able to disable Session ID via tracker param. For now it can be disabled only globally via Site&app settings. While double checking that I noticed that docs are inconsistent in some cases. We plan to fix that asap.
We always rely on the visitor cookie. Our anonymous tracking mode that relies on cookies, limits its lifetime to 30 mins. The whole process of setting it up is much easier when our Tag Manager is used. Nevertheless, having all that context, you should be able to set it up.
Side note: we never set the cookie expiration to “session”.
Thanks a lot, that link to the HTTP API in both the other documentations or the blog post would have saved me hours…
Lifetime 30 min
=> I may misremember, but I could not verify that. Visitor Cookie expiration is unaffected by Anonymous mode.
Also the HTTP API docs say:
" > “All IP bytes will be masked (0.0.0.0), no GeoIP data will be stored and visits won’t be matched by the fingerprinting process.”"
=> Session fingerprint seems to be unaffected by anonymous mode. I got recognized as the same user in Anonymous mode after deleting my cookies = Session fingerprint is active.
Also to conclude, it seems impossible to just have one cookie. The _pk._ses Cookie is always there. My expectation was that I could have “just” a session (30-minute) cookie and nothing else.
That would affect the engagement reports mentioned before (anything that relies on the session count taken from the visitor cookie). Other than that, all the crucial reporting and session recognition should work just fine.
So “engagement” refers to only Session Count-based Reports (new vs returning, session number, but not things like “time since last session”?) So not all of the reports under “Engagement”, only those referring to Session Count (because the user will always be in his first session (?)):
Session count, session count before conversion. New vs. returning should work even without the pk_ses cookie. From what I remember it’s based on sole existence of pk_id cookie. If for some reason new vs. returning stops working after removing this cookie, please let me know.