First Party and Third Party cookies Id


#1

Hello,
Piwik version : 2.6.1
I need to understand how piwik stores the visitor Id in the databases.
I activated the Third party cookies in the conf file.
I have different domains :
tracker : hosting piwik
site1 and site 2

For tracker piwik created pk_uid cookies with content : 0%3DczoxNjoiMDllNWU2MzI1MjEzMTRkNCI7%3A%3D6b4e20f437ae971ebcf0b66085ba3913bb3dc675 (How could I decode it ?)

For site1, there is a cookie _pk_id.2.fc7f with content 09e5e632521314d4.1410335782.1.1410336047.1410335782.
For site2 there is a cookie _pk_id.15.1939 with content 3e378f04a265f2b3.1410335831.1.1410336077.1410335831.

When i look at the database, the stored Ids per site are those of the _pk_id.2.fc7f or _pk_id.15.1939 and not the third-party-cookie.

So when i do getVisitorId from site1 or site2 i dont have the third-party-cookie ID !

Which Id is really stored in the DB, How piwik compute the link between the Ids ?

What i need is to get with getvisitorId or whatever the ID cross domains.

Could you please explain to me how it works and suggest solutions.

Thank you in advance for your help.


(Matthieu Aubry) #2

What i need is to get with getvisitorId or whatever the ID cross domains.

We also want to implement this feature in Piwik so maybe we can collaborate ? see the issue: piwik.js: Cross domain tracking · Issue #2211 · matomo-org/piwik · GitHub

Regarding how visitor id is stored, see the source code in js/piwik.js for best up to date reference.