How Does Google Tag Manager Noscript Work?

This short read is designed to support you wherever you are — offering focus, tools, or reflection.
Share

The <noscript> tag includes an <iframe> that points to a special GTM URL:

<noscript>

  <iframe src="https://www.googletagmanager.com/ns.html?id=GTM-XXXXXX"

  height="0" width="0" style="display:none;visibility:hidden"></iframe>

</noscript>

When a browser loads this iframe:

  • A server-side request is made to Google Tag Manager.
  • GTM returns a minimal version of the container.
  • Any custom image tags inside that GTM container are fired.

This process does not execute JavaScript—it simply requests a pixel/image beacon URL, which records basic hit data.

Custom Image Tag in a Nutshell

A Custom Image Tag is the primary tag type that works without JavaScript. It sends tracking data through an HTTP request to a specified URL, such as:

This is commonly used to:

  • Send basic pageview data to Google Analytics.
  • Track impressions via pixel-based ad trackers.
  • Log form submissions using non-JS fallback URLs.

Custom Image Tags must be preconfigured in GTM and set to fire based on triggers compatible with non-JS execution.

Google Tag Manager Limitations When JavaScript is Off

When JavaScript is disabled:

  • GTM cannot access or evaluate the data layer.
  • GTM cannot fire event-based or trigger-dependent tags.
  • Variables such as Click Classes, Page Path, or Referrer are unavailable.
  • Debug mode and tag sequencing don’t function.
  • Most tag templates (GA4, Google Ads, etc.) require JavaScript and won’t execute.

Only Custom Image Tags can fire via <noscript>, and even these have limited context (e.g., no dynamic variables).

When Exactly Do I Need to Use Google Tag Manager Noscript?

You should include the <noscript> GTM block if:

  • You want to track pageviews from users with JavaScript disabled (even though this is rare).
  • You’re in an industry with strict compliance needs (e.g., finance or government).
  • Your audience includes privacy-focused users who disable scripts.
  • You’re trying to catch all possible traffic, including bots or restricted environments.

While it won’t replace full GTM tracking, it can serve as a fallback for minimal visibility in edge cases.

Google Tag Manager Noscript: FAQ

1. Is <noscript> part of the GTM snippet required to be placed on a page?

Technically, no—but it’s highly recommended. It ensures some tracking persists when JavaScript is disabled, although the data collected is limited.

2. Should I place <noscript> only in the <body> part of the website?

Yes. According to Google’s guidelines, the <noscript> iframe should be placed immediately after the opening <body> tag. It should never go in the <head> section.

3. Do all tags work when JavaScript is disabled in the browser?

No. Only Custom Image Tags work when JavaScript is disabled. Most other tag types rely on JavaScript execution.

4. What about the Data Layer? What happens when JavaScript is off?

The Data Layer is inaccessible when JavaScript is off. This means dynamic variables or event-driven data cannot be passed to GTM through the noscript iframe.

5. So no Data Layer variables in the Custom Image Tag?

Correct. The noscript iframe can’t access or interpret the data layer. Your image tag must use static URLs or basic query parameters hardcoded into the GTM interface.

6. If JavaScript is enabled in the browser, is <noscript> snippet active?

No. When JavaScript is enabled, the standard GTM script executes, and the <noscript> block is ignored completely by the browser.

7. So, does the Custom Image tag work only when JavaScript is disabled?

Only when triggered via the noscript iframe. If you configure a Custom Image Tag using a standard GTM trigger, it works with JavaScript. But for it to fire when JS is off, it must be inside the noscript iframe container.

8. Which triggers work when JS is disabled and <noscript> is active?

Only “All Pages” or basic pageview triggers set inside the iframe-based container will fire. Triggers like scroll depth, form submission, or button clicks won’t work because they depend on JavaScript.

9. Which GTM variables can still function when JavaScript is disabled?

None. GTM variables such as page path, click text, or custom JS variables are unavailable when JavaScript is off. The only data you can track must be hardcoded into image tag URLs.

If you’re looking for a comprehensive GTM setup for your website, just say hi!

Mastering Looker Studio: A Comprehensive Guide to Calculated Fields

Prev

Cross-Domain Tracking in Google Analytics 4: A Complete Guide

Next
Search Is Changing. Stay Ahead.
Search Is Changing. Stay Ahead.
Search Is Changing. Stay Ahead.
Get the Latest Updates
Search Is Changing.
Stay Ahead.
Occasional updates on AI search, modern SEO, analytics, and what actually moves visibility today.