Skip to main content

Django application to add your Google analytics code to your website template(s)

Project description

Google analytics for django

This an installable django application to add your Google analytics code to your website template(s). It is compatible with Django 1.8, 1.9 and 1.10.

Python 2.7 and python 3.5 are supported.


pip install django-google-analytics-id

add analytics to INSTALLED_APPS


Load template tag {% load analytics_tags %}

Add {% google_analytics ‘UA-123-1’ %} to your base template (in <HEAD> section).

You can also pass the name of an option from setting.

GOOGLE_ANALYTICS_ID = ‘UA-123-1’ {% google_analytics ‘GOOGLE_ANALYTICS_ID’ %}

if no parameter is provided, settings.GOOGLE_ANALYTICS_ID as default value


DISABLE_GOOGLE_ANALYTICS, bool If true, {% google_analytics %} will return empty string. Can be used to enable google analytics in development and/or qa environments

Bugs and requests

If you have found a bug or if you have a request for additional functionality, please use the issue tracker on GitHub.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for django-google-analytics-id, version 1.0.1
Filename, size File type Python version Upload date Hashes
Filename, size django_google_analytics_id-1.0.1-py2.7.egg (8.0 kB) File type Egg Python version 2.7 Upload date Hashes View
Filename, size (8.0 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page