Implementing Google Tag Manager / Adding code right after <body>

Hi all,

I’ve been spending an hour so far to figure out how to implement Google Tag Manager in my webflow page. I’ve seen forum posts that suggest to use the embed code element. This is not an option since it puts the code in a div. Any other tricks? Why isn’t there an option to add code right after the like right before ?


I think you can safely ignore that message as scripts are actually allowed in div element.

<div>
Permitted parent elements: Any element that accepts flow content.
<div>: The Content Division element - HTML: HyperText Markup Language | MDN


Flow content
Elements belonging to the flow content category typically contain text or embedded content. They are: ...<script>...
Content categories - HTML: HyperText Markup Language | MDN