Greenguy's Board


Go Back   Greenguy's Board > Programming & Scripting
Register FAQ Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Rate Thread Display Modes
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
Old 2009-05-30, 04:29 PM   #2
cd34
a.k.a. Sparky
 
cd34's Avatar
 
Join Date: Sep 2004
Location: West Palm Beach, FL, USA
Posts: 2,396
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.
__________________
SnapReplay.com a different way to share photos - iPhone & Android
cd34 is offline   Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 11:54 AM.


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