Did you know? DZone has great portals for Python, Cloud, NoSQL, and HTML5!

Eric is a former teacher and future time traveler who has returned to the present to work at DZone - the coolest site on earth. He likes reading and curating about NoSQL and Cloud development, and is always excited to see something new, shiny, and distracting. In his free time, Eric likes knowing more about movies than you do, and looking forward to when the unified Chinese-American Corpocracy will develop the technology needed for transport to the year 2056. Eric is a DZone Zone Leader and has posted 151 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
Email
Views: 4985
  • 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

(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 - 9: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 - 12: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 - 1: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

Comment viewing options

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