Hi
Add a box on the Analytics page which allows you to enter your GTM Container ID and then automagically insert the two GTM Container code snippets in the appropriate places.
Google Tag Manager container code now has two code snippets.
The first code snippet needs to go as high as possible in the <head>.
The second code snippet needs to go immediately after the <body> tag. The only way I know to do this at the moment is with a custom embed.
Many thanks
Graham
Absolutely ! Altogether, Webflow is weak on integrations with all sorts of commonly used software compared to Wix, Squarespace of Wordpress. This should be a priority.
You can create a symbol for GTM head code and insert it on every page. If you change the symbol it'll change across pages. Right now this is the closest solution.
this would definitely make it more elegant than putting it in the custom code field ;) Thanks a lot in advance.
+3
We solved this for exported sites! Check out https://jinglebell.io you can save a GTM code and apply it to many sites, on all pages at once.
Agreed! This would allow for us to add our Google Analytics in our Google Tag Manager container instead of directly in Webflow for better control. Google Tag Manager is really all that is needed.
Adding some further references here for this item, regarding the current "The Google Tag Manager snippet on your site is in the wrong location" error.
https://productforums.google.com/forum/#!topic/webmasters/Z7QR716p44A
Webflow docs don't mention this problem-
https://webflow.com/blog/integrating-google-tag-manager-with-google-analytics-in-webflow
Chris Greer- yes that's correct, even if you can ensure that the HTML embed would render immediately after the <BODY> tag, you'd need to create that on every single page on your site to have correctly installed GTM.
GTM seems to mostly work OK with the BODY snippet at the end, just before the closing </BODY> tag, which WebFlow allows you to do in site settings.
However some features, like verifying Google Search Console sites won't work. There you get an error "The Google Tag Manager snippet on your site is in the wrong location."
+1 This would be great!
+3
How do you add the code for the <body>? And does this need to go on every page?
+1
Yes, yes, yes. So important.
Thanks for putting this on the list. Would make things much easier to implement!