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.
Source Distribution
Built Distribution
File details
Details for the file django-google-analytics-id-1.0.1.zip
.
File metadata
- Download URL: django-google-analytics-id-1.0.1.zip
- Upload date:
- Size: 8.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0c360b8b9d7a26e43fed250557172a94ae87748eddd9c2d145845aa3051e5603 |
|
MD5 | 71e2662880e7237c683cdc5889ec3bf8 |
|
BLAKE2b-256 | 96bfbf96d3a6c4a07e4f9bb44ce474088e43105ff63d2fc1d2a1b0c687420499 |
File details
Details for the file django_google_analytics_id-1.0.1-py2.7.egg
.
File metadata
- Download URL: django_google_analytics_id-1.0.1-py2.7.egg
- Upload date:
- Size: 8.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 48f34ba9b6509057e52d131161ef8a21868943e0bbd296b7398f141d4aa5fec5 |
|
MD5 | 72833c227919b1dc9cf51a123370bca7 |
|
BLAKE2b-256 | 24041e2425f67991a142aba605c3b6dd051b4dfc04b40c839e04421c3654dc62 |