-
Notifications
You must be signed in to change notification settings - Fork 69
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
Initialize as soon as user accepts consent #4
Comments
@romixch I'm actually doing a reload of the page as soon as the user klicks the accept cookies button on the banner. What you could to is to initialize GA with the click on the button.
Maybe the plugin could also expose a function for this. Something like reinitialize. What do you think? |
@andrezimpel I implemented it the way you suggested using ReactGA. But I think it would be much more elegant if the plugin would expose the function itself as you propose. Great job with the plugin btw 👌🏻 |
Thanks for your nice gatsby plugin! It is very convenient. But there is something that would make it even nicer:
Google Analytics is only activated when the user visits the page the second time. Until then ReactGA reports following warning in the console:
ReactGA.initialize must be called first or GoogleAnalytics should be loaded manually
Should the method ReactGA.initialize somehow be incorporated into onRouteUpdate?
The text was updated successfully, but these errors were encountered: