Tracking scripts vs. Adblock Plus

Being a software engineer I of course have both Firebug and Adblock Plus (ok, this has nothing to do with being a programmer ;-)) Firefox extensions installed on all systems.

As one of its tasks Firebug dutifully reports all script errors. For quite some time I wondered why so many sites using Google Analytics fail with a
“urchinTracker is not defined” error. Turns out Adblock by default blocks requests to http://www.google.com/analytics/*…
Furthermore, like millions of others I’ve subscribed to some recommended filter lists. Among them is the Adblock EasyList tracking list. This, however, I had long forgotten; that’s the flip side of such fire-and-forget list subscriptions. Turns out one entry in the tracking list blocks access to URLs containing /js/urchin.

So far, so good. It doesn’t really matter if a single “standalone” call to Google Analytics fails. It’s much worse if the calls to a tracker are embedded in a JavaScript function with some real business functionality. Firefox for example preempts script execution in a function when it encounters a script error.
The Union of European Football Associations, UEFA, offers pay-per-view live video streams of all games at the EURO 2008. However, when you click the “Pay” button Firebug reports “_hbSet is not defined” and nothing else happens. UEFA uses HitBox to track their web traffic. Not surprisingly, EasyList’s tracker list contains two entries that block such requests: /hbx*.js|$~other,~object-subrequest and /js/hitbox. Since UEFA’s invocation of the _hbSet() prototype function is embedded right in the middle of their business logic inside the openVideo() function this fails badly. openVideo() is called, goes about its business, fails to find _hbSet() and stops the further execution of the rest of the code.

Oh, and all you webmasters out there trying to track our surfing behavior, would you be so kind and check the existence of an external JavaScript function first before calling it. Thank you.
if (window.urchinTracker) {
urchinTracker();
}

Or at least place all the tracking code at the very end of the business logic.

2 thoughts on “Tracking scripts vs. Adblock Plus

  1. Hi,

    The same thing is used for example on nvidia.com and the ABP Tracking Filter contains a whitelist for the specific script to make the site work again (see here: http://forums.lanik.us/viewtopic.php?f=64&t=1617 ).

    Can you open a new thread on the forum with the exact link to the site where the problem occurs? This will help to fix it for everybody who uses the list.

    Ares

Leave a Reply