This method can be taken further by using, for instance, PHP, as the image source. So you could embed a 1 pixel gif like
<img src="tracker.php" width="1" height="1">
... where tracker.php spits a transparent GIF to the browser instead of text. Inside the PHP file, you can do anything you want. You could even use cookies or sessions (which uses cookies) to track a user's progress through a site.
This is how ad companies like doubleclick track our browsing habits. They have advertisements on most popular sites. Those ad images actually send out cookies which tracks a user's progress from one site to another (of course, they can only track the sites they have ads on, which is a lot of sites). This allows them to find out the sequence of sites that a surfer visits during a session. This is really powerful demographic information that they can sell back to the sites they have their advertisements on (privacy, well, is another issue).
Kirk Parker wrote:
Sure, at least for one method: the 1 pixel image is stored on a remote server, belonging to the people who want to track you. Now, when you come to my site, and my page contains IMG src="http://big.brother.gov/my_site/spy.gif", big brother learns that you have visited my site by a simple examination of its server logs. There are of course much fancier implementations of this. It is also possible to fake the system by asking directly for http://big.brother.gov/my_site/spy.gif, thought why someone would want to do this is not clear to me.