Disable cookies

Hi,

How do I disable cookies in Tag Manager?

I can find how to do it in regular Matomo (below code), but nothing in the Tag Manager API.

// Call disableCookies before calling trackPageView
_paq.push([‘disableCookies’]);
_paq.push([‘trackPageView’]);

Regards
/Jesper

Hi,

When you configure the Matomo connection in the Matomo Tag in Tag Manager, there is a config called Disable cookies that does exactly this.

Hi,

Yes I’m aware off the setting but I need to be able to turn it on and off from the client. We are not allowed be law to use cookies for tracking without consent. So we whant to set them after consent is given.

/Jesper