3 Month Free Trial!
Join Now

ServerOwl™ How to Track in Page Download or Out Link Events?

Last modified: March 23, 2019

Similar to Google Analytics or Facebook Pixel, ServerOwl is able to track in page events such as file downloads or out link events. These events can be tracked by creating either a Campaign or Property for your Account or Campaign, and then use the onclick event on a html link:-

<a href="www.google.com" target="_blank" onclick="if(sat!=void 0)sat('tp','outlink');">visit Google</a>

It is suggested to use a Property to track events on your page, as ServerOwl supports multiple Property events per page, and multiple calls to the same event per page. This means if using a Property to track an out link, then the browser clicks the link twice, then the Property will be record as 2.

In the above example, the HTML link changes the target of the out link to a new tab or window. This is required as changing the location of the current page will prevent any ajax call to ServerOwl, and the browser will cancel the request before it's able to complete. If your link is instead going to download a non-HTML file, such as a Word Document (*.docx), then this will naturally open a new application as the browser will not be able to support it and the required for a _blank target is no longer needed.

There are other page events you can use in a similar method. Such as a timer event that is triggered once a video is played over a certain time span, or if the reader scrolls down past a point in the page. All you need to do is create a JavaScript event that is trigged at the point you want to track, and make the call to ServerOwl embedded library. This is normally done with the global function sat(<parameter name>,<parameter value>);

← Back to FAQs

Comments (0)