TrackingObserver: A Browser-Based
Web Tracking Detection Platform

Developing for TrackingObserver

TrackingObserver is a platform that exposes APIs for web tracking detection, blocking, and measurement. You can develop Chrome extensions that call TrackingObserver's APIs using cross-extension message passing. We provide several sample add-ons to TrackingObserver on the download page. This page describes how to develop for TrackingObserver. If you're not familiar with Chrome extension development in general, we recommend you start here.

If you develop an interesting add-on, we'd love to hear about it!

Example Add-Ons

You can find the source code for our demo add-ons on GitHub here.

Communicating with TrackingObserver

To communicate with another Chrome extension, you need to know its extension id. If you installed TrackingObserver from the Chrome Web Store, its extension id is obheeflpdipmaefcoefhimnaihmhpkao.

However, if you installed TrackingObserver from its source code (as an unpacked extension), its extension id will be different. You can find it in your list of installed extensions (Chrome Settings > Tools > Extensions).

Once you know TrackingObserver's extension id, you can call its APIs from your add-on as follows:

var to_id = "<TrackingObserver's id here>";

chrome.runtime.sendMessage(to_id,
    {type : '<API name here>',
     <other possible arguments here>},
     function(response) {
        // do something with the response, if applicable
    }
);

Tracking Categories

TrackingObserver classifies trackers according to the tracking taxonomy described on the overview page. It uses the following single-character identifiers for each category. Note that a single tracker may exhibit behavior in multiple categories, and that it may exhibit different behavior on different pages or across different loads of the same page.

Note that for referral-based tracking (categories D and F), TrackingObserver will log the tracking domain associated with the referring domain. For example, if adnetwork.com refers to ads.com, then TrackingObserver will log the tracking domain as ads.com-referredby-adnetwork.com. In your add-on, you may wish to remove the -referredby-x portion of logged tracking domains before further processing data provided by TrackingObserver (e.g., via the getTrackers() API described below).


TrackingObserver's APIs

TrackingObserver exposes the following APIs to add-ons:

Setup

registerAddon()

Measurement

browseAutomatically()

Data

getTrackers()
getTrackersOnCurrentTab()
getTrackersBySite()

Blocking

blockTrackerDomain()
unblockTrackerDomain()
trackerDomainBlocked()
getBlockedDomains()
blockCategory()
unblockCategory()
getBlockedCategories()
removeCookiesForTrackerDomain()
stopRemoveCookiesForTrackerDomain()
getRemoveCookieDomains()