You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@community.apache.org by rl...@apache.org on 2023/03/29 16:02:53 UTC

[comdev-site] branch master updated: Add Matomo snippet to website

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

rlenferink pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/comdev-site.git


The following commit(s) were added to refs/heads/master by this push:
     new 57e2686  Add Matomo snippet to website
57e2686 is described below

commit 57e26861a70d673d0ff5abac744889c7e335c185
Author: Roy Lenferink <le...@gmail.com>
AuthorDate: Wed Mar 29 18:02:44 2023 +0200

    Add Matomo snippet to website
---
 layouts/_default/baseof.html |  2 ++
 layouts/partials/matomo.html | 17 +++++++++++++++++
 2 files changed, 19 insertions(+)

diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html
index 516c671..11aaa27 100644
--- a/layouts/_default/baseof.html
+++ b/layouts/_default/baseof.html
@@ -41,6 +41,8 @@
           height: 50px;
       }
   </style>
+
+  {{ partial "matomo.html" . }}
 </head>
 
 <body>
diff --git a/layouts/partials/matomo.html b/layouts/partials/matomo.html
new file mode 100644
index 0000000..c2479be
--- /dev/null
+++ b/layouts/partials/matomo.html
@@ -0,0 +1,17 @@
+<!-- Matomo -->
+<script>
+  var _paq = window._paq = window._paq || [];
+  /* We explicitly disable cookie tracking to avoid privacy issues */
+  _paq.push(['disableCookies']);
+  /* tracker methods like "setCustomDimension" should be called before "trackPageView" */
+  _paq.push(['trackPageView']);
+  _paq.push(['enableLinkTracking']);
+  (function() {
+    var u="https://analytics.apache.org/";
+    _paq.push(['setTrackerUrl', u+'matomo.php']);
+    _paq.push(['setSiteId', '36']);
+    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 -->