Odi's astoundingly incomplete notes

New entries | Code

Statistics gatherers

Marketing claims a good deal of speed on the web. Marketing people make webmasters include JavaScript code or images in their pages that send data to statistics servers. The most prominent of which are Google Analytics and Falk. As this JavaScript code is often placed at the beginning of the page it defers rendering of the page in your browser until the data is transmitted. As more and more websites implement this the statistics servers become loaded and slower. That means the page load times increase.

From a system design point of view this is extremely bad architecture anyway. It creates a dependency to third-partys system you don't control. Yes, really a dependency. Your website's load time is directly dependent on the response time of the statistics server. This response time also depends on the network performance. As the connection to the statistics server is initiated by the client browser the webmaster has no control over this network performance: the route and bandwidth is completely dependent on the client. So clients in Europe will probably see a different behaviour than clients in America. This design also has a reliability problem. It only works if the client browser actually does send the request to the statistics server. So if the client decides not to do that the statistics will be wrong.

You can easily see by now that this design is totally insane.

The correct way of doing this is on the server side. The web server should send the statistics data to the statistics server in the background in another thread. It could even do that with batch processing: collect data offline and send it to the server once or several times a day. This would greatly reduce traffic and load. The web server also has the chance to measure response times and unavailability of the statistics server and can react appropriately. Of course this requires the providers of statistics services to provide APIs that are suited for this purpose. But widespread incompetence and ignorance of todays so called "software engineers" give birth to crap like this.

That's why I have decided no longer to accept this. Whenever I notice that the site I am viewing is slow I go and add the offending statistics server to my black list. The black list is my hosts file. I added these entries:       a.as-us.falkag.net s.as-us.falkag.net red.as-us.falkag.net       a.as-eu.falkag.net s.as-eu.falkag.net red.as-eu.falkag.net       www.google-analytics.com       m3.doubleclick.net 2o7.net       an.tacoda.net anrtx.tacoda.net       adfarm.mediaplex.com img.mediaplex.com       g14.nyc.intellitxt.com       js.adsonar.com
Maybe I will put up a separate web page that lists the most common and most annoying statistics hosts on the web.

posted on 2006-03-10 10:42 UTC in Code | 0 comments | permalink