Skip to content

Commit

Permalink
Fixed some Piwik/Matomo cookie regex (see #1532)
Browse files Browse the repository at this point in the history
Description
-----------

According to the manual mentioned above these lines, the cookies **start with** the mentioned names, and that's exactly what I've discovered on a @Pellinger's website.

> 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.

Commits
-------

c2d59f1a Fixed Piwik/Matomo cookie regex
  • Loading branch information
aschempp authored Mar 12, 2020
1 parent 156e967 commit c5937fb
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/EventListener/HttpCache/StripCookiesSubscriber.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,11 @@ class StripCookiesSubscriber implements EventSubscriberInterface
'_gac_.+',

// Matomo (https://matomo.org/faq/general/faq_146/)
'_pk_id',
'_pk_ref',
'_pk_ses',
'_pk_cvar',
'_pk_hsr',
'_pk_id.*',
'_pk_ref.*',
'_pk_ses.*',
'_pk_cvar.*',
'_pk_hsr.*',

// Cloudflare
'__cfduid',
Expand Down

0 comments on commit c5937fb

Please sign in to comment.