Adding Google Tag Manager after <body> tag inserts it into a <div> which goes against Google instructions

Hi everyone! So we’ve been running a website on Webflow for quite some time and noticed that the 2nd piece of GTM code that’s supposed to go “immediately after the opening tag” gets wrapped inside a

which is according to google an error and will make GTM not work. This is not mentioned anywhere in the official tutorial which makes the GTM tutorial from Webflow pretty useless - I’ve tried the hacky JS ways of removing the
around it, but it doesn’t seem to work. Did anyone solve this problem in any other way other than having to move the GTM script before the closing tag which seems like it’s the only option left?


Hi Yulia!

We’ve always place the gtm at the end of the tag and never had any issues. Are you sure this is creating a problem for you?