From 79eeec388050c31d588cf39f6a9022c73ec98cdc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Valenta?= <git@imaniti.org> Date: Tue, 3 Oct 2023 14:22:33 +0200 Subject: [PATCH] add Matomo --- institut/templates/base.html | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/institut/templates/base.html b/institut/templates/base.html index 625982c..3de5d28 100644 --- a/institut/templates/base.html +++ b/institut/templates/base.html @@ -158,5 +158,21 @@ </div> {% block extra_js %}{% endblock %} + + <!-- Matomo --> + <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.pii.cz/"; + _paq.push(['setTrackerUrl', u+'matomo.php']); + _paq.push(['setSiteId', '1']); + 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> + <!-- End Matomo Code --> </body> </html> -- GitLab