homepage Welcome to WebmasterWorld Guest from 54.242.241.20
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / Code, Content, and Presentation / JavaScript and AJAX
Forum Library, Charter, Moderator: open

JavaScript and AJAX Forum

    
Javascript to track clicks
Graham

10+ Year Member



 
Msg#: 5206 posted 9:51 am on Mar 28, 2006 (gmt 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

 

flashfan

10+ Year Member



 
Msg#: 5206 posted 9:11 pm on Mar 28, 2006 (gmt 0)

wrap the onclick event handler as follows

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

Graham

10+ Year Member



 
Msg#: 5206 posted 11:16 am on Mar 29, 2006 (gmt 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

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / JavaScript and AJAX
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved