SocialGouv / matomo-next

Matomo for Next.js applications
Apache License 2.0
152 stars 22 forks source link

How can I add a self-built cookie notice? #108

Open sakerhetspolisen opened 1 year ago

sakerhetspolisen commented 1 year ago

I would like to show a cookie banner on the first page visit, and only let Matomo track the user if "Accept" is clicked to comply with GDPR. How can I achieve that?

Christian1984 commented 1 year ago

Have you considered simply deactivating cookies. In that case, according to their docs, you would not even need to notify your users:

Implication on cookie consent banner and asking user for consent

You can avoid the analytics cookie consent banner by disabling all analytics cookies in your JavaScript tracking code (as per instructions above). Learn more about tracking analytics without consent or cookie banner

~ from https://matomo.org/faq/general/faq_157/#implication-on-cookie-consent-banner-and-asking-user-for-consent

(this obviously isn't legal advice, though)