What is the _pk_id cookie?
_pk_id is a first-party cookie set directly by the Matomo instance the site owner runs — either self-hosted or via Matomo Cloud. It is not a third-party advertising cookie; it belongs to the analytics tool the website operator has installed.
It typically appears as soon as a visitor loads a page containing the Matomo tracking script (matomo.js or piwik.js), if that script runs without restriction.
What data it stores
The full cookie name includes the tracked site ID and a hash generated by Matomo, for example _pk_id.1.abcd. The value usually holds a pseudonymous unique visitor identifier along with timestamps of the first and last visit and a visit count.
The data stays in the visitor's browser and is sent to the Matomo server used by the site (self-hosted or third-party-hosted), not to external ad networks.
What it is used for
Its main purpose is recognizing returning visitors, to calculate unique visitor counts, visit frequency, and browsing paths (pages viewed, traffic source, behavior across multiple sessions).
For the site owner, this data supports understanding traffic patterns and improving content, without relying on third-party analytics services such as Google.
Does it require consent?
CookieFix classifies _pk_id under the statistics category. Even though Matomo is often configured with IP anonymization or other privacy-friendly settings, the visitor-identification cookie still stores information on the user's device, so it falls under Romania's Law 506/2004 (implementing the ePrivacy Directive) and requires the visitor's prior consent under GDPR.
- The site owner must list the cookie in the cookie policy, with its actual expiration period.
- The cookie must not be set before the visitor has given consent for the statistics category.
- If Matomo is configured for cookieless, fully anonymized tracking, this cookie does not apply.
How to block or delete _pk_id
Visitors can delete or block this cookie from their browser settings (Chrome, Firefox, Edge, Safari), in the per-site cookie management section, or by using private/incognito browsing.
On the site side, the administrator must ensure the Matomo script does not run before consent is given. A consent management platform like CookieFix can automatically block the Matomo script from executing until the visitor accepts the statistics category, preventing the _pk_id cookie from being set prematurely.
Frequently asked questions
It doesn't contain sensitive data, but it uniquely identifies a visitor over a long period, which is why it's treated as indirect personal data and requires consent.
The default lifespan is about 13 months, though the administrator of the Matomo installation can configure it differently.
No. _pk_id belongs to Matomo, a separate analytics platform often chosen for greater data control and anonymization options.
Yes, the cookie is strictly for statistics and does not affect the site's core functionality if it's blocked or declined.