includes/snippet.inc (line 159) defines the (noscript) code as a hidden iframe:

Per https://developers.google.com/tag-manager/quickstart ---

Note: The Google Tag Manager snippet must be placed directly in the page that you intend on tracking. Placing it in a hidden iframe or deploying it within another tag management system will prevent certain tags from accurately tracking the parent page.

Comments

charlesj created an issue. See original summary.

solotandem’s picture

Category: Bug report » Support request

Yes, the code in includes/snippet.inc (line 159) defines the (noscript) code as a hidden iframe; this matches what Google indicates in the Quick Start Guide you linked to.

Are you misreading the text of the page you linked to? While what you quote is placed following the noscript snippet, it refers to the script snippet. The noscript snippet output from this module agrees with what is shown on the guide.

charlesj’s picture

Perhaps this is a Google issue. The code sample defines a hidden iframe, but the "Note:" beneath it says that putting it in a hidden iframe will prevent certain tags from accurately tracking the parent page.

solotandem’s picture

Status: Active » Fixed

Google documentation could be clearer.
It reads "The [Google Tag Manager] snippet must be placed directly in the page that you intend on tracking."
The bracketed text is also used in snippet #1.
The second snippet is referred to as the "Google Tag Manager (noscript)" snippet.

charlesj’s picture

Very clear indeed. Particulary that second part of the section (omitted from your response)

The Google Tag Manager snippet must be placed directly in the page that you intend on tracking. Placing it in a hidden iframe or deploying it within another tag management system will prevent certain tags from accurately tracking the parent page.

And the iframe code in #2 --

<iframe src="https://www.googletagmanager.com/ns.html?id=GTM-XXXX"
height="0" width="0" style="display:none;visibility:hidden"></iframe>

--- is certainly not a hidden iframe.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.