SLING-11204 enable web analytics with ASF Matomo (#88)

diff --git a/src/main/jbake/templates/footer.tpl b/src/main/jbake/templates/footer.tpl
index 6eebaf5..82363ab 100644
--- a/src/main/jbake/templates/footer.tpl
+++ b/src/main/jbake/templates/footer.tpl
@@ -1,11 +1,18 @@
 import java.text.SimpleDateFormat
 
 p() {
-    yield "Apache Sling, Sling, Apache, the Apache feather logo, and the Apache Sling project "
-    yield "logo are trademarks of The Apache Software Foundation. All other marks mentioned "
-    yield "may be trademarks or registered trademarks of their respective owners."
+    yield '''Apache Sling, Sling, Apache, the Apache feather logo, and the Apache Sling project
+    logo are trademarks of The Apache Software Foundation. All other marks mentioned 
+    may be trademarks or registered trademarks of their respective owners.'''
 }
 p() {
     String currentYear = new SimpleDateFormat("YYYY").format(new Date())
-    yield "Copyright \u00a9 2007-${currentYear} The Apache Software Foundation."
+    yield "Copyright \u00a9 2007-${currentYear}"
+    a(href:'https://www.apache.org/') {
+        yield 'The Apache Software Foundation'
+    }
+    yield '|'
+    a(href:'https://privacy.apache.org/policies/privacy-policy-public.html') {
+        yield 'Privacy Policy'
+    }
 }
diff --git a/src/main/jbake/templates/header.tpl b/src/main/jbake/templates/header.tpl
index dcf993e..6b18d31 100644
--- a/src/main/jbake/templates/header.tpl
+++ b/src/main/jbake/templates/header.tpl
@@ -16,4 +16,23 @@
 	script {
 		yield 'hljs.initHighlightingOnLoad();'
 	} newLine()
+	yieldUnescaped '''
+	<!-- Matomo Web Analytics -->
+	<script>
+	var _paq = window._paq = window._paq || [];
+	/* tracker methods like "setCustomDimension" should be called before "trackPageView" */
+	/* We explicitly disable cookie tracking to avoid privacy issues */
+	_paq.push(['disableCookies']); 
+	_paq.push(['trackPageView']);
+	_paq.push(['enableLinkTracking']);
+	(function() {
+	  var u="https://matomo.privacy.apache.org/";
+	  _paq.push(['setTrackerUrl', u+'matomo.php']);
+	  _paq.push(['setSiteId', '6']);
+	  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 -->
+	'''
 }
\ No newline at end of file