Django Plugin
Want privacy friendly analytics for Django? You're at the right place.
You need an account on Simple Analytics to see your stats collected by this plugin.
Installing it
Install the plugin:
pip install simpleanalytics
Using it
Add the package to the INSTALLED_APPS:
INSTALLED_APPS = [
...,
simpleanalytics,
]
Next use the templatetag in your template:
<!DOCTYPE html>
{% load static simpleanalytics_tags %}
<html>
<head>
<meta charset="utf-8">
<title>{% block page_title %}{{ site.name }}{% endblock %}</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
...
{% simpleanalytics_sync %}
...
</head>
</html>
This will translate to roughly this:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>brwnppr.com</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
...
<script type="text/javascript" src="https://scripts.simpleanalyticscdn.com/latest.js"></script>
...
</head>
</html>
More
This app has four templatetags:
- simpleanalytics_sync
- simpleanalytics_async
simpleanalytics_sync converts to a plain <script> tag without the async
keyword.
simpleanalytics_async converts to a plain <script> tag with the async
keyword.
Compatibility
Tested on Django 2.2, but we think this should run on any recent Django deployment. Please raise an issue when it doesn't.
Metadata
Release files for simpleanalytics 1.0.8
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 |
|---|---|---|---|---|
| simpleanalytics-1.0.8.tar.gz | 3.3 kB | Without provenance | Details for simpleanalytics-1.0.8.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| simpleanalytics-1.0.8-py3-none-any.whl | Python 3 | none | any | Details for simpleanalytics-1.0.8-py3-none-any.whl |
Total release size: 7.8 kB
Release files / simpleanalytics-1.0.8.tar.gz
| Download URL | simpleanalytics-1.0.8.tar.gz |
|---|---|
| Size | 3.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5f5bf8dd862036d385c759c8fdb6bae8318fc4393b62dc31d04a74a33d97cc84
|
|
BLAKE2b-256 checksum How to use checksums |
5977bc797953d01fcbff9450715a39a73ef1803a2927e5bced67bd46f36268c6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.25
|
Release files / simpleanalytics-1.0.8-py3-none-any.whl
| Download URL | simpleanalytics-1.0.8-py3-none-any.whl |
|---|---|
| Size | 4.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
fe5d595ba65fe14c33ddd5d81e577af06a3d2318769860ea6368127a1e530aa6
|
|
BLAKE2b-256 checksum How to use checksums |
df89e4e9af75a64158f726d3a8a7b17f3f9fd5621a2f1ae9d96dd1a34754902c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.25
|
Security for simpleanalytics 1.0.8
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.