Our Digital Strategy team is trying to verify a domain using the Google Tag Manager and it is failing because "The Google Tag Manager snippet on your site is in the wrong location." We are using the 8.x-1.0 version of GoogleTagManager and I have confirmed that Google Tags are firing correctly.

This forum post indicates that "The container snippet needs to be placed immediately after the opening body tag otherwise verification will fail."

Based on this article: https://www.lunametrics.com/blog/2016/11/22/google-tag-manager-snippet-p..., it appears this module is placing GTM code correctly.

So, this isn't necessarily an issue with this module. I am wondering if there is an implementation issue (minor one) that could be causing verification to work for Google Search Console.

Technical Documentation

Screenshot showing verification screen (Google Search Console)
Google Search Console Verification Issue

Steps to reproduce

Links

CommentFileSizeAuthor
Google Search Console Verification Issue.png195.37 KBshrop
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

shrop created an issue. See original summary.

shrop’s picture

Issue summary: View changes
solotandem’s picture

Status: Active » Closed (duplicate)

This has been addressed too many times already (search closed issues).

See #2855429: Tag manager is being placed in wrong location for various comments and #2855429-8: Tag manager is being placed in wrong location in particular if you want the noscript tag 'immediately' after body tag.

Added comment to project page and will add to README in future commits.