Cookie consent and Matomo

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!

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

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

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

Its really that simple. thankyou so much.

Thanks for such information, it really helped, i have found something similar here.