corner
min_height_prop
Event Tracking
Monitor file downloads, banner clicks and Flash sites

What is Event Tracking ?

By default Web-Stat measures the traffic on all pages that contain the Web-Stat code. This works great most of the time but there are a few cases when this is not enough :

  • Tracking of multi-media and other files : you can not edit non-HTML documents (like music, videos, PDF, or images) to add the Web-Stat code so the loading of these files can not be tracked directly. Web-Stat's Event Tracking allows you to overcome this limitation

  • Tracking of Flash sites : If your site is built in Flash, the same problem applies and the Web-Stat code can not be installed. Web-Stat's Event Tracking allows you to monitor a Flash site

  • Tracking of clicks leaving your site : some people have ads on their site that lead to pages outside of their control - if you sell banner ads for instance - in a case like this you might want to measure the number of clicks that each banner receives. Since you can not install the Web-Stat code on the target site to measure the page views, you need an alternate solution. Web-Stat's Event Tracking does just that

How does it work ?

In the cases above we are trying to detect the loading of documents on which the Web-Stat 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 Web-Stat 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, Web-Stat 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####','1','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 Web-Stat will take care of the rest.

Important ! two things are needed for this to work :

  1. The standard or advanced version of the Web-Stat code must be installed on the page that contains the link (for a Flash site, simply add the code to the HTML container). The simplified version of the code will not support Event Tracking

  2. The 'OnClick' or 'getURL' element must reflect your account's details. Please enter your user ID and password below and we will display The 'OnClick' element for your account

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


user ID
password



bottom

[ original Web-Stat | revenue sharing | affiliate login | contact us | site map ]

Web-Stat by Web Tracking Services, LLC - 1670 Springdale Plaza - Unit 9, Suite 270 - Camden, SC 29020 - USA