– Real-time tracking is an easy way to implement real-time tracking for multiple websites.


To start using the integration, you must have installed the django-analytical package and have added the analytical application to INSTALLED_APPS in your project file. See Installation and configuration for details.

Next you need to add the template tag to your templates. This step is only needed if you are not using the generic analytical.* tags. If you are, skip to Configuration.

The Javascript code is inserted into templates using a template tag. Load the gauges template tag library and insert the gauges tag. Because every page that you want to track must have the tag, it is useful to add it to your base template. Insert the tag at the top of the HTML head:

{% load gauges %}
{% gauges %}


Before you can use the integration, you must first set your site id.

Setting the site id gives you a unique site id, and the gauges tag will include it in the rendered Javascript code. You can find your site id by clicking the Tracking Code link when logged into the on the website. A page will display containing HTML code looking like this:

<script type="text/javascript">
  var _gauges = _gauges || [];
  (function() {
    var t   = document.createElement('script');
    t.type  = 'text/javascript';
    t.async = true;    = 'gauges-tracker';
    t.setAttribute('data-site-id', 'XXXXXXXXXXXXXXXXXXXXXXX');
    t.src = '//';
    var s = document.getElementsByTagName('script')[0];
    s.parentNode.insertBefore(t, s);

The code XXXXXXXXXXXXXXXXXXXXXXX is your site id. Set GAUGES_SITE_ID in the project file:


If you do not set an site id, the Javascript code will not be rendered.

Internal IP addresses

Usually you do not want to track clicks from your development or internal IP addresses. By default, if the tags detect that the client comes from any address in the ANALYTICAL_INTERNAL_IPS setting (which is INTERNAL_IPS by default,) the tracking code is commented out. See Identifying authenticated users for important information about detecting the visitor IP address.