Google Tag Manger - no-script Code Not Found

I am having trouble getting the "GTM no-script code not found: either missing or not in " issue resolved.

The GTM script is placed after the head > tag. No issues.

However, when using the Google Chrome Tag Assistant, I keep getting the "GTM no-script code not found: either missing or not in " error.

Here is where I am placing the GTM noscript code in the header.php file:

body ?php body_class(); ?
!-- Google Tag Manager (noscript) --
noscriptiframe src="https://www.googletagmanager.com/ns.html?id=GTM-######"
height="0" width="0" style="display:none;visibility:hidden"/iframe/noscript
!-- End Google Tag Manager (noscript) --


?php do_action( 'themename_after_body' ); ?

I have also tried placing the GTM noscript code like this:

body ?php body_class(); ?


?php do_action( 'themename_after_body' ); ?
!-- Google Tag Manager (noscript) --
noscriptiframe src="https://www.googletagmanager.com/ns.html?id=GTM-######"
height="0" width="0" style="display:none;visibility:hidden"/iframe/noscript
!-- End Google Tag Manager (noscript) --

Any suggestions on how I can fix the Tag Assistant issue?

Topic google-chrome scripts headers google-analytics Wordpress google

Category Web

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.