Welcome to WebmasterWorld Guest from 54.145.65.62

Forum Moderators: open

Message Too Old, No Replies

Javascript to track clicks

     
9:51 am on Mar 28, 2006 (gmt 0)

Junior Member

10+ Year Member

joined:June 4, 2003
posts:112
votes: 0


Using the Javascript Onclick method, is it possible to track outbound links clicks in the same method that Google does now with Urchin, for example:

<a href="http://www.example.com/example.html" onClick="javascript:urchinTracker ('/Outbound/Link1');">Example Link 1</a>

Where this uses the urchinTracker, can the same thing be done if we don't have Urchin/GA, and can we log the results?

Thanks

9:11 pm on Mar 28, 2006 (gmt 0)

Full Member

10+ Year Member

joined:Feb 24, 2004
posts:219
votes: 0


wrap the onclick event handler as follows

function wrapSomeFun{
Ajax.request('post', 'yourdomain.com/collect', params);
someFunc(args);
}

11:16 am on Mar 29, 2006 (gmt 0)

Junior Member

10+ Year Member

joined:June 4, 2003
posts:112
votes: 0


flashfan

Thanks for the reply.

Unfortunately, I don't know Javascript or Ajax, so it really doesn't mean too much to me.

If it is possible to log outbound link clicks using this method, and passing the information to a database, I will try and find a coder to do this.

Graham