Cookie consent and Matomo


#1

Hi,
I’m using the cookie consent plugin on my site, but I have no idea how to make it work with Matomo. Here’s the code they say to use : https://cookieconsent.insites.com/documentation/disabling-cookies/.
Can someone tell me how to use this?
Thanks!


(hamburger) #2

Did you looked here: Matamo site
You simple have to add:

if (type == 'opt-in' && didConsent) {
      _paq.push(['forgetUserOptOut']);
    } else {
      _paq.push(['optUserOut']);
    }

#3

All right, wasn’t sure it was as simple as that! Thanks, I’ll try to do that.