• Courses
    • Courses
    • Course bundles
  • Blog
  • Resources
    • Youtube channel
    • E-books and Guides
    • GTM Recipes
    • View All Resources
    • GTM Community
    • GA4 community
  • Services
  • About
    • About
    • Contact
  • Login
  • Courses
    • Courses
    • Course bundles
  • Blog
  • Resources
    • Youtube channel
    • E-books and Guides
    • GTM Recipes
    • View All Resources
    • GTM Community
    • GA4 community
  • Services
  • About
    • About
    • Contact
  • Login

January 5, 2024

Google Tag Manager in footer. How bad is it?

I recently received this question from one of the readers who is just starting with GTM and faced some real-life limitations. Google Tag Manager official recommendation states that to install it, you need to place the <script> code somewhere in the website’s <head>, and the <noscript> part should be added immediately after the opening <body> tag.

But what should you do if a performance-obsessed developer does not agree to follow these instructions? Or maybe your content management system does not allow you to place the code in the <head>?

The result is that both Google Tag Manager codes are added somewhere in the <body>, most likely even somewhere in the footer. If that’s the case, you’re probably wondering what will be the consequences to your tracking implementation if Google Tag Manager is in the footer.

Subscribe and Get the Ebook - Real Book Img - GTM for Beginners

This blog post will be pretty short and more of a quick rant. So, what happens if GTM is added to the website footer?

In general, it will work just fine. The only thing that is affected is the time when it will load. The higher the GTM container snippet in the page source code is, the sooner it will load, and obviously, the sooner your tags will start firing and tracking visitor’s interactions.

So, if the circumstances do not enable you to follow Google’s recommendations, don’t panic. You’ll still be able to use GTM.

The only combination that will make your website’s code invalid is if someone added the 2nd GTM code (<noscript>) to the <head>. All other options are ok. I’ve explained them in greater detail here.

Just keep in mind that in such cases, there will be a higher chance that GA and other tracking tools within GTM will not catch some visitors at all.

If your website loads pretty slowly and the visitor abandons the site before the GTM container in the footer loads (this must happen quite rapidly), your analytics/marketing tools will miss it (because GTM was not loaded at that moment and Google Analytics (or other tags) were not fired yet.

Unfortunately, I cannot give you numbers of how many visitors you can miss in your analytics reports under these circumstances. There are too many variables and conditions that affect this. It depends.

 

Google Tag Manager in Footer: Summary

All in all, it’s not the end of the world if Google Tag Manager code snippets are added to the footer. While it will affect the timing when your tags fire, it will still be possible to track visitors’ interactions on a website.

Additionally, if you’re facing resistance from developers or other stakeholders who reject GTM and don’t want to use it in their website/app, read this blog post where I give tips on how to convince someone to start using GTM and what argument you should make.

That’s it. As promised, the blog post was indeed very short. The key takeaway is that you should not pull your hair out if Google Tag Manager is in the footer. Better focus on other matters, like quality data collection and analysis.

Subscribe and Get the Ebook - Real Book Img - GTM for Beginners
Julius Fedorovicius
In Google Tag Manager Tips
9 COMMENTS
Mr Alexander
  • May 31 2019
  • Reply

I do see the need to have GTM on the website but please note that it does bring with it slower page loads. It is much better to not use it at all or have it at the end of the page prior to the closing tag.

    Julius Fedorovicius
    • May 31 2019
    • Reply

    Yes, it might make the site slower but at the same time, you might be losing important insights by placing the container there. GTM is loaded asynchronously, therefore, the impact is not that large. If a business wants to track visitors with various tools and then implements those tracking codes directly in the source code, that will also have an effect. Therefore, GTM by itself is not a problem as some people might think. I mean, if you want a fast website, avoid js at all. Go plain :)

      Mr Alexander
      • May 31 2019
      • Reply

      What important insights could you be losing by placing the tag at the bottom of the page? It will get loaded anyways, no?

        Julius Fedorovicius
        • May 31 2019
        • Reply

        For example: How many people abandon your website without waiting for it to completely load. The lower the code is, the less people you will track.

        If GTM is not filled with hundreds of codes, its effect on page load speed is not that high.

          Who cares
          • Jun 24 2020

          Sadly it is, but you won't notice it before using some proper tools..

Dev
  • Nov 6 2020
  • Reply

Can having Google Analytics Code in the Footer cause an abnormally low bounce rate? I have GA code in footer, and am also seeing very low BR, so want to know if it is related or if low BR is caused by separate issue.

Fine Love Dolls
  • Jun 12 2022
  • Reply

Hey there, thanks for your great blog!

Just to be sure, should both GTM codes be added to footer?

Thanks!

    Julius Fedorovicius
    • Jun 16 2022
    • Reply

    No. They can be added. But it does not mean they should be added.

Fine Love Dolls
  • Jun 12 2022
  • Reply

Hey Julius, thanks for your great blog

Just a quick question following your tutorial: https://www.analyticsmania.com/post/how-to-install-google-tag-manager/

Both GTM snippets are to be put in the footer, if we go for that footer only option right?

No GA use expected, just schema markup injection

Thanks for your confirmation!

Best

Leave a comment Cancel reply

Your email address will not be published. Required fields are marked *


 

Hi, I'm Julius Fedorovicius and I'm here to help you learn Google Tag Manager and Google Analytics. Join thousands of other digital marketers and digital analysts in this exciting journey. Read more
Analytics Mania
  • Google Tag Manager Courses
  • Google Tag Manager Recipes
  • Google Tag Manager Resources
  • Google Tag Manager Community
  • Login to courses
Follow Analytics Mania
  • Subscribe to newsletter
Recent Posts
  • Setting up cookie consent for Microsoft Clarity (V2)
  • Conversion rate in Google Analytics 4
  • Google Tag Manager Data Layer Explained
Analytics Mania - Google Tag Manager and Google Analytics Blog | Privacy Policy
Manage Cookie Settings