Saturday, April 18, 2009

Does Google Analytics Slow Down Your Site?

I’ve heard complaints that Google Analytics slows down site rendering. I don’t see that being possible. A small bit of code calls a javascript file (ga.js) from Google’s servers; this file collects data and drops a cookie in the user’s machine. Since this file is in cache it doesn’t affect bandwidth. The file also calls a 1x1 pixel graphic (_utm.gif) and attaches the data in a query string – at 35 bits the bandwidth hit is irrelevant; nor should creating the query string have any affect.

And yet, while I haven't experienced it, others have complained about Google Analytics slowing their site. They would add GA and response time slowed. They removed GA and response time returned to normal. All I can say is -- place your GA call at the bottom of your page. I would also take a look at your site in general. GA could be the proverbial last straw: check your database calls, see if there is inefficient coding, are the graphics optimized, are you using tables for layout.

No comments:

Post a Comment