Over the weekend I discovered that Google Webmaster Tools had disconnected from several of my sites. Why?
It turns out that the iCaspar Analytics plugin I whipped up a couple months back is putting the Google tracking code onto the page in such a way that the Webmaster Tools doesn’t recognize it. It can tell that there is Google tracking happening somehow (and indeed the tracking code works just fine for sending data to Analytics). But it reports that the “tracking code is malformed.”
Well, that’s because in the plugin I’ve dropped the tracking script in with a placeholder variable for the actual tracking UA number. Then the UA number gets passed onto the page separately. So, the script works, but whatever bot Google has scanning for the tracking script doesn’t recognize it.
I’ve patched this up so that the tracking script all gets output now in the more “orthodox” format, and the Webmaster Tools bot is now recognizing it on my sites where I’ve installed the update.
If you happen to be using it, you can grab the updated version here.