skillfed

django-analytical

Analytics service integration for Django projects

django-analytical v3.2.0 93.0K downloads/30d#13,408 on PyPI1,301
Permissive license MIT Active released

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-analytical

uv

uv add django-analytical

poetry

poetry add django-analytical

Installing 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

Development Status :: 5 - Production/StableEnvironment :: Web EnvironmentFramework :: DjangoFramework :: Django :: 4.2Framework :: Django :: 5.1Framework :: Django :: 5.2Intended Audience :: DevelopersOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.9Topic :: Internet :: WWW/HTTPTopic :: Internet :: WWW/HTTP :: Dynamic ContentTopic :: Software Development :: Libraries :: Python Modules

Tags

django analytics integrationgoogle analytics djangoanalytics service wrapperdjango tracking code managementmulti-service analytics djangodjango template analyticsanalytics configuration django
analytics-integrationdjango-middlewaretemplate-tags

More Python Modules packages

idna

Converts domain names between Unicode and…

permissive · top 100 on PyPI

setuptools

Setuptools is a Python build backend and…

permissive · top 100 on PyPI

PyYAML

PyYAML parses and emits YAML 1.1 data format,…

permissive · top 100 on PyPI

pydantic

Pydantic validates Python data structures…

permissive · top 100 on PyPI

annotated-types

Provides reusable metadata objects for use with…

permissive · top 100 on PyPI

typing-inspection

Provides runtime tools to inspect and…

permissive · top 100 on PyPI

django-invitations

Provides a generic invitation system for Django…

copyleft · top 15,000 on PyPI

django-nose

Integrates the nose test runner into Django's…

permissive · top 15,000 on PyPI

django-graphiql-debug-toolbar

Integrates Django Debug Toolbar into the…

permissive · top 15,000 on PyPI

universal-analytics-python3

Sends event and pageview data to Google…

permissive · top 15,000 on PyPI

django-embed-video

Provides Django template tags and model fields…

permissive · top 15,000 on PyPI

sphinxcontrib-googleanalytics

Adds Google Analytics tracking to…

permissive · top 15,000 on PyPI

django-taggit

Adds simple tagging functionality to Django…

permissive · top 5,000 on PyPI

analytics-python

A Python client library that sends analytics…

permissive · top 5,000 on PyPI

django-clickhouse

Integrates Django applications with ClickHouse,…

permissive · top 15,000 on PyPI

segment-analytics-python

A Python client for sending analytics events to…

permissive · top 5,000 on PyPI