Improved support for Google Tag Manager


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 Cox
  • Jan 20 2017
  • William Gen commented
    06 May 19:44

    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.

  • Ronald Edwards commented
    March 04, 2019 12:57

    this would definitely make it more elegant than putting it in the custom code field ;) Thanks a lot in advance. 

  • Rohan Ganachari commented
    January 14, 2019 10:18


  • Micheal Reno commented
    August 16, 2018 04:05

    We solved this for exported sites! Check out you can save a GTM code and apply it to many sites, on all pages at once.

  • Cameron Roe commented
    July 21, 2018 11:10

    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.

  • Michael Wells commented
    December 18, 2017 10:38

    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.!topic/webmasters/Z7QR716p44A

    Webflow docs don't mention this problem- 

  • Michael Wells commented
    December 18, 2017 10:35

    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."

  • Guillaume Eyries commented
    July 11, 2017 18:11

    +1 This would be great!

  • Cameron Roe commented
    June 09, 2017 21:20


  • Chris Greer commented
    June 06, 2017 20:23

    How do you add the code for the <body>? And does this need to go on every page?

  • Christoffer Furnes commented
    April 24, 2017 14:47


  • Noelle Greenwood commented
    February 25, 2017 10:28

    Yes, yes, yes. So important.

  • Kai D. Thomas commented
    January 26, 2017 08:30

    Thanks for putting this on the list. Would make things much easier to implement!

  • and 48 more