Web-Stat for Wix

Event Tracking

What is Event Tracking?

By default Web-Stat for Wix measures the traffic on all pages that contain the Web-Stat for Wix app. This works great 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 for Wix app so the loading of these files can not be tracked directly. Web-Stat for Wix'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 for Wix app on the target site to measure the page views, you need an alternate solution. Web-Stat for Wix'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 for Wix app 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's 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 for Wix 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 for Wix will detect the click and show a 'page view' for the music file.

Use Event Tracking on your site

The link that you want to track needs to be configured manually using an HTML iFrame app available in the Wix App Market. Here are step-by-step instructions to create a tracked link:

  1. add an HTML iFrame element with the Event Tracking code in it:

    • in your Wix editor go to 'Add (+ sign in left menu bar) > More > HTML iframe

    • copy and paste the code below in the HTML area

      <span id="wts"></span>
      <script async type="text/javascript">
      var wtsh = {};
      wtsh['invisible']='yes';
      wtsh['custom']='wix';
      var wts=document.createElement('script');
      wts.type='text/javascript';wts.async=true;
      wts.src='https://server2.web-stat.com/1/1/log6.js';
      document.getElementById('wts').appendChild(wts);
      </script>
      

  2. create a link to the destination file or URL:

    • In the same HTML area, copy and paste the code below (under the code you just added).

      <a href="http://www.some_URL.com"
      onClick="return wtslog6('my_id','my_db',this,'EVENT_NAME','','yes');">
      CLICK HERE
      </a>
      
    • Replace my_id by the id for your account (contact us for this)

    • Replace my_db by the db number for your account (contact us for this)

    • Replace www.some_URL.com by the actual target URL for your link

    • Replace EVENT_NAME by the name you want the stats to use to describe a click on this link

    • Replace CLICK HERE by the link text (or image) you wish to use

    • Click on 'Update'

Anyone clicking on the link will now generate a page view in your stats for a page named EVENT_NAME. This will appear in the click paths reports and in the page views report.

Note: event tracking requires that your App be at the premium level. Click here for instructions on how to upgrade.


Useful Links


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