matomo-tracker icon indicating copy to clipboard operation
matomo-tracker copied to clipboard

Globally enable / disable tracking after initialization within App

Open kombasltd opened this issue 3 years ago • 5 comments

Is your feature request related to a problem? Please describe. In the context of the EU Cookie Directive, tracking is only permitted with the consent of the website visitor. In a cookie dialog, the visitor agrees or refuses to the setting of cookies. Matomo tracking can only be activated with consent.

Describe the solution you'd like After first initialization of Matomo in index.tsx (as wrapper around die App) there shoud be a way to disable / enable Matomo tracking from anywhere within the app.

Something like

const { disableTracking } = useMatomo();

Describe alternatives you've considered Enabling / Disabling all tracking-events manually in a component, based on a flag.

Additional context

kombasltd avatar Mar 21 '21 15:03 kombasltd

I'm also running on this problem. That would be a great feature. The cookie should not be set before the user gives the consent.

mnogueras avatar May 27 '21 07:05 mnogueras

I'm not a lawyer buuuut, if we don't collect any personal information, there is no need for a consent right? You're allowed to set functional cookies without a consent.

Sandstedt avatar Jun 11 '21 12:06 Sandstedt

I have proposed a possible solution that allows to delay loading the matomo library on https://github.com/Amsterdam/matomo-tracker/pull/736, would love to hear some opinions there.

opsidao avatar Jan 24 '22 08:01 opsidao

It seems we don't need to show a pop-up? https://matomo.org/gdpr-analytics/

kuzdogan avatar Mar 29 '22 09:03 kuzdogan

@kuzdogan as mentioned in the post you link, to ensure GDPR compliance [snip] Users can opt-out of all tracking, which they can't with the current implementation of this library.

I understand that the French authorities have allowed Matomo to work without user consent, but given that GDPR applies to quite a few more countries than France, I think we still need to be able to disable/enable it on demand.

Beyond that, in my opinion, it's not just about legislation, it's also about giving users of the library options and allowing them to make the decissions on their own.

opsidao avatar Mar 29 '22 09:03 opsidao