Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migration du suivi de la fréquentation et de l'acquisition de Google Analytics vers Matomo #409

Draft
wants to merge 12 commits into
base: master
Choose a base branch
from
14 changes: 14 additions & 0 deletions content/theme/partials/integrations/analytics/matomo.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<script>
var _paq = window._paq = window._paq || [];
_paq.push(["setDocumentTitle", document.domain + "/" + document.title]);
_paq.push(["setCookieDomain", "*.geotribu.fr"]);
_paq.push(['trackPageView']);
_paq.push(['enableLinkTracking']);
(function () {
var u = "{{ config.extra.analytics.matomo_url }}/";
_paq.push(['setTrackerUrl', u + 'matomo.php']);
_paq.push(['setSiteId', '3']);
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>
4 changes: 4 additions & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -171,9 +171,13 @@ theme:

# Customization
extra:
provider: matomo
matomo_url: !ENV [MKDOCS_MATOMO_URL_BASE, "https://matomo.data-wax.com"]
comments_url: https://comments.geotribu.fr # isso url
url_contribuer: https://contribuer.geotribu.fr/
consent:
cookies:
analytics: Matomo
title: Consentement 🍪
actions:
- accept
Expand Down
Loading