Skip to content
This repository was archived by the owner on Jan 30, 2023. It is now read-only.
This repository was archived by the owner on Jan 30, 2023. It is now read-only.

Globally enable / disable tracking after initialization within App #478

@ghost

Description

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions