You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hop.apache.org by ha...@apache.org on 2022/05/04 10:40:21 UTC
[hop-website] branch master updated: Remove plausible add Matomo
This is an automated email from the ASF dual-hosted git repository.
hansva pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hop-website.git
The following commit(s) were added to refs/heads/master by this push:
new b85cd7eab Remove plausible add Matomo
new 4272127ef Merge pull request #148 from hansva/master
b85cd7eab is described below
commit b85cd7eab858190ea7675bc8daf9600617a69476
Author: Hans Van Akelyen <ha...@gmail.com>
AuthorDate: Wed May 4 12:26:27 2022 +0200
Remove plausible add Matomo
---
antora-ui-hop/src/partials/footer-scripts.hbs | 18 +++++++++++++++++-
layouts/partials/footer.html | 18 +++++++++++++++++-
2 files changed, 34 insertions(+), 2 deletions(-)
diff --git a/antora-ui-hop/src/partials/footer-scripts.hbs b/antora-ui-hop/src/partials/footer-scripts.hbs
index 5ca43603d..fe670c987 100644
--- a/antora-ui-hop/src/partials/footer-scripts.hbs
+++ b/antora-ui-hop/src/partials/footer-scripts.hbs
@@ -27,4 +27,20 @@ search.on('autocomplete:closed', function () { search.autocomplete.setVal() })
function focusSearchInput () { document.querySelector('#search-input').focus() }
if (document.querySelector('.home-link.is-current')) window.addEventListener('load', focusSearchInput)
</script>
-<script defer data-domain="hop.apache.org" src="https://plausible.io/js/plausible.js"></script>
+<!-- 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', '11']);
+ 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 -->
diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html
index 045fde3b7..489e080ce 100644
--- a/layouts/partials/footer.html
+++ b/layouts/partials/footer.html
@@ -56,7 +56,23 @@
function focusSearchInput () { document.querySelector('#search-input').focus() }
if (document.querySelector('.home-link.is-current')) window.addEventListener('load', focusSearchInput)
</script>
- <script defer data-domain="hop.apache.org" src="https://plausible.io/js/plausible.js"></script>
+ <!-- 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', '11']);
+ 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 -->
{{ partial "seo/main" . }}
</body>