This is an automated email from the ASF dual-hosted git repository.

skrawcz pushed a commit to branch stefan/add-matomo
in repository https://gitbox.apache.org/repos/asf/hamilton.git

commit 4f839d0b1110b295d7ee939f82ee400c0cd2676c
Author: Stefan Krawczyk <[email protected]>
AuthorDate: Mon Jan 5 23:12:47 2026 +1100

    Adds matomo analytics to docs
    
       This uses the recommended way to extend the template that furo uses.
---
 docs/_templates/page.html | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)

diff --git a/docs/_templates/page.html b/docs/_templates/page.html
new file mode 100644
index 00000000..8432b710
--- /dev/null
+++ b/docs/_templates/page.html
@@ -0,0 +1,23 @@
+{% extends "!page.html" %}
+
+{% block extrahead %}
+{{ super() }}
+<!-- Matomo -->
+<script>
+  var _paq = window._paq = window._paq || [];
+  /* tracker methods like "setCustomDimension" should be called before 
"trackPageView" */
+  _paq.push(["setDoNotTrack", true]);
+  _paq.push(["disableCookies"]);
+  _paq.push(['trackPageView']);
+  _paq.push(['enableLinkTracking']);
+  (function() {
+    var u="https://analytics.apache.org/";;
+    _paq.push(['setTrackerUrl', u+'matomo.php']);
+    _paq.push(['setSiteId', '87']);
+    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 -->
+{% endblock %}

Reply via email to