Tracking Basics

The Rangefinder client-side tracking is comprised of a little JavaScript snippet that loads the main tracking code (which does the heavy lifting of gathering and reporting visit information). The snippet will look something like what's below. Note that the number next to 'track' will be different for your site

<script type="text/javascript">
  var _rangefinder_queue = _rangefinder_queue || [];
  _rangefinder_queue.push(['track', 12345]);
  document.write(unescape("%3Cscript src='//rangefinderapp.com/track1.js' type='text/javascript'%3E%3C/script%3E"));
</script>

With server-side tracking

The snippet for server-side tracking is slightly different. The 'track' action will be changed to something like this:

_rangefinder_queue.push(['track', 12345, 67890]);

The second number will be the ID you generated on your server for that visit. Our libraries make handling all this very easy. Check out the server-side tracking documentation page for more information.

With single-page applications

Sending more visits to Rangefinder is very simple. You simply push another 'track' command onto the queue and then flush the queue.

_rangefinder_queue.push(['track', 12345]);
_rangefinder_queue.flush();