Yahoo Analytics breaks CSS on local dev?
So – I was setting up a WAMP server with the most recent CVS version of our site, and for some reason CSS wasn’t working at all – internal or external, in both Firefox and IE8. I searched around for a bit and found the usual PEBCAK issues on Google, and then just started removing things to see what might cause the issue. Answer: Yahoo Analytics breaks CSS on my local dev server – no idea why, and frankly I don’t have the time to look into it.
The offending code is (basically) as such:
<!-- Yahoo! Inc. var ysm_accountid = "XXXXXXXXXXXXXXXXXXXX"; document.write(some stuff); // -->
Removing that from your template/html file should fix the css woes you may experience during development (assuming that your issue isn’t caused by something else, of course).
Yet another reason to choose Google over Yahoo, in my opinion. Google Analytics is leagues ahead of the competition and they don’t release the documentation for it in a fifty page beast of a PDF file. So – a heads up to all on this rather odd issue with Yahoo Analytics – it’s certainly not an obvious one. If anyone knows the reason for Yahoo Analytics causing this issue, please let me know, as although I’m not intolerably curious, I am reasonably curious.








