Eric is the Editorial Manager at DZone, Inc. Feel free to contact him at egenesky@dzone.com Eric has posted 804 posts at DZone. You can read more from them at their website. View Full User Profile

Are Google Analytics Cookies Slowing Down the Internet?

01.13.2012
| 8614 views |
  • submit to reddit
Eduardo Cereto has some concerns about the possibility of Google Analytics cookies slowing down the sites that use the web app (which obviously includes many of the most popular sites on the internet).  Some readers may have thought this claim illegitimate, as such a major issue could hardly have gone unnoticed by Google engineers.  But the first comment on Cereto's post was made by none other than Rasmus Lerdorf, the creator of PHP, who knows a thing or two about web performance.

According to Cereto, a 5% average performance boost could be gained by the sites that use GA if Google were to modify the handling of the web app's cookies.  Cereto claims that

GA Cookies represent about 25% of that HTTP request size. The moment you notice GA is present in about 50% of top websites you notice that useless GA cookies going around the internet represent 12% of all HTTP requests.  --Eduardo Cereto


Over 14.5 million websites use Google Analytics.
 
Cereto's statistics must have come from the Google SPDY whitepaper he cites in his blog entry, and he has since posted a bug on GA-Issues, which has not gotten any attention from Google.  His post suggests that this issue could be fixed by using localStorage features in HTML5, although this would of course only help people that are using a browser with support for this feature.  Still, the outlook here is not so bad, as Cereto points out:  Only HTTP requests, instead of responses, are really affected by these cookies.  Rasmus Lerdorf also checked the issue with the following point:

I kind of doubt the 5% number for the typical request. But requests that already carry a bunch of cookies and other header data where the GA cookie makes the request headers overflow the MTU will definitely see improvement by being cut to fit in a single packet. Especially for mobile devices on slower connections.  -- Rasmus Lerdorf

The question now is whether Google has truly ignored this potential problem, or is Cereto missing an important aspect of web performance?

References
Published at DZone with permission of its author, Eric Genesky. (source)

(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)

Comments

Ela Ruby replied on Fri, 2012/01/13 - 10:58am

I had put google analytcs codes once on my php oop site and it was slow my site a little bit, after I removed codes was working great. Hope google will fix asap.

Sandeep Bhandari replied on Fri, 2012/01/13 - 1:58pm

Though I personally don't like Google Analytics against Clicky or Woopra but some plugins in my wordpress installation are using it so I can't escape from it at this time. May be I will try to contact the plugin owner to stop using it. My Blog

Andy Jefferson replied on Fri, 2012/01/13 - 2:19pm

/etc/hosts
127.0.0.1 www.google-analytics.com
127.0.0.1 ssl.google-analytics.com
that really slows me down :-P

Yaron Levy replied on Mon, 2012/06/11 - 12:05pm

I kind of doubt the 5% number for the typical request. But requests that already carry a bunch of cookies and other header data where the GA cookie makes the request headers overflow the MTU will definitely see improvement by being cut to fit in a single packet. Especially for mobile devices on slower connections.

Carla Brian replied on Sat, 2012/07/07 - 12:56am

Now I know the reason of this. I have very slow internet connection as well. Thanks for this post. It is really interesting to know about this one. - Mercy Ministries

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.