Parker Software Ltd Homepage
Forum Home Forum Home > WhosOn Visitor Tracking & Live Chat > Hosted Service
  New Posts New Posts RSS Feed: Tracking Downloads, Outgoing Clicks etc
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

Tracking Downloads, Outgoing Clicks etc - Event Date: 28 Aug 2006 - 29 Aug 2006

 Post Reply Post Reply
Author
Message
Stephen View Drop Down
Admin Group
Admin Group
Avatar

Joined: 21 Oct 2005
Location: Stoke on Trent
Posts: 1415
Post Options Post Options   Quote Stephen Quote  Post ReplyReply Direct Link To This Post Calendar Event: Tracking Downloads, Outgoing Clicks etc
    Posted: 28 Aug 2006 at 10:05am
If you are using the WhosOn Gateway to track visitors via the embedded page tags, you can still use WhosOn to track downloads (PDFs, EXEs etc) and outgoing clicks. In fact any page event can be tracked.

This is done using a version of the WhosOn Tracking Code, which sends an event back to the WhosOn server without displaying any image.

It can be included on pages along with the normal tracking code.

Download the script here:
http://www.whoson.com/scripts/whoson_call.js

Save it to the root of your site. Include it on your page like this:

<script language="javascript" src="/whoson_call.js"></script>

Then simply call it on the 'onclick' event of any page element, for example:

<A href="myfile.exe" onclick="javascript:writeWhosOn('gateway','domain','myfile.exe');">Click To Download</a>

Replace 'gateway' with the name of your Whoson Gateway (email us if you dont know your Gateway name) and 'domain' with the domain name of the site being monitored in WhosOn. The WhosOn gateway that you are using will be shown in the existing tracking code - look at the 'var sWOGateway = ' line.

The last parameter is the filename/pagename or event name that you want to appear in WhosOn when the element is tracked.

For Example:

<A href="myfile.exe" onclick="javascript:writeWhosOn('gateway21.whoson.com','www.mysite.com','myfile.exe');">Click To Download</a>

For some more examples of tracking page events, see:
http://www.whoson.com/test.htm
Back to Top
Patzer View Drop Down
New User
New User


Joined: 29 Aug 2006
Posts: 1
Post Options Post Options   Quote Patzer Quote  Post ReplyReply Direct Link To This Post Posted: 29 Aug 2006 at 12:50am
That looks great for tracking clicks on download link and leaving the site, however when it comes to Adsense you may not alter the code in any way, that includes adding Javascript to the Adsense code itself. To Track Adsense via Google Analytics I include a script that I found on another site at the end of my page. How could I alter this script to have Whos on track the same activity. Thanks. -Mike This is the script I use to have analytics track Adsense: <script type="text/javascript"> function adsense_click() { if(window.status.indexOf('go to') == 0) { urchinTracker ('/AdSenseClick'); } } var elements; if(document.getElementsByTagName) { elements = document.body.getElementsByTagName("IFRAME"); } else if (document.body.all) { elements = document.body.all.tags("IFRAME"); } else { elements = Array(); } for(var i = 0; i < elements.length; i++) { if(elements[i].src.indexOf('googlesyndication.com') > -1) { elements[i].onfocus = adsense_click; } } </script>
Back to Top
Stephen View Drop Down
Admin Group
Admin Group
Avatar

Joined: 21 Oct 2005
Location: Stoke on Trent
Posts: 1415
Post Options Post Options   Quote Stephen Quote  Post ReplyReply Direct Link To This Post Posted: 29 Aug 2006 at 11:09am
Hi, In the Adsense code you just need to add a call to the write_WhosOn function. Under the line: urchinTracker('/AdSenseClick'); Add: write_WhosOn('{gateway}','{yourdomain.com}','AdSenseClick'); Steve
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down



This page was generated in 0.063 seconds.
These are the forums for Parker Software, developers of Live Chat Software: WhosOn and Email Automation Software: Email2DB.