--- a/theme/templates/base.html Thu Nov 10 17:26:20 2022 +0100 +++ b/theme/templates/base.html Thu Nov 10 18:52:14 2022 +0100 @@ -35,8 +35,20 @@ {% if TAG_FEED_RSS and tag %} <link href="{{ FEED_DOMAIN }}/{% if TAG_FEED_RSS_URL %}{{ TAG_FEED_RSS_URL|format(tag.slug) }}{% else %}{{ TAG_FEED_RSS|format(tag.slug) }}{% endif %}" type="application/rss+xml" rel="alternate" title="{{ SITENAME }} Tags RSS Feed" /> {% endif %} - {% if PIWIK %} - {{PIWIK}} + {% if MATOMO_JS %} +<script> + var _paq = window._paq = window._paq || []; + /* tracker methods like "setCustomDimension" should be called before "trackPageView" */ + _paq.push(['trackPageView']); + _paq.push(['enableLinkTracking']); + (function() { + var u="//matomo.sdfa3.org/"; + _paq.push(['setTrackerUrl', u+'matomo.php']); + _paq.push(['setSiteId', '2']); + var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0]; + g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s); + })(); +</script> {% endif %} {% if article %} {% if article.stylesheets %} @@ -134,10 +146,9 @@ </div> {% include 'trademark.html' %} </div> - {% if PIWIK %} - <noscript> - <img src="https://piwik.sdfa3.org/matomo.php?idsite=2&rec=1" style="border:0" alt="" /> - </noscript> + + {% if MATOMO_IMG %} + <img referrerpolicy="no-referrer-when-downgrade" src="https://matomo.sdfa3.org/matomo.php?idsite=2&rec=1" style="border:0" alt="" /> {% endif %} </body>