In some countries, the law requests websites to provide a way for users to opt-out of all tracking, in particular tracking cookies.
[...] // Call disableCookies before calling trackPageView _paq.push(['disableCookies']); _paq.push(['trackPageView']); [...]
If you are using Matomo for WordPress
Log in to your WordPress Admin Dashboard. Go to “Matomo Analytics -> Settings”. You will see the tracking settings page. To disable cookies enable the option “Disable cookies” and press “Save changes”.
Implications on data accuracy
Learn more how cookie affect data accuracy in our FAQ: When cookies are disabled by a visitor, how does it impact Matomo reports accuracy?
Implication on cookie consent banner and asking user for consent
Essential non-analytics cookies that may still be created
Note: when cookies are disabled, there may still be a few essential cookies created in specific cases:
- when you exclude yourself from being tracked using the cookie method or using the iframe opt-out method, Matomo will create a cookie
piwik_ignoreset on the domain of your Matomo server (a temporary short-lived cookie called
MATOMO_SESSIDwill also be created).
- when you’re asking for consent before tracking visitors, a cookie
mtm_consentwill be created.
_pk_testcookieis also created without any identifier and is directly deleted (it is only used to check whether the visitor’s browser supports cookies)