Bookmarklet to Bypass Tracking Referrers

If you have measures in place to block adverts and tracking while you’re browsing the web*, you’re probably used to finding links and pages that don’t always work. My most common problem was click-tracking referrers where you get links that look like this:

Such links redirect you through a tracking service provider before forwarding you on to the site you thought you were going to. The hosts file (in this case) does its job and stops the tracking site loading:

The tracking site cannot load

That sort of thing leads to errors like this:

A Blocked Tracking Link

I had no interest in unblocking tracking sites so I use this piece of JavaScript as a bookmarklet:

I have it attached to a button next to my address bar. When I find myself on a page where my intended destination is an escaped parameter, I can just click that button and get taken to the right place.

It works by transforming all the escaped characters back to what they should be (%2F becomes a forward slash). Then it strips the first 4 characters off so that the first “http” the next part finds is (hopefully) the start of the real destination. Finally it loads the page.

The linked Wikipedia article above should help with bookmarklets if they’re unfamiliar.

Most browsers will let you add favourites/bookmarks to your toolbars.
If you’re using Opera, you can use the Buttonator to create a button with an icon.

* You might be using things like the MVPS Hosts File on your whole system or browser specific implementations such as the Fanboy Adblock List.

Leave a Reply