Lately, while using the Twitter web interface with Javascript turned on, I've been redirected to a Privoxy error page whenever I click on an external link:

Request for blocked URL

Your request for was blocked.

Block reason: Path matches generic block pattern.

Looking a little closer at the blocked URL, I noticed that for every external link you click, Twitter logs the destination URL, the originating tweet and your user ID.

So what can you do to opt out of this tracking?

Disable Javascript

This is by far the easiest solution. You can simply install an extension like Noscript and use Twitter with Javascript turned off. That's what I do most of the time since the website is mostly usable without it.

A very fortunate side-effect of using Twitter without Javascript is that you can avoid a number of the worms which propagate through that service from time to time.

For those times when I have to enable Javascript on the site, I use Privoxy, a great privacy-enhancing web proxy, to alter the Javascript code executed when clicking on external links. This effectively disables the extra tracking and takes me directly to the intended URL.

First of all, make sure you have this line in your /etc/privoxy/config:

filterfile user.filter

then, add this filter to /etc/privoxy/user.filter:

FILTER: twitter-link-count Disable the Twitter link tracker  
s@{var A=\$\("\#content a\.tweet-url"\);A\.live\("mousedown",twttr\.countClick\)}@{}@ig

and finally turn this filter on for the affected URLs (/etc/privoxy/user.action):

{ +force-text-mode +filter{twitter-link-count} }*/javascripts/front.js

Switch to Identica

If you want to avoid similar privacy problems in the future, you can also switch to an Open platform which respects your basic freedoms.

The main contestant in this space is Identica. It's a great alternative to Twitter and has a lot of interesting features (like groups and XMPP integration) which are not yet available on Twitter.

The StatusNet developers have kindly released their source code under the AGPL and their goal is to build the most open micro-blogging system out there.

So go over there now and claim your username!

The most annoying thing for me is the links go stale if you leave the page open for a while. Guess I'll turn NoScript back on for Twitter.
Comment by James
Thanks for the referral to! Created an account and made my first post. Liked the fact that 'Welcome Bot' sent an automated 'Welcome!' Small touch, but nice.
Comment by Paul Mathew Bucalo