HN does something similar. When you up/down vote something, it creates a new js Image object and sets the src to the HN site, which then pings the server. No need for ajax.
Pro: You aren't subject to the same-origin policy that XHR has.
Con: You can't manipulate the Request (GET only, can't touch headers), and you can't even see the Response -- when you vote on HN it just increments the number it already had instead of getting the new number in the response from the server.
Simpler client-side code. Instead of setting up an XMLHttpRequestObject and forming a traditional POST request, you request a URL via GET.
If there's another advantage, I'm probably missing it (the image switchout shouldn't require a server-side call, since we already have the up/down icons loaded in the browser)
For HN, I suspect the reason was that it was fast and easy to code. The main disadvantage in this case is that there's no actual guarantee that the request made it to the server, so if the request fails for any reason, it fails silently.
There are other advantages and disadvantages to image beacons depending on how you use them.
In the case of a search engine using them to track clicks, a major advantage is that the performance cost (to the user) of an image beacon is much lower than the performance cost of using redirect-based tracking. The tradeoff is that beacons are less reliable than redirect tracking, since users may not have JS enabled.
Also, with click beaconing, there's a race between the beacon request and the navigation event; you fire the beacon when the user clicks, but there's no guarantee that the request will finish before the browser switches navigation contexts, unloads the current page, and cancels all pending requests. An image beacon is more likely to succeed in this case than an Ajax request, since there's more overhead associated with Ajax requests.
All the major search engines use image beacons for tracking to some extent, but Google and Bing use them more than Yahoo! currently does.
Imagine that you want your web page to send a message "gphil clicked this link X" back to the server, but you're only allowed to request information, not gather it. The work-around that we use in web analytics, is that we request an image named "link-clicked.gif?dude=gphil&link=X." The query parameters are built dynamically with JavaScript and the image request is added as an on-click call on the link. The server is configured to accept this request and parse and log the data from the query parameters, and meanwhile returns a .gif image consisting of a single transparent pixel. This script apparently doesn't even render the pixel, it just stores it somewhere.
Advanced techniques include noscript fallbacks and adding a timestamp to prevent client or server caching from messing with your data collections.
Keep in mind, because the image involves an http get request, the host of said transparent dot can also dump a cookie on you; this is how a lot of advertising agencies track conversions for cost-per-action ads. They tend to drop them for cost-per-click ads too, just to be extra annoying :)
No idea what pixel-tagging is but it seems they use javascript to load an image. The url of the image tells Google which link has been clicked on. There's some extra information in the url as well.
I think it is just an invisible 1x1 image on your website, that is being served from Google. So everytime your web site loads, google gets a request for that pixel, including cookies and referrer.
As described here, I think they just trigger image loading from JavaScript to transfer information to the server.
Did this just change or something? Earlier today I did a search and copied the URL and it was something like http://www.google.com/url?url=http%3A%2F%2F... But just now when I tried to duplicate it, I didn't get that. Weird.
<code> var score = byId('score_' + item); var newscore = parseInt(score.innerHTML) + (v[0] == 'up' ? 1 : -1); score.innerHTML = newscore + (newscore == 1 ? ' point' : ' points');
</code>