
What is Event Tracking ?
By default 123Count measures the traffic on all pages that contain the 123Count code. This works great most of the time but there are a few cases when this is not enough :
How does it work ?
In the cases above we are trying to detect the loading of documents on which the 123Count code can not be added (either because the document is not an HTML file, or because it is outside of our control). Since we can not add the code to the document we can not directly detect its loading in the visitor browser, however what we can still do is detect the click on a link to that document. 'Event Tracking' is the ability to record that click, as opposed to the default behavior of 123Count which detects page loads. So basically we are now detecting clicks towards a target file as opposed to the actual loading of that file.
So, to give an example : if your visitor sees a link on your site that says 'Listen to My Music' and clicks on that link, 123Count will detect the click and show a 'page view' for the music file.
Use Event Tracking on your site
Let's take two examples : in the first you want to measure the download of an MP3 file on your site (the same principle would apply for any kind of file download). In the second example you want to track the click-paths and page views inside a pure Flash web site (examples are given for both versions 2 and 3 of Action Script).
example 1 : MP3 file
Configuring a link for detection is a simple matter of editing the HTML '<a href...' code for that link and adding a new parameter to it. Let's assume that you have a link on your page that people click on if they want to download (or listen to) an MP3 music file. Right now your HTML link to that MP3 file looks like this :
<a href="/my_music.mp3">Listen to My Music</a>
To enable Event Tracking for the link, simply modify it like this :
<a href="/my_music.mp3"
onClick="javascript:wtslog('al####','#','http','my_music','event_track');">
Listen to My Music</a>
Anyone clicking on the link will now generate a page view in your stats for a page named my_music. This will appear in the click paths reports and in the page views report.
Note 1 : the string al#### is only an example. In reality it MUST be replaced by a code specific to your account. See the bottom of this page for further instructions.
Note 2 : the string my_music can be anything you wish : whatever you use in its place will be used to identify the click on the link inside the stats.
example 2 : Flash site
For a Flash site the syntax is a bit different but it works the same way :
Action Script 2
on (release) {
loadMovieNum("flash_file.swf", 1);
unloadMovieNum(2);
getURL("javascript:wtslog('al####','#','http','custom_name','event_track');");
}
Action Script 3
myMovie.addEventListener(MouseEvent.CLICK, myListener);
function myListener:void {
var jscommand:String = "wtslog('al####','#','http','custom_name','event_track');";
var request:URLRequest = new URLRequest("javascript:" + jscommand + " void(0);");
navigateToURL(request, '_blank');
}
Anyone clicking on the link will now generate a page view in your stats for a page named custom_name. This will appear in the click paths reports and in the page views report.
Note 1 : the string al#### is only an example. In reality it MUST be replaced by a code specific to your account. See the bottom of this page for further instructions.
Note 2 : the string custom_name can be anything you wish : whatever you use in its place will be used to identify the click on the link inside the stats.
As you can see, all you need to do is add the 'OnClick' element in red inside the link that you want to track (or the 'getURL' element for a Flash site) and 123Count will take care of the rest.
Important ! two things are needed for this to work :
Get the Event Tracking code for your account
You are now ready to start using Event Tracking on your site. Please enter your login information below and we'll show you the exact code to use on your site
| Copyright © 1998-2009 Web Tracking Services, LLC All rights reserved |
Cloud - classic version |
revenue sharing |
affiliate login |
contact us |
site map
|