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.

Installation

pip install django-google-analytics-id

add analytics to INSTALLED_APPS

Usage

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

Options

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.

https://github.com/Baguage/django-google-analytics-id/issues

Project details


Download files

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

Filename, size & hash SHA256 hash help File type Python version Upload date
django_google_analytics_id-1.0.1-py2.7.egg (8.0 kB) Copy SHA256 hash SHA256 Egg 2.7
django-google-analytics-id-1.0.1.zip (8.0 kB) Copy SHA256 hash SHA256 Source None

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page