Django

Django renders every page on the server, so the snippet goes in your base template’s <head> once and loads on every page that extends it. Each navigation is a full page load, so visits are tracked with nothing extra.

1. Get your snippet

Each site has its own snippet with a unique script URL. Copy the exact one from your dashboard’s Install step, with your site’s ID in place of wa-XXXXXXXX.

2. Add it to your base template

Paste the snippet into the <head> of your base template (for example templates/base.html), outside any {% block %} so it stays on every page:

{# templates/base.html #}
<head>
  {# …your existing tags… #}

  <!-- Privacy-friendly analytics by Wazlytics -->
  <script async src="https://wazlytics.com/js/wa-XXXXXXXX.js"></script>
  <script>
    window.wazlytics = window.wazlytics || function(){(wazlytics.q = wazlytics.q || []).push(arguments)};
    wazlytics.init = wazlytics.init || function(o){ wazlytics.o = o || {} };
    wazlytics.init()
  </script>
</head>

Tip

To keep local development out of your stats, gate the snippet on settings.DEBUG. Django doesn’t expose DEBUG to templates by default, so add a tiny context processor and register it in your TEMPLATES settings:
# context_processors.py
from django.conf import settings

def debug_flag(request):
    return {"debug": settings.DEBUG}
Then wrap the snippet so it only renders in production:
{% if not debug %}
  {# Wazlytics snippet #}
{% endif %}

Verify

Run or deploy your app, open Realtime in Wazlytics, and load a page — your visit should appear within a few seconds. If nothing shows up, the troubleshooting guide covers the usual causes.