Track Client ID & Session ID?

Hey there!

I want to have the Client ID & Session ID as a custom dimension for our analysis. I know there are these two Cookies: “_pk_id” & “_pk_ses”. So it worked that i read out the Value of the “_pk_id” cookie. But for the “_pk_ses” cookie its always a “*”, so probably this isn’t working this way.
Does someone has a best Practise for this? And is this even privacy-friendly?

Thank you in advance
Lasse Offt

What do you mean by Session ID here? _pk_id stores personal data (cookie id), so it’s fine to store it only when there’s valid consent. Not sure though why you want it to be stored as a custom dimension when it’s available as a built-in one (Visitor ID).

Yes true that would be obsolete, with the _pk_id Cookie. With the Session ID, i mean the ID wich is assigned to every Session by a User. We want to have this information in a dimension to segment this by the Sessions in the analysis.

Is there a reason why you wouldn’t use the built-in User ID functionality? See Set up a user ID | Piwik PRO help center

Under GDPR you may only track PII when the visitor gave consent.