Greenguy's Board

Greenguy's Board (http://www.greenguysboard.com/board/index.php)
-   Programming & Scripting (http://www.greenguysboard.com/board/forumdisplay.php?f=15)
-   -   Using HTTP 204 header for click tracking (http://www.greenguysboard.com/board/showthread.php?t=52964)

tickler 2009-05-30 03:54 PM

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

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

cd34 2009-05-30 04:29 PM

It's an old technique. What you might lose out on is surfers with javascript turned off being tracked, but, it does work. Your surfer will still hit the destination, the link looks clean and like a hardlink so google should be happier.

Another tactic people use is to do the actual redirect from javascript anyhow and leave their link looking clean.

There is also the question of most redirect scripts that still hand out 302s which are temporary redirects and potentially scrape your tradesite.

There's a ton of potential drama when dealing with link trades whether internal or external. Eliminating one potential issue seems like a good thing.


All times are GMT -4. The time now is 12:37 PM.

Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
© Greenguy Marketing Inc