Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

JavaScript Forum


You are currently viewing our JavaScript Forum as a guest. Please register to participate.
Login



Reply
Tracking Outbound Link Clicks with JavaScript
Old 03-23-2006, 02:52 PM Tracking Outbound Link Clicks with JavaScript
Novice Talker

Posts: 7
Location: UK
Trades: 0
I have previously used the JavaScript OnClick method to track outbound link clicks, when I had Urchin (now Google) stats installed on my hosting package.
<a href="http://www.example.com/example.html" onClick="javascript:urchinTracker ('/Outbound/Link1');">Example Link 1</a>

I now have SmarterStats (not out of choice) and wondered if there was an equivalent way of tracking outbound links.

I have looked at many of the examples and previous topics, and don't really understand Javascript, so have not been able to modify any of these. I would appreciate a dummies guide to tracking with javascript.

I can do this with ASP redirects, but do not want to use redirects in this case.

Can I still use an OnClick type event. Is there also a way, using Javascript to track clicks that will also write the information to an Microsoft Access database?

Thanks
Graham T is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 03-23-2006, 05:26 PM Re: Tracking Outbound Link Clicks with JavaScript
chrishirst's Avatar
Missing! presumed drunk.

Posts: 41,528
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
Quote:
Can I still use an OnClick type event. Is there also a way, using Javascript to track clicks that will also write the information to an Microsoft Access database?
Nope, not directly. javascript is client side so cannot "talk" to the database directly.

You would need to use the javascript XMLHTTP object ( now suddenly popular as AJAX ) and create a request to a ASP page with the DB function on. Problem here of course is that the XMLHTTP Object is different in each browser
So you need a browser sniffer and code for each browser, personally the jump link and asp redirect is much simpler.
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- I SEO the only industry where all the cowboys are Indians?
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 03-24-2006, 09:15 AM Re: Tracking Outbound Link Clicks with JavaScript
Novice Talker

Posts: 7
Location: UK
Trades: 0
Chris

Thanks for the reply.

I'll have to investigate further, as it is a little beyond my knowledge....!

Graham
Graham T is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Tracking Outbound Link Clicks with JavaScript
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.11560 seconds with 12 queries