Thursday, November 21

Cannot Verify Google Search Console with Google Tag Manager? Read this.

Google Search Console (previously known as Google Webmaster Tools) is a free tool by Google. Among all of its other features, it lets you better understand how people are finding your website through Google’s search. It displays keywords, their volume, click-through-rate, etc. But in order to get access to such data, you need to verify the ownership of that particular website.

For your convenience, there is a whole bunch of options to do that: you can upload an HTML file, you can add a little piece of code to website’s source code, etc.

In 2013, Google added yet another way how to verify the site ownership in Google Search Console, with Google Tag Manager. Apparently, things are not that easy here because I see a lot of people complaining online that they cannot verify Google Search Console with Google Tag Manager.

If you are one of them, continue reading because in this quick post I’ll show you how to solve that.

Official requirements how to verify Search Console with GTM

On their official support page, Google states the following requirements in order to verify SC with GTM:

  • You must have View, Edit, and Manage container-level permissions in Google Tag Manager.
  • Please the <noscript> part of the GTM container code immediately after the opening <body> tag of your page.
  • You cannot insert the data layer or anything else between the <body>  tag and the tag manager container code.
  • Use the code exactly as provided, do not modify it.

All these conditions must be met in order to successfully verify the ownership. All.

Google Tag Manager Course - Learn More

Reasons Why you cannot verify Google Search Console with Google Tag Manager

Here are the most common mistakes that I see when people ask for help with the verification of Search Console via GTM.

 

#1. You don’t have all the necessary access to the GTM container

In order to verify your Search Console ownership with Google Tag Manager, you must have the following permissions on the container level:

  • View
  • Edit
  • Manage

Keep in mind that there is no “Manage” permissions in GTM, only View, Edit, Approve, and Publish. From what I’ve seen, it looks like the Publish permission stands for that mysterious “Manage” permission. If you managed to verify the ownership by having the Approve permission, let me know and I’ll update this guide.

Also, you must use the same Google account for that GTM container AND for Search Console.

 

#2. You did not place the <noscript> GTM code right after the <body> tag

When you need to install Google Tag Manager on a website, you’re asked to add two codes, one into the <head> and the other one right after the <body> of the website. In this context, the 2nd code (and its placement) is important.

Google tag manager installation guide

Why? Because of Google Search Console verification, that’s pretty much the main reason why Google specifically asks you to add it directly after the <body>.

When Google’s crawler lands on a website, it looks for the <noscript> code snippet added immediately after the opening <body> tag. You cannot add it somewhere in the middle of at the end of the website’s body. It must be immediately after the opening <body> tag.

Here are two examples. A good one:

<body>
<!-- Google Tag Manager (noscript) -->
<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-KCBRBKM"
height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
<!-- End Google Tag Manager (noscript) -->

....
....
....
</body>

 

And a bad one (because there is some additional code between the opening <body> and the opening <noscript> tags:

<body>
<script>
//some script
</script>
......
<!-- Google Tag Manager (noscript) -->
<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-KCBRBKM"
height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
<!-- End Google Tag Manager (noscript) -->
....
</body>

 

So if you want to successfully verify the Google Search Console ownership with Google Tag Manager, make sure that there is nothing between the <body> and <noscript>.

 

#3. YOU chose the wrong verification method

The default SC verification method that is offered to the user is to add a meta tag directly into the website’s code.

Search Console Instructions - Meta Tag

All you need to do is to add that one line of code anywhere in the website’s <head> and you’re good to go. And that’s where many of you get stuck as well.

Since Google Tag Manager is so awesome, you can do wonders with it, like install tracking codes or inject some other codes directly into the website. The aforementioned meta tag is also a code, right? So there should be no problem to add this code directly via GTM?

Actually, there are some problems. You see, Google’s Site Verification crawler does not render JavaScript and GTM Custom HTML tag (that people use to inject that verification meta tag) is based on a JavaScript.

See the problem? Your injected Site Verification meta tag will never be seen by the crawler.

So if you decide to verify the ownership with GTM, make sure that you use a designated verification method for that.

To sum up, this method will work with GTM (just make sure that you follow all the requirements mentioned above):

GTM verification Method

And this method will not work with Google Tag Manager.

Verification Method that will not work with GTM

 

Still cannot verify Google Search Console with Google Tag Manager?

If after reading this blog post, you still face some verification issues, post a comment below. Preferably, it should contain a link to the website where the GTM container is implemented and I’ll take a look.

Do you know other reasons why people cannot verify Google Search Console with Google Tag Manager? Share your experience and I’ll update this guide. The more possible options there are, the more people will find it useful.

Subscribe
Notify of
guest

2 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
wernfried
wernfried
4 years ago

Hi Julius.

thanks for your blogpost.
please have a look. https://www.steindl-herzel.at

Can not verify the page although all seems fine. does it?

regards,
wernfried

phpInfo
Admin
4 years ago
Reply to  wernfried

Thank you for your comment. I checked the page you shared and it seems fine to me. Let me know if you need any kind of development help from me.

Thanks,
Amar

2
0
Would love your thoughts, please comment.x
()
x