Event Tracking
Monitor file downloads, and banner or exit clicks
What is Event Tracking?
By default Web-Stat measures the traffic on all pages that contain the Web-Stat tracking code. This works perfectly well most of the time, but there are a two important 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 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
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.
What are the requirements ?
In order to use Event Tracking, you need to have a account or above. If necessary you can upgrade here.
How do I implement Event Tracking
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 clicks to an outside web site.
Example 1: track the downloads of an 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:
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 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.
Note 2: the conversion number is optional. Use it if the click on the link constitutes a conversion. It must be a number between 1 and 5.
Example 2: track a link to an outside site
In this case we start with a link like this:
<a href="http://www.some_site.com/some_page.html">Go to SomeSite</a>
To enable Event Tracking for the link, simply modify it like this:
Anyone clicking on the link will now generate a page view in your stats for a page named click_to_somesite. This will appear in the click paths reports and in the page views report.
Note 1: the string click_to_somesite can be anything you wish: whatever you use in its place will be used to identify the click on the link inside the stats.
Note 2: the conversion number is optional. Use it if the click on the link constitutes a conversion. It must be a number between 1 and 5.
As you can see, all you need to do is add the onClick="..." element inside the link that you want to track and Web-Stat will take care of the rest.
Need help? Have questions? Write to us and we'll get right back to you!