#Google Tag Manager script - doesn't work

9 messages · Page 1 of 1 (latest)

haughty turtle
#

So I set mine directy into the head tag, did with or without ´´´is:inline´´´but also hasn't worked. It just doesn't recognize the contianer.
Has anyone set up GTM scripts properly.

astral osprey
#

did you figure this out?

haughty turtle
#

No, I was hoping to avoid Partytown, but maybe I will try it at the end.
Here was a user that did solved it, but the thread was closed, unfortunately.

haughty turtle
#

Update: I've tried with Partytown, but still no changes.

weary dagger
#

Can you share your non-partytown code? There shouldnt be any reason it doesnt work

haughty turtle
#

its the gtm script tag that belongs in the head:

<!-- Google Tag Manager -->
<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=
'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
})(window,document,'script','dataLayer','GTM-XXXXXXX');</script>
<!-- End Google Tag Manager -->
weary dagger
#

Do you see GTM getting loaded on your inspector network tab?

haughty turtle
#

yes, it is loading

weary dagger
#

And it loads just fine? What's the next part then, what have you configured GTM to do?