Wednesday, October 27, 2010

Can't Verify/Link Google Webmaster to Google Analytics: "We weren't able to verify your site"

Last week I set up a blog mirror at Blogger. Since it's free, and it's useful to add more channel/exposure to my site, so why waste it?

Anyway, I added the posts, created the pages, linked it to my Google Analytics account, and everything were checked. Monetization was also set up properly. And lastly: added it to my Google Webmaster Tools and tried to do verification via Analytic. Result? Big red fail:

We weren't able to verify your site:
http://behindthecodes.blogspot.com/

What's going on here??? Apparently lots of people are also in loss.

My Analytics account were good, and I could see the data from this new blogspot site coming in. Also to be able to link to my Analytics, Webmaster said:

You can use this option if your site already has a Google Analytics tracking code that uses the asynchronous snippet. You must be an administrator on the Analytics account.

... and both were fulfilled already. So the problem was neither on the Analytics site nor my blogspot site. Well Google, thanks for your simplistic and unhelpful error message :(

Anyway, the problem turned out to be due to the placement of my Analytics tracking code: I put the code before the closing BODY tag, where Webmaster expected it to be in the HEAD tag. So off I went: edit the HTML code of my blogspot template, move the tracking code to end of HEAD element, and tried verification again. It worked!!!

So as a summary, I just want to give this solution (fix) to the world:

In Google Webmaster, if you want to verify/link your site to your Google Analytics account, make sure you use the asynchronous tracking code (ie. the latest one from Google), and make sure you put it in the HEAD section.

Hope this helps!

No comments:

Post a Comment