Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reset method doesn't work #64

Open
enucar opened this issue Jan 25, 2023 · 0 comments
Open

Reset method doesn't work #64

enucar opened this issue Jan 25, 2023 · 0 comments

Comments

@enucar
Copy link

enucar commented Jan 25, 2023

I am initializing Google Analytics after my visitor accepts the cookie due to GDPR. It works without problem, but when it comes to resetting it doesn't work. The google analytics still triggers events.

On my website there's an option, where my visitors can change their cookie settings. Here's my code and I can see the removed message in the console which means the reset method is being called.

const decline = () => {
    if (ReactGA.isInitialized) {
        ReactGA.reset();
        console.log("removed");
    }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant