Since May 2011 the Site Speed report in Google Analytics shows how fast your pages load for your real visitors. Google Analytics measures page load time using the Navigation Timing API in all browsers that support it (IE9+, Chrome, FF7+, Android4+) and falls back to Google Toolbar data for older versions of IE and Firefox. Having page speed data in GA is great, because you can easily correlate it to bounce rate and conversion, resulting in great, actionable insight that down the road leads to a faster site, happier users and more revenues. But if a significant percentage of your visitors use Firefox 7 or 8, you may very well be wasting a lot of time interpreting the Site Speed data and even more time taking the wrong actions.

Problem: a bug in Firefox implementation of the Navigation Timing API

Firefox implemented the Navigation Timing API in version 7, which was released this year on September 27. From that day in that browser, there has been a bug in the implementation of that API. You can read all about it in the bug ticket on Bugzilla.
The problem is that the value for window.performance.timing.navigationStart can be too low, which means it is too far in the past. Google Analytics uses a simple formula to calculate page load time: loadTime = window.performance.timing.loadEventStart - window.performance.timing.navigationStart. If navigationStart is too low, the page load time will be too high.

I see this bug affecting page load times in GA Site Speed report a lot. On one of my client’s site, 27% of visitors use Firefox 7 or 8 and 24% use Chrome 15 or 16. The Site Speed report shows that the average page load time for Firefox users is 7.23 seconds and for Chrome it is 3.12 seconds. When zooming in on individual pages and dates, I often see that all the big spikes (30, 50 or 100+ seconds load times) are coming from Firefox. Never Chrome, never IE, always Firefox.

At least one commercial web application performance monitoring service provider has taken action on this bug. New Relic confirmed to me that they don’t use the Navigation Timing API in Firefox to calculate page load time because it is not accurate.

So, what can you do to not have this bug mess up your data in GA?

Solution: filter out the Firefox timings in Google Analytics

In Google Analytics, create a Custom Report and filter out all data from Firefox visitors.

Custom Report in Google Analytics

Good news: the bug will be fixed in Firefox 9

Mozilla fixed the bug in Firefox 9 which will be released on December 20 2011. Yes, that is tomorrow!!! It will probably take some time for all your Firefox users to upgrade to version 9, so if you plan to actively work with the Site Speed data in the next couple of weeks or months, do filter out the Firefox data for higher accuracy. Once most visitors have upgraded to Firefox 9, you can remove the filter(s) in Google Analytics.

Closing remark

You may already have known about this issue. In the Google Analytics Online Help, on this page, there is a note almost at the bottom of the page mentioning the Firefox bug. Google implies here that the bug has been impacting load times in the Site Speed report since November 16. I have no idea why. As far as I know, the bug has been in FF 7 from day one (September 27) and exists in Firefox 8 as well. In my opinion, the Google Analytics team should have written a blog post about this, and not merely mention it in the Online Help, where many GA users probably never look.

ABOUT THE AUTHOR

Aaron Peters (@aaronpeters) is the co-founder of CDN Planet and an independent web performance consultant based in The Netherlands. He is a Red Hot Chili Peppers fan, father of 3 girls and will kick your butt in a snowboard contest anytime.