django-analytical
Analytics service integration for Django projects
What it is and what it does
django-analytical is a Django application that centralizes the integration of third-party analytics services—such as Google Analytics, Mixpanel, Hotjar, and many others—into your project. Instead of manually adding service-specific JavaScript tracking code to templates and scattering configuration across your codebase, you configure each service once in Django settings and use simple template tags to inject the tracking code. The package abstracts away the differences between services, using asynchronous JavaScript where possible and keeping sensitive identifiers out of templates.
The package supports a large roster of analytics and monitoring services, from traffic analysis tools like Google Analytics and Clicky to user feedback platforms like Hotjar and UserVoice, as well as A/B testing and conversion tracking services. It's designed for developers who want a clean, maintainable way to manage analytics across a Django project without duplicating boilerplate or hardcoding credentials in templates.
Use it for:
- Add Google Analytics tracking to a Django site without manually embedding the tracking snippet in every template.
- Switch between multiple analytics providers (e.g., from Google Analytics to Matomo) by changing settings rather than rewriting templates.
- Centralize analytics configuration so credentials and service IDs are managed in one place, not scattered across template files.
- Integrate user feedback tools like Hotjar or UserVoice alongside traffic analytics in a single, unified setup.
- Enable or disable analytics services per environment (development, staging, production) via Django settings.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Integrates multiple third-party analytics services into Django projects through a unified template interface, eliminating the need to manually embed service-specific tracking code.
Yes. The package is actively maintained, has no known vulnerabilities, supports current Python and Django versions, and solves a real problem—keeping analytics configuration clean and maintainable in Django projects. The single dependency on django and low install friction make it a low-risk addition. Use it if you need to integrate multiple analytics services or want to keep tracking code out of your templates.
Install
django-analytical on PyPI
pip
pip install django-analyticaluv
uv add django-analyticalpoetry
poetry add django-analyticalInstalling django-analytical
Before you install
Low friction install with a single runtime dependency on django. Active maintenance with recent commits and a stable production release status. Supports current Python versions (3.9–3.13) and recent Django versions (4.2, 5.1, 5.2).
License in practice
MIT license permits unrestricted use, modification, and distribution in both open-source and commercial projects with minimal restrictions.
Quickstart
pip install django-analytical
# In Django settings.py, add to INSTALLED_APPS:
# 'analytical'
# In a template:
{% load analytical %}
{% google_analytics %}
# Configure your analytics service ID in settings.py:
ANALYTICAL_GOOGLE_ANALYTICS_PROPERTY_ID = 'UA-XXXXX-Y'
Requires Django to be installed and configured; analytics service credentials must be set in Django settings before template tags will output tracking code.
Verify before relying
- Whether all listed analytics services (Chartbeat, Clickmap, Clicky, etc.) are actively maintained or if some integrations are deprecated.
- Performance impact of loading multiple analytics service integrations when only a subset are enabled.
- Whether the package handles analytics service API changes automatically or requires manual updates.
Package facts
| License | MIT (permissive) |
| Python support | supports the current Python release (>=3.9) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 1 — django |
| Maintenance | actively maintained — 400 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 93,008/month — #13,408 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: django_analytical-3.2.0-py3-none-any.whl
Keywords: django, analytics
Tags
More Python Modules packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
PyYAMLPyYAML parses and emits YAML 1.1 data format,…
permissive · top 100 on PyPI
pydanticPydantic validates Python data structures…
permissive · top 100 on PyPI
annotated-typesProvides reusable metadata objects for use with…
permissive · top 100 on PyPI
typing-inspectionProvides runtime tools to inspect and…
permissive · top 100 on PyPI
django-invitationsProvides a generic invitation system for Django…
copyleft · top 15,000 on PyPI
django-noseIntegrates the nose test runner into Django's…
permissive · top 15,000 on PyPI
django-graphiql-debug-toolbarIntegrates Django Debug Toolbar into the…
permissive · top 15,000 on PyPI
universal-analytics-python3Sends event and pageview data to Google…
permissive · top 15,000 on PyPI
django-embed-videoProvides Django template tags and model fields…
permissive · top 15,000 on PyPI
sphinxcontrib-googleanalyticsAdds Google Analytics tracking to…
permissive · top 15,000 on PyPI
django-taggitAdds simple tagging functionality to Django…
permissive · top 5,000 on PyPI
analytics-pythonA Python client library that sends analytics…
permissive · top 5,000 on PyPI
django-clickhouseIntegrates Django applications with ClickHouse,…
permissive · top 15,000 on PyPI
segment-analytics-pythonA Python client for sending analytics events to…
permissive · top 5,000 on PyPI