28
Views
1
Comments
Solved
Add Google Tag Manager noscript to body of webpage
Question

Hello friends,

Someone already had this problem, or know how to solve ?


script:

$(document).ready(function() {
    $(document.body).prepend('<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-XSNXSLX" height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>');
});


I added this script in:




If anyone knows how to solve it, it will be of great help.

Thanks.

mvp_badge
MVP
Rank: #76
Solution

Hi Agno,

I have implemented this a while ago in Traditional Web. I know I had some issues then and I created this post because of it.

You can check out my marked solution and it was based on some suggestions made in another post.

The only thing that worked for me in order to load the no script tag immediately after the opening <body> tag of the webpage, was to place the Jquery code in the javascript property of the module.

Hope this helps.

Regards,

Nordin