To track visitors, Matomo (Piwik) by default uses 1st party cookies, set on the domain of your website. Cookies created by Matomo start with: _pk_ref, _pk_cvar, _pk_id, _pk_ses. When you use the Heatmap & Session Recording plugin, a cookie _pk_hsr will be created.

When you exclude yourself from being tracked using the cookie method or using the iframe opt-out method, Matomo will create a cookie piwik_ignore set on the domain of your Matomo server. Your server might be a third party cookie if Matomo is setup on a different URL from the website being tracked. (Please note that the piwik_ignore or matomo_ignore cookie does not contain personal information or any ID and the cookie value is the same for all visitors.)

You can also Disable all first party cookies from being set — for example for privacy reasons.

Matomo by default does not use third party cookies but you can enable a third party _pk_uid cookie it if you wish.

Learn more about What data does Matomo track?.

Default expiration times

The cookies described above will eventually expire and be removed from your users’ browsers. The default expiration times are listed below:

  • _pk_id – 13 months
  • _pk_ref – 6 months
  • _pk_ses, _pk_cvar, _pk_hsr – 30 minutes

These defaults can be modified via JavaScript. Learn more about setting custom expiration times.