From 24c667cca53892754ebcf06a67cd7becf0a53e40 Mon Sep 17 00:00:00 2001 From: Daniel Jensen Date: Sat, 12 Oct 2024 14:09:14 +0200 Subject: [PATCH] Added Matomo analytics --- pelican-bootstrap3/README.md | 3 ++- pelican-bootstrap3/templates/base.html | 1 + .../templates/includes/matomo.html | 17 +++++++++++++++++ 3 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 pelican-bootstrap3/templates/includes/matomo.html diff --git a/pelican-bootstrap3/README.md b/pelican-bootstrap3/README.md index bb83c649..ef4f0bb5 100644 --- a/pelican-bootstrap3/README.md +++ b/pelican-bootstrap3/README.md @@ -64,7 +64,8 @@ This theme honors the following standard Pelican settings: * `GOOGLE_ANALYTICS` (classic tracking code) * `GOOGLE_ANALYTICS_UNIVERSAL` and `GOOGLE_ANALYTICS_UNIVERSAL_PROPERTY` (Universal tracking code) * `DISQUS_SITENAME` - * `PIWIK_URL`, `PIWIK_SSL_URL` and `PIWIK_SITE_ID` + * `PIWIK_URL`, `PIWIK_SSL_URL` and `PIWIK_SITE_ID` or + * `MATOMO_URL`, `MATOMO_SITE_ID` It uses the `tag_cloud` variable for displaying tags in the sidebar. You can control the amount of tags shown with: `TAG_CLOUD_MAX_ITEMS` diff --git a/pelican-bootstrap3/templates/base.html b/pelican-bootstrap3/templates/base.html index cb673d04..c29fe4a5 100644 --- a/pelican-bootstrap3/templates/base.html +++ b/pelican-bootstrap3/templates/base.html @@ -235,6 +235,7 @@ {% include 'includes/sidebar/github-js.html' %} {% include 'includes/disqus_script.html' %} {% include 'includes/piwik.html' %} +{% include 'includes/matomo.html' %} {% if 'liquid_tags.notebook' in PLUGINS %} {% include 'includes/liquid_tags_nb_footer.html' %} diff --git a/pelican-bootstrap3/templates/includes/matomo.html b/pelican-bootstrap3/templates/includes/matomo.html new file mode 100644 index 00000000..bc1543e7 --- /dev/null +++ b/pelican-bootstrap3/templates/includes/matomo.html @@ -0,0 +1,17 @@ +{% if MATOMO_SITE_ID and MATOMO_URL %} + + + +{% endif %}