Retrieve Visitor ID for GDPR Requests

Hi,

how can users of my website find out their visitor IDs in order to make GDPR requests. I know how to use matomo GDPR tool to fulfill GDPR requests but I do not know how users can find out their visitor ids that I need to look for.

Does this make sense? Can anybody tell me how this process would look like?

Thanks

Hi,

a value is stored in the cookie which starts with _pk_id. There the first value before the dot is the ID of the user.

LG

1 Like

Hi,

You can also use the getVisitorId() function:

 _paq.push([ function() { visitor_id = this.getVisitorId(); }]);
// or
let tracker=Piwik.getAsyncTracker()
let visitor_id=tracker.getVisitorId()
1 Like

HI TomCz,

sorry, I should have mentioned that I am using the no cookie settings. But thank you for your quick reply and your suggestion.

Best

Hi Lukas, thank you for your reply. Could you explain where my users have to enter this function to get their visitor_id?

Thanks

My idea was that your visitors could e.g. paste _paq.push([ function() { console.log(this.getVisitorId()); }]); into their JS console to get the visitor id.

grafik

Or you could use this as a basis for e.g. a button on your website, but keep in mind that the inner function is called asynchronously once Matomo has finished loading.