Track outbound clicks without Javascript?
September 6, 2008 3:26 PM   RSS feed for this thread Subscribe

How can I track outbound clicks without Javascript and without robbing my linkees of linkjuice?

(Actually, I hate the word "linkjuice.")

On some of my sites, I use a cgi redirect to track clicks on outbound links. I want to know which of the links on my site are most useful to people. This results in links that look like:

http://www.mysite.com/counter.cgi?http://www.coolothersite.com/interestingpage.html

However, I assume this robs the sites I'm linking to of any Google boost they'd get from my links, which seems sad and unfortunate to me. I think they're useful sites; I'd Google to know that.

However, I don't want to use Javascript or anything that a user could have disabled, because I want to capture ALL clicks. This eliminates outbound link tracking via Google Analytics (which uses Javascript) and most other approaches I've read about.

Is there a good way to track all outbound clicks without basically pointing back to myself?
posted by kristi to computers & internet (6 comments total)
Unless there's a specific reason why every click is sacred, I'd go with JavaScript; you can always extrapolate the figures based on stats for how many visitors don't have JS enabled, boosting your hits by a couple of percent.
Using a CGI redirect for all outbound links just seems unnecessarily messy and against the spirit of the web, whether or not it affects SEO (not sure if a permanent redirect would retain the SEO benefits, probably not if it's cross-domain) and there isn't another option.
posted by malevolent at 4:29 PM on September 6, 2008


Not really. Search engines in general only understand ordinary links, but ordinary links can obviously be got to by the user, and trying to do anything overly clever will make it look like you're trying to abuse how the search engine works and might get you blacklisted.

It's worth adding that it's possible that modern search engines may already successfully interpret the intentions of your current gateway page having been engineered for them.
posted by HaloMan at 4:32 PM on September 6, 2008


You could try a 3xx redirect. Search engines should interpret it correctly, and you can then just parse your httpd logs to get the stats you need.
posted by -1 at 4:47 PM on September 6, 2008


While it's certainly cumbersome, I think the only way you can really do this is using an HTML "noscript" tag to allow search engines to see the real link, while Javascript enabled browsers are tracked.

That means you'll lose tracking on folks who disable javascript... but you'd have lost that anyway.

The only other way around it is a redirect like you have.... one way or the other, you've got to force the client's browser to tell you (or somebody) that they've clicked an outbound link... and those are the only two ways to do it that I've ever heard of.
posted by twiggy at 6:46 PM on September 6, 2008


Use Javascript. Quite seriously, if it's good enough for Google to track web activity then it's good enough for the rest of us.
posted by DWRoelands at 4:25 AM on September 7, 2008


twiggy: That's not necessary, he can have regular links and override their actions (or trigger an extra request to a URL that records clicked links) with javascript with the same effect.
posted by qvtqht at 5:51 AM on September 9, 2008


« Older My 4 year old has cold sores i...   |   I think Hurricane Gustav kille... Newer »
This thread is closed to new comments.