From d3e29dc9513e29f2ce0e2fda66d3d0a434ba3a15 Mon Sep 17 00:00:00 2001 From: Florian Haas Date: Sat, 29 Oct 2022 15:08:55 +0200 Subject: [PATCH] Add support for Plausible analytics Introduce a new configuration option, PLAUSIBLE_DOMAIN. If set, include the Plausible (https://plausible.io) analytics script for that domain. Fixes #317. --- README.md | 1 + templates/base.html | 2 ++ templates/partial/plausible.html | 3 +++ 3 files changed, 6 insertions(+) create mode 100644 templates/partial/plausible.html diff --git a/README.md b/README.md index 354dd2b..e51607f 100644 --- a/README.md +++ b/README.md @@ -32,6 +32,7 @@ The minimalist [Pelican](http://blog.getpelican.com/) theme. - [Google Analytics](https://www.google.com/analytics/web/) - [Google Tag Manager](https://www.google.com/tagmanager/) - [Matomo Analytics (formerly Piwik)](https://matomo.org/) +- [Plausible](https://plausible.io/) - [StatusCake](https://www.statuscake.com/) - [Isso](https://posativ.org/isso/) - [Microsoft Clarity](https://clarity.microsoft.com) diff --git a/templates/base.html b/templates/base.html index f81ca30..bcd10b5 100644 --- a/templates/base.html +++ b/templates/base.html @@ -100,6 +100,8 @@ {% include "partial/ga.html" %} {% include "partial/ggst.html" %} + {% include "partial/plausible.html" %} + {% if not PLUGINS or 'seo' not in PLUGINS %} {% if REL_CANONICAL %} {% if page %} diff --git a/templates/partial/plausible.html b/templates/partial/plausible.html new file mode 100644 index 0000000..13a2d1e --- /dev/null +++ b/templates/partial/plausible.html @@ -0,0 +1,3 @@ +{% if PLAUSIBLE_DOMAIN %} + +{% endif %}