I would like to have multiple domains with different tracking code that can track an individual user across domains. (Also–not sure if this is relevant–I want to have the tracking IDs connected to separate user accounts.)
So let’s say that User A visits domain1.com and then goes to domain2.net. How do I track that one user across these two domains? I think it might have something to do with segmentation??
I have an online service that someone logs into (let’s say it’s at domain1.com), how do I associate the user’s username with the tracking–and then, how do I associate that username with tracking accross domain1.com and domain2.net? (I.e. User A logs in to domain1.com, then later goes to domain2.net–how do I identify them, so that I can report on metrics related to logged-in users visiting my different domains?)
(And I am a programmer, I am not afraid to dig into the API, create some cookies, etc.–I don’t necessarily need an out-of-the-box solution, just for someone to point me in the right direction.)
OK, so, I enabled the _pk_uid cookie (via use_third_party_id_cookie = 1) – how do I extract the visitor information from the cookie?
The FAQ says: When this is enabled, Piwik tracker will serve a third party cookie containing an id visitor (16 chars ID). This ID will be the same for this visitor across all websites, and is stored in the database field “idvisitor”.
Here is the value of the cookie:
0%3DczoxNjoiMmMwMWY5OGU0MzFkNWQxOSI7%3A_%3Df6f84dfd6626b538220696bb070d22f8ae2af6ee
The idvisitor is 2c01f98e431d5d19 (in hex, or 3171090002052209945 in decimal), but I can’t seem to find this string within the cookie.
How is idvisitor encoded in the cookie?
Thank you!
EDIT: So, actually, I think idvisitor is stored in a cookie called _pk_id.1.4cee ?? I’m pretty confused. What is _pk_uid for then? How does idvisitor relate to the cookies? Any advice or guidance is greatly appreciated.