@ebrains/react 0.5.0-alpha.0 → 0.6.0-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -43,5 +43,13 @@ function matomoOptIn() {
43
43
  console.log('User has opted in to tracking');
44
44
  }
45
45
  }
46
+ // Function to opt-out the user
47
+ function matomoOptOut() {
48
+ if (isMatomoAvailable()) {
49
+ window._paq.push(['forgetConsentGiven']);
50
+ // eslint-disable-next-line
51
+ console.log('User has opted out of tracking');
52
+ }
53
+ }
46
54
 
47
- export { matomoOptIn as m, sendAnalytics as s };
55
+ export { matomoOptOut as a, matomoOptIn as m, sendAnalytics as s };