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.
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:
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.
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.
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?
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):
And this method will not work with Google Tag Manager.
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.
The post Cannot Verify Google Search Console with Google Tag Manager? Read this. appeared first on Analytics Mania.