You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@logging.apache.org by pk...@apache.org on 2024/09/07 08:31:04 UTC

(logging-log4j2) branch 2.x-site-pro updated: Add Matomo script to website

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

pkarwasz pushed a commit to branch 2.x-site-pro
in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git


The following commit(s) were added to refs/heads/2.x-site-pro by this push:
     new cb2ad38468 Add Matomo script to website
cb2ad38468 is described below

commit cb2ad38468b5a3853b89447949b03995baeba0e1
Author: Piotr P. Karwasz <pi...@karwasz.org>
AuthorDate: Sat Sep 7 10:22:17 2024 +0200

    Add Matomo script to website
---
 antora-playbook.yaml | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/antora-playbook.yaml b/antora-playbook.yaml
index 2bb2da728e..f46037c1a9 100644
--- a/antora-playbook.yaml
+++ b/antora-playbook.yaml
@@ -72,6 +72,22 @@ ui:
 
     - path: partials/footer-scripts.hbs
       contents: |
+        <!-- Matomo -->
+        <script>
+          var _paq = window._paq = window._paq || [];
+          _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', '42']);
+            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>
+        <noscript><p><img src="https://analytics.apache.org/matomo.php?idsite=42&amp;rec=1" style="border:0;" alt="" /></p></noscript>
+        <!-- End Matomo Code -->
         <script id="site-script" src="{{{uiRootPath}}}/js/site.js" data-ui-root-path="{{{uiRootPath}}}"></script>
         <script async src="{{{uiRootPath}}}/js/vendor/highlight.js"></script>
         <!-- `@asciidoctor/tabs` extension scripts -->