Uncaught ReferenceError: gtag is not defined
-
I’ve just installed your plugin and added a GTM id and selected “Custom” in the Container code placement options. Then I added this code
<?php if ( function_exists( 'gtm4wp_the_gtm_tag' ) ) { gtm4wp_the_gtm_tag(); } ?>after the opening body tag. I am gettingUncaught ReferenceError: gtag is not definederror in Chrome Console. I have everything else untouched in the plugin’s settings.I’ve also noticed a couple of 302s in the Network tab: https://imgur.com/a/trWIsPv. These are Google links.
I have the Google Tag Assistant add-on installed in Chrome. It shows me the GTM tag correctly.
I’ve also disabled the W3 Total Cache plugin to make sure this was not caused by the plugin but that didn’t help. The website is not connected to Cloudflare.
The topic ‘Uncaught ReferenceError: gtag is not defined’ is closed to new replies.