Google Tag Manager Implementation

Hi There,

I’ve been through the forums inside and out and I still don’t see a really good way of getting GTM right after the the body. So far it seems like the best way to this is through embedding HTML on the page however it gets wrapped in a div which causes an error with the script tags.

Is there a work around? It’s very important for me to set up direct event tracking and more on our website, without having to actively tag every instance through code.

This is the one limitation of webflow that I’ve had so far. Everything else has been great…but this is super important for me - yoshi

1 Like

Any one able to respond to this? GTM is essential for my business Thanks!

I have implemented GTM in the way that you have described - a custom html embed at the top of the page. You’re right, it is wrapped in a div but it does work OK. I’m not using it that vigorously though, just to add GA tracking and an email sign up.

1 Like

Thanks for posting…i’m going to be doing some insane tracking haha so hopefully this implementation technique doesnt get in the way of that.

I’ve had interference using the embed approach because it’s wrapped in a div tag. A more reliable solution (but still a non-standard implementation) is adding GTM to the custom footer which gets inserted before the closing body tag. The problem with this is it does not fire on partial page loads.

Best solution so far is manual insertion after export (if you are hosting externally) right after the opening body tag. Even though I export all my sites, this is still a pain and I wish Webflow would enable a new custom code field for right after the opening body tag… or offer code insertion without the divs.

1 Like

I agree with the thread – Webflow needs a custom code field for the top of the body. GTM and other implementations requires this, and the workarounds are not foolproof.

2 Likes