Install Analytise on Django
Add the snippet to your base template so every page inherits it.
Add it to base.html
- Open your base template — typically
templates/base.html. - Paste the snippet inside the
<head>(or yourextra_headblock). - Restart the server and reload the page.
{# templates/base.html #}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>{% block title %}My site{% endblock %}</title>
<script
defer
data-domain="yourwebsite.com"
data-site-id="YOUR_SITE_ID"
src="https://www.analytise.com/js/tracker.js">
</script>
{% block extra_head %}{% endblock %}
</head>
<body>
{% block content %}{% endblock %}
</body>
</html>Verify it works
- Open your website in a new tab.
- The dashboard shows your visit under
onlinewithin a few seconds (live visitors update every ~15s). - Nothing showing? See Troubleshooting.
Next guide
Ghost