Web-Stat for Wix
Event Tracking
What is Event Tracking?
By default Web-Stat measures the traffic on all pages that contain the Web-Stat 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 app 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 app 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 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 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
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:
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> var wtsh = {}; wtsh['invisible']='yes'; wtsh['custom']='wix'; var wts=document.createElement('script'); wts.type='text/javascript';wts.async=true; wts.src='https://app.ardalio.com/log7.js'; document.getElementById('wts').appendChild(wts); </script>
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).
Replace https://www.target_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 CONV_NUMBER by a conversion number (1, 2, 3, 4, or 5) if you want the click to generate a conversion. Leave empty if not
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.