Saturday, July 27

What is Google Tag Manager Noscript?

After you create a new Google Tag Manager container, the interface asks to place two codes on your website, one in the <head> and the after right after the opening <body> tag. But have you ever wondered why are there two codes instead of one?

Usually tracking tools, like Google Analytics, Mixpanel, or others require to place one code on all pages, so how come GTM is different?

In this blog post, I’ll explain what Google Tag Manager Noscript is and why you might need it (or not, after all).

 

Two codes

This view looks familiar, doesn’t it?

Google tag manager installation guide

The top one ( a.k.a. the <script> part) is the essence of the Google Tag Manager. The higher you place it in the code, the sooner it will load, therefore your marketing and tracking tags will capture the data sooner. As a result, your data will be more accurate.

This code responsible for all the tracking magic that’s happening on a website, creates the Data Layer, initiates triggers to fire, dispatches tags, etc.

The <script> part a heavy lifter which does A LOT. Without it, your GTM implementation would be simply worthless.

Now, there is a totally different story behind the 2nd code, <noscript>. What if I told you it’s unnecessary? After looking at countless numbers of Google Tag Manager containers, I can say that 95% of regular everyday marketers (#madeUpStatistics) just don’t need it (maybe even more). But they still use it (because Google’s instructions say so).

Why?

 

Google Tag Manager noscript works only in browsers when JavaScript is off

Unfortunately, I haven’t found any relevant statistics regarding how many people browse the web without JavaScript, but I don’t think that there are many of them (even though I’ve seen others saying different things). Just try to disable JavaScript for a while and browse your favorite websites. Take a closer look at what happens.

Spoiler alert: a lot of things will not work at all. And I’m not talking only about fancy animations. I’m talking about actual functionality, like cookies, etc. There are some serious limitations on the web without JS, therefore not many should be choosing this option.

Anyway, now it probably makes sense to you, why that 2nd code is surrounded by <noscript>. Because it functions only when JavaScript is disabled.

Subscribe
Notify of
guest

0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x