disableCookies does not work

Hello,

I tried to stop piwik from setting cookies.
I followed this instruction: How do I disable all cookies for a visitor? - Analytics Platform - Matomo
But still some cookies are set: _pk_cvar, _pk_id, _pk_ref and _pk_ses

I do use Piwik 2.10.0

This is my trackingcode:


<!-- Piwik -->
<script type="text/javascript">
  var _paq = _paq || [];
  _paq.push(['disableCookies']);
  _paq.push(['trackPageView']);
  _paq.push(['enableLinkTracking']);
  
  (function() {
    var u="//www.sven-lewerentz.de/piwik/";
    _paq.push(['setTrackerUrl', u+'piwik.php']);
    _paq.push(['setSiteId', 1]);
    var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
    g.type='text/javascript'; g.async=true; g.defer=true; g.src=u+'piwik.js'; s.parentNode.insertBefore(g,s);
  })();
</script>
<noscript><p><img src="//www.sven-lewerentz.de/piwik/piwik.php?idsite=1" style="border:0;" alt="" /></p></noscript>
<!-- End Piwik Code -->


Any idea why it is not working? Thanks in advance!

Sven

Are you sure these are not “leftovers” from the previous configuration?

If you delete those cookies, do they reappear?

Hi Matthieu,

yes, I deleted the Cookies (in Chrome) and after a reload they were set again. I checked it on a second computer, too.

Sven

I just created a completely new website and added the code as described in the FAQ

Fresh Install, different domain, Piwik 2.11.2 no old cookies set.
And again the same problem: Cookies were set by Piwik on first visit.

Anyone here who successfully uses “disableCookies”? I try to figure out, if this is caused by a mistake I made or if this is a general bug…

Thanks!
Sven

Did you try in Firefox and in Chrome.

To my experience, it works fine in Firefox, but doesn’t work in chrome.

I know this is very strange but I have been etsted for hours and I couldn’t find any fix to stop installation of visitors cookies in Chrome (cookies are ses / id / cvar…)

Agnès

Hi Agnès,

thanks for your reply. Yes, I tested in Chrome only.
I will check Firefox and IE tomorrow.

Sven

If you it does work in Firefox and not in Chrome please open an issue on Github so that the team can fix it: Sign in to GitHub · GitHub

I can confirm, that it works fine in Firefox, but not in Chrome.
It seems to work in IE11, too. (But I can’t guarentee this, because I am confused by the way cookies are displayed in this browser)

I will open an issue on github.

Thanks @all

Sven

I already opened a ticket for this : The pragma "disableCookies" does not work in some browers · Issue #7494 · matomo-org/piwik · GitHub

Please feel fre to confirm it by adding your experience