View Single Post
Old 2009-05-30, 03:54 PM   #1
tickler
If there is nobody out there, that's a lot of real estate going to waste!
 
tickler's Avatar
 
Join Date: Dec 2003
Posts: 2,177
Using HTTP 204 header for click tracking

I ran into this tidbit & was wondering if Sparky or somebody could tell me if it would be an easy way to do click tracking without using an out.php? on my links.

I'm also wondering whether it might work better with the spiders for SEO purposes as the actual href looks cleaner.

Quote:
Some reading up reveals that the HTTP 204 header is intended to be used for such things... It's essentially a request that gets sent almost in the background without the user necessarily knowing it, and the user is left exactly where they are when given a 204.

From my understanding, what's actually happening in the Google code is:
1) User clicks link.
2) Because onclick is executed before href is visited, code is executed, with HTTP request sent to Google for tracking and an HTTP 204 response is given.
3) Because of the 204 response (and because the javascript doesn't return false), the browser does not redirect anywhere and continues to execute the click event, the next step of which is visiting the href i.e the listing.

So the two request don't happen in parallel. The tracking is done directly before the visit to the site.
http://www.webmasterworld.com/google/3918680.htm
__________________
Latina Twins, Solo, NN, Hardcore
Latin Teen Cash
tickler is offline   Reply With Quote