A simple Django package to render Plausible Analytics html tag
Project description
Django Simple Plausible
A dead simple package to add Plausible Analytics html tag to your HTML. Tested with Python 2.7 and 3.8. Tested with Django 1.11 and 3.2.
Usage
-
Install package:
pip install django_simple_plausible
-
Add
django_simple_plausible
to yourINSTALLED_APPS
in settings.py -
ADD
PLAUSIBLE_SITES
andPLAUSIBLE_SCRIPT_URL
keys and values to your settings.py. Or enter the corresponding values as template tag parameters, as shown below.
...
PLAUSIBLE_SITES = "example.com"
PLAUSIBLE_SCRIPT_URL = "https://example.com/js/plausible.js"
...
- add the following template tags to your site html:
{% load plausible %}
{% plausible %}
Configuring details
- PLAUSIBLE_SITES can be a comma separated list without spaces, if you want to use that feature of Plausible
PLAUSIBLE_SITES = "example.com,yoursite.com"
- Systemwide settings can be overridden giving the template tag some optional parameters:
{% plausible plausible_sites="mysite.com" script_url="https://mysite.com/plausible.js" %}
Project details
Release history Release notifications | RSS feed
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
Close
Hashes for django_simple_plausible-0.0.4.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1c1e6e485069396d28805af8f77b49b37dc7ea117c07ea386d559dca8db9d164 |
|
MD5 | b5b71cdc2e08f3e8e449a5bca99e4670 |
|
BLAKE2b-256 | f115393be57cc8b60d65e6b79e143b8651ffb19df07ed4db2d8cc1ba63b87a9c |
Close
Hashes for django_simple_plausible-0.0.4-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | be806f2d57e9f14d3790c7aa0133da7c0df2c9033340edc422b457e423d40107 |
|
MD5 | 15694275432fa454c1d1570beb9c976c |
|
BLAKE2b-256 | 1756b8541c658027d746f6bb61e6b254bbef8d1eb4a23947baf33c4297ca5ad7 |