Analytics
4.1K members online now
4.1K members online now
Dive into multiple domain (Cross/Sub) tracking, implementing Ecommerce and Enhanced Ecommerce, setting up Event tracking, and Universal Analytics code.
 
Guide Me
star_border
Reply

GTM crashes my non-WP website((

Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

Hi! 

I am trying to install GTM to my website www.documentolog.kz

But once I add snippet my site crashes and not working. Just black page when refreshing. 

 

Can you please help me?

1 Expert replyverified_user

Re: GTM crashes my non-WP website((

[ Edited ]
Top Contributor
# 2
Top Contributor

Hi :-))
Are you using CMS Made Simple for the website?

The GTM container code should be just after the opening <body> tag .
Try wrapping it in {literal} {/literal} tags

{literal}
<!-- Google Tag Manager -->
<noscript><iframe src="//www.googletagmanager.com/ns.html?id=GTM-XXXX"
height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src='//www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
})(window,document,'script','dataLayer','GTM-XXXX');</script>
<!-- End Google Tag Manager -->
 {/literal}

Thanks
Bronwyn

Bronwyn Vourtis, Google Analytics Top Contributor
Was my response helpful? If yes, please mark it as the ‘Best Answer.’ Learn how here