Forum Moderators: open

Message Too Old, No Replies

Comparing Onclick and Onmousedown

         

4specs

3:27 pm on Feb 28, 2007 (gmt 0)

10+ Year Member



Google uses onmousedown to track the clicks from their organic searches.

Google analytics uses onclick to track clicks going to outside websites.

When I ran both on links last year the onclick showed about 5-7% more clickthroughs.

Any ideas as to why there would be a difference? Which is preferred if you wanted to use one or the other to track referrals from the site?

I am using this to avoid a hard-coded 302 redirect script. I currently use a javascript rewrite to rewrite the href to a redirected href and am looking to simplify the code.

Thank you.

Fotiman

4:31 pm on Feb 28, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



My thought is that onmousedown does not garantee that an onclick event will occur on the same target. For example, if you mouse over a link and then press and hold the click button, but then you move off of that link and release the button, the link will not be clicked.

Short answer: use onclick.