=======================
Django template tag app for inserting google analytic code on a per
site basis.
Copyright (C) 2011 Benjamin Wilbur
License
-------
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
* This codes underlying structure is largely based off Django's
documentation at the following url.
http://docs.djangoproject.com/en/dev/howto/custom-template-tags/
Installation
------------
1. `pip install django_google_analytics`
1. Ensure you have sites configured. https://docs.djangoproject.com/en/1.8/ref/contrib/sites/#enabling-the-sites-framework
1. add `analytics` to your `INSTALLED_APPS`
1. `python manage.py migrate`
1. In the django admin interface visit the "Sites"
page and add your google web property id for the site you
wish to track.
1. Add the following to your desired templates.
`{% load analytics %}`
1. at the very bottom of your head section add this
`{% analytics %}`
1. if you want to avoid counting logged in user visits
surround the above line with the following
`{% if not user.is_staff %}`
`{% endif %}`
1. Go to your google analytics control panel and refresh
frantically to see if it is working
Metadata
Release files for django_google_analytics 2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| django_google_analytics-2.tar.gz | 3.3 kB | Without provenance | Details |
Release files / django_google_analytics-2.tar.gz
| Download URL | django_google_analytics-2.tar.gz |
|---|---|
| Size | 3.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0996f519fc04bb2efaa218ce7738c751a676f40f7ddba235eefacfbdf0f5bb74
|
|
BLAKE2b-256 checksum How to use checksums |
1f5991021e585ef530ef80d34a4e4d05df6e993f5f060ee6c253cbc6041be8af
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for django_google_analytics 2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.