Fix: Google Webmaster Tools: Unable to Verify Property (Google Analytics Tracking Code Malformed)
Recently, I noticed one of my web properties in Google Webmaster tools suddenly show unverified. I originally verified this property using the Google Analytics tracking code method. This is a static site and I have not touched it in a few months. So, I attempted to re-verify it again using Google Analytics but I received a message about the Google Analytics tracking code being malformed.
Verification failed for “” using the Google Analytics method (less than a minute ago). The Google Analytics tracking code on your site looks malformed.
Google Analytics recently introduced the Global Site Tag tracking code and this was one of the first web properties I implemented the code on. So, I was convinced it was an issue with tracking code itself.
After spending 5 minutes looking at the code on my website, I found the issue. The Google Analytics tracking code was not implemented between my homepage site <head> tags. I simply placed the tracking code inside my <head> tags and I was able to successfully verify my website in Google Webmaster tools again.
So, how was I originally able to verify my website in Google Webmaster Tools when the tracking code was outside my <head> tags? My guess is I did make a change to my homepage and accidently removed the tracking code outside my <head> tag at some point months ago. My website showed not verified after I logged into Webmaster tools and after I ironically added a new web property. It seemed only after I added a new property that I noticed my other site show unverified. I don’t know how often Google Webmaster Tools checks for website verification, but it may be worthwhile to login to Webmaster tools and check your properties from time to time.
Comments 1
My website is bought from z.com and installed wordpress. I used the header and footer plugin to add the Google analytics tracking code but Google analytics verification is unsuccessful on my google search console. All the code are in the header. I used all possible methods. But it still fails. Please help me to fix it.