问题原文
原帖链接 · Michal · CC BY-SA 4.0
I have a problem with verification website in Google Search Console via Google Tag Manager. I have a site on Wordpress and GTM installed via GTM4WP plugin. Noscript part was set up to "Codeless injection (no tweak, right placement but experimental, could break your frontend)" in plugin settings.
When I am trying to verify it by GTM it returned error : "We could not find a Google Tag Manager container ID on the home page of your site."
When I am trying Google Analytics method it returned "We could not find any Google Analytics tracking codes on the index page of your site." error.
To be clear - GTM and GA works quite well. It collects data for almost 2 years. What am I doing wrong?
//Edit
Here is how code looks like in head section. It is located on 677 row while marks is on 697.
But I see that the noscript that should be in body section is not in the code. But why? I configure everything via GTM4WP plugin like below. Should I switch to Custom & PHP option?:
已采纳解答
原帖链接 · Michele Pisani · CC BY-SA 4.0
You have to check if the position of GTM code is exactly the same indicated by GTM guidelines. Concerning the error on Google Analytics it is returned to you because probably you haven't the GA snippet on the page because you deliver it by GTM.
Guidelines said to put noscript part in body because this part could be useful if JavaScript in user browser is disabled.
摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。
