Streaming live at 10am (PST)

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


#1

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 ?



Multiple Analytics account running + GTM issues
#2

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.
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/div


Flow content
Elements belonging to the flow content category typically contain text or embedded content. They are: ...<script>...
https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Content_categories#Flow_content


#3