Cannot verify Google Search Console with GTM using GoogleTagManager

Created on 31 January 2018, almost 7 years ago
Updated 3 January 2025, 8 days ago

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)

Steps to reproduce

Links

πŸ’¬ Support request
Status

Closed: duplicate

Version

2.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States shrop

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • I know this particular issue was closed many years ago, but I just saw a note on the latest 2.0.0 release that notes that Search Console verification was failing..but I can't find an open issue.

    Let me say this in case others find this like I did: it's not the job of a Tag Module to do Search Console-related work.
    The GTM verification method provided by Google is flawed....this is a Google screwup....one that's been going on for years.

    Fortunately, Google provides other options to get verified. I had success with the DNS record method. It's a ridiculous requirement because, in a larger company, DNS records are highly sensitive and cannot be easily adjusted without lots of approvals. But I did it.

    Google is a co-sponsor of this Module, and they need to get off their asses and fix this.

Production build 0.71.5 2024