Web development blog (old posts)

Home View on GitHub
29 January 2012

Mobile Analytics on Top Trafficked Sites

This is a short analysis on how web analytics are implemented across a few top trafficked websites. Part of them were picked from the Alexa rakings for shopping websites and some are the homes of popular tech giants.

I tested this in Mozilla Firefox with a spoofed iPhone 3 user-agent (via the User-Agent Switcher plugin). The drawback of this method is that for sites using feature detection and client-side redirection versus redirection based on the UA string I would still be getting the desktop site. That being said, I didn’t find any of the sites to have this behavior.

Also, I didn’t check all of them with a featured phone UA. I only did this for sites that had clues to different enhanced/featured implementations in their URL structure. The only one that had this, from the sites I tested was Groupon.

I used Firebug to check the requests being made and the size of the scripts. I also used the online JS Beautifier and the closure-compiler interface to swing back and forth between minified and unminified scripts.

I tried the domain of the companies directly (i.e., and I did not navigate deeper into the site structure for any of the tested websites. It may be possible that some sites who reported to not have a mobile optimized site to simply not redirect to it when accessing them directly.

Amazon uses inline JavaScript to build the URL of an analytics beacon. The code is minified and the total size (including script, noscript, img and a div tag) is 5KB. This comes to about 2KB gzipped.

eBay and Walmart do not seem to have any form of analytics code sent on the client side. Probably some form of tracking is done on the server, it being transparent to the client.

BestBuy directly embeds an Omniture beacon in the page. There is no extra JavaScript to download and execute. It also has an embedded Atlas beacon image.

Groupon has separate sites for enhanced and featured devices. They both use rum.js, a 3KB script that generates a beacon URL for Google Analytics.

IKEA has its analytics code bundled inside it’s 50KB (zipped) JavaScript file. The size of the analytics code is 67KB minified which becomes 22KB gzipped.

Target uses Omniture for tracking and includes a 47KB (17KB gzipped) JavaScript in the page. An interesting fact is that their analytics script is more than twice as large as their JavaScript, which is only 7.5KB zipped.

Newegg uses IBM Coremetrics and embeds a beacon image directly in the page.

Dell also uses Omniture and downloads a 50KB (19KB gzipped) JavaScript.

IBM sends a beacon to The beacon URL is built by a downloaded JavaScript file. The file size is 18.6KB minified (6.8KB gzipped).

Microsoft uses a directly embedded beacon image that hits

Apple, SAP, Canon, Asus, Toshiba, Fujitsu and Acer do not serve optimized content for mobile - or at least I was not able to find their mobile site given the methods described in the beginning.

I posted the code used to generate the chart in a gist. Feel free to update/correct it.