A simple Django package to render Plausible Analytics html tag
Reason this release was yanked:
Error in packaging, use >=0.0.3
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. Without these settings, default values for Plausible will be used.
...
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.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8e5f20f6eb93c92a41ac9883f2dbdf58b71b084cd595a20f4796acd4d2072298 |
|
MD5 | 0039dfd6fd3f1fce007048f7b4691599 |
|
BLAKE2b-256 | 5bfec6b49bbd66a9b93ff65c440d6a10b229b68132ba5a3eb617b6ca29a9eda9 |
Close
Hashes for django_simple_plausible-0.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 691312509fb922c5feb64b7ede24eb7d95b359aeda91a9e05981f65676227a25 |
|
MD5 | 527e0d171fb2b6652ebe57e77a59640b |
|
BLAKE2b-256 | 8028573e68b8227927ba2c5b735dada4c2d6a79516246987831b0bf58c7e648b |