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, Matomo (Piwik) will create a cookie piwik_ignore set on the domain of your Matomo server (which might be a third party cookie if Matomo is setup on a different URL from the website being tracked).

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

Matomo (Piwik) 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 (Piwik) 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.