Google Analytics Works on ngrok But Not in Production? [SOLVED]

My Meteor app uses React. I installed Google Analytics tags using the npm package, react-gtm-module. I put the app up on ngrok and tested it in GA on preview mode. Everything worked great. The Google Analytics tag was detected.

Then I pushed the same code to production, and GA preview mode says, “Google Tag: GTM-##### not found”.

What am I missing?


I added the gtag.js script to the section in main.html, and it seems to be working in production now. But, I thought react-gtm-module was supposed to add gtag.js for me. Is that not so?

<!-- Google tag (gtag.js) -->
<script async src=""></script>
    window.dataLayer = window.dataLayer || [];
    function gtag(){dataLayer.push(arguments);}
    gtag('js', new Date());

    gtag('config', 'GTM-XXXXXXX');


It was a misconfiguration of the specs for Google Ads / Google Tag Manager. That U/X is a mess.

1 Like