Registry / analytics / django-analytical

django-analytical

JSON →
library3.2.0pypypiunverified

A Django application for integrating analytics services (Google Analytics, Mixpanel, etc.) with minimal configuration. Current version: 3.2.0 (released 2024). Active development under Jazzband.

pip install django-analytical
INSTALL
IMPORT
SIG · DJANGO-ANALYTICAL
D
django-analytical
analyticspythonv3.2.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Analytical
from analytical import Analytical
from analytical import Analytical

Add 'analytical' to INSTALLED_APPS and configure analytics providers in settings. Then include {% analytical %} template tag in your base template.

INSTALLED_APPS = [ ... 'analytical', ] ANALYTICS = { 'google_analytics': { 'tracking_id': os.environ.get('GA_TRACKING_ID', ''), }, }
Debug
Known issues
breakingVersion 3.0 changed the configuration format from individual settings (e.g., GOOGLE_ANALYTICS_PROPERTY_ID) to a unified ANALYTICS dict. Old settings are ignored.
fix
Migrate to using the ANALYTICS dict as described in the documentation.
affects: <3.0
deprecatedThe template tag {% google_analytics %} is deprecated in favor of {% analytical %} which auto-detects configured providers.
fix
Replace {% google_analytics %} with {% analytical %}.
affects: >=2.0
gotchaIf you forget to run collectstatic after adding analytical, the template tag may fail silently. Static files are required for some analytics scripts.
fix
Run python manage.py collectstatic after installation.
affects: all
gotchaThe {% analytical %} template tag must be placed in the <head> section, not at the bottom, for proper loading.
fix
Ensure the tag is inside <head> and before closing </head>.
affects: all
Upgrade
Version history
3.2.0latest on PyPI · released Jul 10, 2025
Audit
Dependencies
djangorequiredRequired dependency for Django integration.
Agent activity
40 hits · last 30 days
node
36
OpenAI (training)
1
Resources
django-analytical — pip install django-analytical · libregistry