andrezimpel / gatsby-plugin-gdpr-cookies

Gatsby plugin to add Google Analytics (V4 is supported), Google Tag Manager, Facebook Pixel, TikTok Pixel and Hotjar in a GDPR form to your site.
Apache License 2.0
101 stars 70 forks source link

[react-ga] ReactGA.initialize must be called first or GoogleAnalytics should be loaded manually #16

Closed SimonScholz closed 4 years ago

SimonScholz commented 4 years ago

Hi guys,

I've installed your plugin and added my google analytics tracking id to the gatsby config. But when I enter my website and set the cookie after I hit the accept button I receive this warning in the console: [react-ga] ReactGA.initialize must be called first or GoogleAnalytics should be loaded manually And unfortunately nothing is published to my Google Analytics Dashboard. Am I missing something?

Is this problem maybe related to this issue: https://github.com/react-ga/react-ga/issues/379?

SimonScholz commented 4 years ago

Found the answer here: https://github.com/andrezimpel/gatsby-plugin-gdpr-cookies/issues/4