Forum Moderators: phranque

Message Too Old, No Replies

best way to click count without upsetting landing site

         

rfung

11:49 pm on Sep 13, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I understand that there are ways to click count outgoing clicks that will create havok with the search engines. I was wondering what the best safe way to count outbound clicks without messing things up. Is a 301 Permanent move the best way? (or is this the way that messes things up?) Advice pls.

gbulmash

9:28 pm on Sep 28, 2006 (gmt 0)

10+ Year Member



Basically, it sounds like you're thinking about how outgoing links are counted by Google and the like to determine popularity/ranking.

Now, I'm no JavaScript or SEO guru, but as far as I know, here's how you could do it:

The search engine spider only looks at the HREF in your link and ignores any JavaScript-based onClick actions. Therefore you have an onClick action that triggers an AJAX-based script. For example, the interior of the tag might be...

A HREF="http://clickthroughurl.com"
onClick="registerClick('clickthroughurl.com');"

The registerClick function stops the user from leaving the page, uses an AJAX routine to slap clickthroughurl.com into your click counting database, get confirmation it was added, and then uses a JavaScript redirect to forward the user on to the intended URL. If your site is reasonably fast and the user has a reasonably fast connection, the lag will be barely noticeable.

The downside... any user who has JavaScript disabled will not have their click counted. Depending on whose stats you believe, this could mean an undercounting of clicks by anywhere from 3-10%.

Cheers,

Greg