Gauges

Tracking Overview

Gauges tracks your website using a simple JavaScript snippet. The snippet uses a few techniques to ensure that tracking does not hinder the experience of your site’s visitors in anyway.

<script type="text/javascript">
  var _gauges = _gauges || [];
  (function() {
    var t   = document.createElement('script');
    t.type  = 'text/javascript';
    t.async = true;
    t.id    = 'gauges-tracker';
    t.setAttribute('data-site-id', 'this is different for each gauge');
    t.src = '//secure.gaug.es/track.js';
    var s = document.getElementsByTagName('script')[0];
    s.parentNode.insertBefore(t, s);
  })();
</script>

Note: Each gauge has its own unique tracking code, so be sure to copy it from the link on the dashboard instead of trying to use the example above.

Single Page Tracking

The tracking script is setup to record each time the page does a full load. If you need to track views in between full loads (perhaps due to AJAX), you can use the following technique anywhere on the page to track another view.

_gauges.push(['track']);

This will force another track of whatever the current url is. In order for this to work, you need to have the latest tracking code, which should look something like the example code in the previous section.