Site Tracker Tag

You can track, measure and validate page views and events on your website in real-time via the client-side TrafficGuard Site Tracker tag.

Overview

The Site Tracker Tag allows you to send data to TrafficGuard from your website. This data, by default includes, user behaviour and session information but the tag can also be configured to send custom events and data to TrafficGuard.

Installing the Tag

To install the tag, copy the code from your property settings and and paste it inside the <head> tag on every page of your site. Preferably as high in the <head> of the page as possible.

Alternate installation methods

The Site Tracker Tag can also be installed via various third party platforms.

Site Tracker Tag Template

<!-- TrafficGuard Start -->
<script>
var dataTrafficGuard = dataTrafficGuard || [];
dataTrafficGuard.push(['property', '{property-id}']);
dataTrafficGuard.push(['event','pageview']);
(function() {
var tg = document.createElement('script'); tg.type = 'text/javascript'; tg.async = true;tg.src = '//tgtag.io/tg.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(tg, s);
})();
</script>
<noscript><img src="//p.tgtag.io/event?property_id={property-id}&event_name=pageview&no_script=1" width="1" height="1" border="0"/></noscript>
<!-- TrafficGuard End-->