I’m not quite sure when this started, but this morning I noticed that my page wasn’t being formatted correctly when browsing via Firefox. I noticed, after a few moments of looking into the problem, that javascript was reporting the “_gat” is not defined. Immediately I knew it was the Google Analytics code that was added by the Google Analyticator plug-in. Looking even further, it appeared that every single site that uses the “newer” analytics code (as opposed to the legacy code) was experiencing the same problem. First, this makes me wonder why Firefox handles this problem so badly, as IE still displays the page correctly (I know, I know… hell just froze over). Then, I’m wondering why Google wouldn’t be a little more careful with something that could have such a detrimental affect on customer’s websites. Currently I’ve disabled the Google Analyticator plug-in on my site to correct this problem, but my hands are tied right now on other sites that I manage where I don’t have that ability. Hopefully they get this corrected quickly…

Update 4/23/2008 at 10:46:05: It appears, at this point in time, that Google has corrected the analytics code.
Update 5/7/2008: As I mention in Google Analytics Firefox Breakage – Part 2, it appears that this doesn’t seem to be Google’s fault. Checkout that post to find out more…
Pingback: Google Analytics Firefox Breakage - Part 2 | Jason's Place
Jason – I am experiencing the same error on one my sites that I developed for a client that uses google analytics code.
I am getting the same “_gat is not defined” error on the following line of code:
var pageTracker = _gat._getTracker(“XXXXXXXXXXX”);
You posted that Google has resolved the error. Where can I find the resolution?
Actually, I later found that it wasn’t Google’s fault (as I mentioned in http://www.jason.mock.ws/wordpress/2008/05/07/google-analytics-firefox-breakage-part-2).
Well I cannot say for certain, but it appears that it’s because the address for the Google Analytics javascript is being blocked. One way to test, is to go to the following address (which is one of the possible locations for the javascript) and see if you can view the code:
http://www.google-analytics.com/ga.js
or
https://ssl.google-analytics.com/ga.js
If for what ever reason you cannot view those scripts, then it will not be defined in the javascript engine by the time it hits the line about _gat._getTracker(“xxxxxx”);
In my case it appears to be filtering by a proxy server, but again the part that confuses me is why this has such a negative effect upon Firefox (and not IE). So no, unfortunately I have yet to find a fix other than to try loading the page with a browser with a different html/js engine.
Well, I get the error in FF and IE, and can access http://www.google-analytics.com/ga.js and https://ssl.google-analytics.com/ga.js in both too. My IE is a virgin version – no addons etc. The offered solution isn’t a great one, if you ask me – see http://www.ralphcapper.eu/2008/new-google-analytics-code/
Cheers, Ralph