Piwik - Disable Cookies


Hi All,

I need to disable cookies in order to avoid having to place an annoying opt in message on our website.

i’ve found a post that suggests that it’s possible to do this but the instructions are a bit vague “disable setcookie in piwik.js”…

i have done this in pwik.js and /js/piwik.js but for some reason i still get cookies in my browser. (so i’ve probably done something / missed something)

can someone provide some additional info about disabling cookies used with Piwik? (step-by-step instructions would be great, many people must want to do this now)

Many thanks in advance for your help, keep up the great work!


(Matthieu Aubry) #2

it’s a feature request New Privacy feature: “Disable all tracking cookies” (EU Privacy regulation update) · Issue #2772 · matomo-org/matomo · GitHub



Yes i did read that, however, i dont have the luxury of time to hang on for the new release.

Is there a set of manual steps that can be taken to do this now?

Sorry to seem impatient!




Sorry to bump but does anyone have any idea how to do this or is the only way a new version?

Im having trouble working out why nobody else seems to be worried about the new cookie laws…


(Matthieu Aubry) #5

We will implement the new feature in next release


Hi Matt,

Thanks again for your reply, do you have a rough timeframe for the release of the next version?




Yeh it would be good to get an update on this.

I have seen a lot of third party sites recommending Piwik as a cookie free analytics solution, but it looks like it actually isn’t yet? :S



Yes a reply would be great! :slight_smile:

i’ve done a lot of digging and there are few (if any) practical solutions to this issue.

the business man in me says there’s a huge (read HUUUUUGE) opportunity for piwik to up their market share if they had come up with a soluton to this issue…

still theres 4 days to go so hope isnt lost yet…


(Matthieu Aubry) #9

yes we will add this feature in the next release due before end of month!


That’s great news!

Build it and they will come! :slight_smile:



Great! Law came into effect today.


yes and as of friday we’re all on the run from the rozzers! :slight_smile:


(Matthieu Aubry) #13

It is now implemented in trunk, see: New Privacy feature: "Disable all tracking cookies" (EU Privacy regulation update) · Issue #2772 · matomo-org/matomo · GitHub

you can call piwikTracker.disableCookies();

You can test this new version here: 301 Moved Permanently


This is rather good news! I downloaded the RC and had a go, but I’m not too sure what I’m doing to be honest.

I added piwikTracker.disableCookies(); to the tracking code but no difference, it still places cookies.

I then replaced the minified piwik.js with the source found at js/piwik.js and changed configCookiesDisabled to true, sure enough this disabled cookies but it also stopped any data coming in :stuck_out_tongue:

Edit: Got it. You have to put disableCookies BEFORE trackPageView. If you put it after, it doesn’t work.