Right now, as you read this page, you are secretly being watched. Ad networks and analytics companies are tracking you across the Web, using a variety of techniques designed for one purpose: knowing everything about you. There is an entire industry built upon identifying and tracking web users, and chances are you haven’t heard of most of them. This post will discuss some of the ways they track you, how you can make it harder for them, and why you should.
You may be wondering why tracking is so bad, and why you should care. You might think that there are so many people that picking you out of the crowd is practically impossible. It’s not. The problem is that you don’t know who has your data, you don’t know what they have, and you can’t control how they use it. The data associated with you might seem fairly innocuous, such as the IP addresses you’ve used, what sort of sites you visit, or your email address, but in the wrong hands it can be rather dangerous. Potential employers could see your search history, including not only search terms, but what you clicked on. Phishers and identity thieves could launch targeted attacks using information off your social networking sites and your location from the IP addresses you’ve used. Commerce sites could adjust their prices and charge you more for things you’re interested in, assuming you’re still likely to buy them.
From the point of view of the people doing the tracking, there are two main goals. First they have to get as much information as they can from each place you visit, and second, they have to link it together to create a profile of you. This allows them to build the detailed view of your Web history that they can then sell to anyone willing to pay them for it.
Gathering Information
Every time you make a request to a web server, your browser sends a bunch of information along with that request. It will generally send an “agent string” identifying the browser you use, the operating system you’re using it on, and some other information such as version numbers. It also sends a header telling the server what the last web page you looked at was, one telling the server what languages you prefer, and if you connect through an HTTP proxy, it will add a header with your original IP address. On top of all this, any cookies previously set by the domain (more on this later) will be sent to the server. This is quite a lot of information, and it may be sent out multiple times, not only for the web page itself, but also for any extra resources in the page, such as images or ad banners.
This is one major source of information for the tracking companies. All they have to do is arrange for some resource hosted on their servers to be included in the web page you visit, and all that information will be sent to them when the page loads. This isn’t hard, it happens every time you see an advertisement on a page you visit. Even if you don’t see any ads on a page, you’re still not in the clear. Web analytics companies will often place transparent 1×1 pixel images, also known as “web bugs”, in the pages they keep stats on. Every time someone loads the page, their browser sends all that information to the tracking company along with their request for these images.
So how do you stop this from happening? There are two ways to do this, either you can change or reduce the information in the headers, or better, you can avoid fetching the third party content altogether. If you never request things from their servers, it becomes much harder to track you. Two browser extensions that help you avoid connecting to these servers are Adblock Plus for Firefox and Chrome, and Do Not Track Plus For Firefox, Chrome, Safari and IE. These extensions attempt to keep you from loading the third party resources that come from advertisers and Web analytics companies without affecting anything else. If the site you’re connecting to directly is tracking you, then they won’t help, but they do a pretty good job at blocking third party tracking.
The other method for reducing the information given out is to avoid giving it out, or at least make it meaningless. There are extensions for Firefox and Chrome (And probably others) that will allow you to suppress sending the URL of the last page you visited along with each request. To protect yourself from trackers identifying where you live based on your IP address, you can use something such as Tor to hide your location. (Remember what I said about proxies sending the original IP address along with the request. Tor is safer, if slower) Other extensions exist that will allow you to modify the requests you send to web servers by removing or changing other headers.
Building a Profile
To track you across the web, the tracking companies need some way of identifying who is making a request to their servers when a web bug or ad banner is loaded. The easiest way to do this is with HTTP cookies, which are pieces of information that your browser stores, and then sends back to the server on each new request. This works across sites, as long as there’s some third party resources to fetch from the same domain on each site. Let’s say you log in to Facebook to check up on your friends. Along with the main page content, your browser fetches some ad banners from ads.tracking.com. Along with these come some tracking cookies, which just contain some unique string. Later on you visit an online store, which also has ads hosted on ads.tracking.com. When your browser goes to fetch these ads, it sends back the cookie it got while you were on Facebook. Now the tracking company knows that those two requests came from the same web browser, and they can link your social information to your shopping history. Of course, as you continue to browse the Web, they’ll link in other stuff, like all your search terms, or the list of all those sites you don’t want people finding out that you visit.
To make matters worse, HTTP cookies are only one type of information that can be stored and sent back later. Flash also allows special cookies to be stored, and these won’t be thrown out when you clear your browser cookies. Java applets and Microsoft Silverlight can do similar things, and are just as dangerous to your privacy as Flash. I recommend turning these off entirely except for a few trusted sites, e.g. Youtube.
An alternative to cookie-based tracking is to use something like JavaScript to fingerprint browsers. Information such as your browser version, operating system, any fonts or plugins installed, and much more can be collected and sent back after the page loads, even if you didn’t send it along with the page request. This information may be enough to uniquely identify you, or at least to place you into a very small group of users that share your exact settings.
To avoid tracking companies linking your requests together, you would need to avoid storing cookies from their servers and avoid running any code that they provide. The suggestions above for avoiding connecting to tracking servers in the first place will help you out here, but some additional protection is warranted as well. Most browsers have a setting to prevent them from storing third party cookies. This is a good defence against tracking via HTTP cookies. Additionally, most browsers let you clear cookies when you shut down the browser. While this will result in your logins not being remembered across browser sessions, it can help avoid you being tracked across browser sessions as well. Finally, you can also use your browser’s private browsing mode. This will generally prevent cookies from being saved and used outside the private session, in addition to not saving history to your computer. Keep in mind that none of this helps against Flash, Java, or Silverlight.
To avoid browser fingerprinting through JavaScript (as well as a lot of other annoying or dangerous stuff) you could turn JavaScript off completely. This will break the functionality on a lot of sites however, so I would recommend NoScript for Firefox or ScriptNo for Chrome to help you manage which sites you trust to run code in your browser. This will require some tweaking at the beginning as you choose which sites you trust and which you don’t, but it becomes much smoother afterwards, and you’ve greatly reduced the potential for attacks on your browser through these channels too.
If you follow the advice given in this article, you can go a long way towards regaining some control over your personal information. There is likely no magic bullet, and never will be, but you can make it a lot harder for the usual range of tracking techniques to build a profile of you. You can’t take back what you’ve already given away, but you can limit the information you give away in the future.