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. 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.3.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1e81fb5296f84f198ccfe97bb4b9e9a4964cf33bc96a07cafc66b3550a350eae |
|
MD5 | c38ad2ef180520c31cb527f2e19e6821 |
|
BLAKE2b-256 | ca5992019b99361e8adc3e74941193c2d1cea401bae82f396fb04f5e487beb73 |
Close
Hashes for django_simple_plausible-0.0.3-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0f2d6df07036aa8b21ff021a3d08184ca7402b6bf64ca2369705445872a95727 |
|
MD5 | 025c8e49c01b10fa0a19ef66954e213d |
|
BLAKE2b-256 | 255c9836f762f7d4366a660541d9ac988c5be753302339a2518edfbb98f0ac39 |