alinemorelli / react-gtm

React Google Tag Manager
MIT License
658 stars 140 forks source link

Not Working 4 Chrome Extensions #97

Open stazcp opened 2 years ago

stazcp commented 2 years ago

Any modifications to make it work for a Chrome Extension? I want to use GA in my CE. When I throw the script snippet provided by GTM in tracking works but when I initialize using your extension I don't get any tracking.

Is there a way to get this working in my extension?

Also when I do window.dataLayer I get undefined when using the snipped injected into the HTML page I get the dataLayer returned. So it means dataLayer is never created for the page with this pkg.