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

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

commit be0e75a53a88dd5cf6a010ff18f5672f7f9bf295
Author: Roy Lenferink <[email protected]>
AuthorDate: Wed Apr 13 19:21:07 2022 +0200

    Add Matomo snippet to each webpage
    
    Matomo is a privacy friendly tracking solution hosted on ASF hardware with 
page statistics publicly available via https://analytics.apache.org
---
 layouts/_default/baseof.html  |  2 ++
 layouts/celix-doc/baseof.html |  2 ++
 layouts/index.html            |  2 ++
 layouts/partials/matomo.html  | 17 +++++++++++++++++
 4 files changed, 23 insertions(+)

diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html
index 84bb47e..6f46d56 100644
--- a/layouts/_default/baseof.html
+++ b/layouts/_default/baseof.html
@@ -32,6 +32,8 @@ limitations under the License.
 
     <!-- Custom style -->
     <link href="/assets/css/style.css" rel="stylesheet">
+
+    {{ partial "matomo.html" . }}
 </head>
 <body class="light-grey">
 
diff --git a/layouts/celix-doc/baseof.html b/layouts/celix-doc/baseof.html
index ed8f7de..b6aaec5 100644
--- a/layouts/celix-doc/baseof.html
+++ b/layouts/celix-doc/baseof.html
@@ -32,6 +32,8 @@ limitations under the License.
 
     <!-- Custom style -->
     <link href="/assets/css/style.css" rel="stylesheet">
+
+    {{ partial "matomo.html" . }}
 </head>
 <body class="light-grey">
 
diff --git a/layouts/index.html b/layouts/index.html
index 579e068..75271b7 100644
--- a/layouts/index.html
+++ b/layouts/index.html
@@ -35,6 +35,8 @@ limitations under the License.
 
     <!-- Font awesome icon set -->
     <link rel="stylesheet" 
href="https://use.fontawesome.com/releases/v5.6.3/css/all.css"; 
integrity="sha384-UHRtZLI+pbxtHCWp1t77Bi1L4ZtiqrqD80Kn4Z8NTSRyMA2Fd33n5dQ8lWUE00s/"
 crossorigin="anonymous">
+
+    {{ partial "matomo.html" . }}
 </head>
 <body>
 
diff --git a/layouts/partials/matomo.html b/layouts/partials/matomo.html
new file mode 100644
index 0000000..09c6d8c
--- /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', '9']);
+    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 -->

Reply via email to