Install on Django
Put the tag in the base template every other template extends, and keep the admin out of your reports.
Django templates inherit from a base. Add the tag once at the top of that inheritance chain.
Where it goes
Open templates/base.html, the template your pages {% extends %}, and paste the tag inside <head>.
<head>
<meta charset="utf-8">
<title>{% block title %}{% endblock %}</title>
<script defer data-website-id="ws_XXXXXXXX" data-domain="yourstartup.com" src="https://statsy.co/js/script.js"></script>
</head>If a template overrides the whole head with a block, make sure the tag sits outside that block, or it disappears on those pages.
Confirm it works
Deploy and open the site, then check Live. The development server on localhost is not counted in production, so test against the deployed domain.
The admin uses a different base
Django’s admin ships with its own templates, so it never picks up your tag, which is usually what you want. If you have overridden admin/base_site.html and inherited the tag by accident, exclude /admin/* under Site settings › Tracking › Excluded paths. Matching traffic is dropped at ingest and never counted or billed. See Exclude your own visits and bots.
Last updated · Markdown version