Template tag to install your Google Tag Manager account in your templates (http://www.google.com/tagmanager/)
## Installation and Usage
run pip install django-google-tag-manager
add ‘gtm’ to your INSTALLED_APPS setting.
set GOOGLE_TAG_ID to your Google Tag Container Id. It should look something like GTM_XXXXXX
In your templates (probably in your base template) you {% load gtm_tags %} and then add {% gtm_head %} to your <head> and add {% gtm_body %} just below your <body> opening tag.
Profit
That’s it for the most part. If for any reason you want to override the templates used to render the tags, they are called gtm/gtm_head.html and gtm/gtm_body.html.
Optionally, you can pass the google tag id as a parameter to the templatetag like this:
{% gtm_head “GTM-ABC123” %}
and
{% gtm_body “GTM-ABC123” %}
For backwards compatibility you can still use the single {% gtm %} tag just below your <body> opening tag. This will output both the head and body code.
Metadata
Release files for django-google-tag-manager 0.0.5
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 | Actions |
|---|---|---|---|---|
| django-google-tag-manager-0.0.5.tar.gz | 3.5 kB | Without provenance | Details for django-google-tag-manager-0.0.5.tar.gz |
Release files / django-google-tag-manager-0.0.5.tar.gz
| Download URL | django-google-tag-manager-0.0.5.tar.gz |
|---|---|
| Size | 3.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6e79463f9015c1a40cabbcf7f9e1ef3df8026fd5e49dde762eb322cf575222d6
|
|
BLAKE2b-256 checksum How to use checksums |
c2ca9845996cd353a1e75b70892bc38130c56e5cb64dd15a0eed0bc6af5cf32b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.28.1 CPython/3.7.3
|
Security for django-google-tag-manager 0.0.5
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.