Add Matomo tracking code

This commit is contained in:
Paul Nicoué 2022-08-04 16:09:56 +02:00
parent f65ba81320
commit 742febe683
3 changed files with 10 additions and 12 deletions

View file

@ -5,6 +5,6 @@ return [
'debug' => false, 'debug' => false,
// Matomo plugin options (critical keys) // Matomo plugin options (critical keys)
'sylvainjule.matomo' => [ 'sylvainjule.matomo' => [
// 'token' => 'a3d53082e369334813c0ed93d5a80db6' 'token' => '03a62d1dda1a7b68e706b7b688d22a5a'
] ]
]; ];

View file

@ -5,6 +5,6 @@ return [
'debug' => true, 'debug' => true,
// Matomo plugin options (critical keys) // Matomo plugin options (critical keys)
'sylvainjule.matomo' => [ 'sylvainjule.matomo' => [
// 'token' => 'a3d53082e369334813c0ed93d5a80db6' 'token' => '03a62d1dda1a7b68e706b7b688d22a5a'
] ]
]; ];

View file

@ -18,7 +18,7 @@
{% endblock %} {% endblock %}
{# Matomo #} {# Matomo #}
{# <script> <script>
var _paq = window._paq = window._paq || []; var _paq = window._paq = window._paq || [];
_paq.push(['disableCookies']); _paq.push(['disableCookies']);
_paq.push(['trackPageView']); _paq.push(['trackPageView']);
@ -26,20 +26,18 @@
(function() { (function() {
var u="//matomo.paulnicoue.com/"; var u="//matomo.paulnicoue.com/";
_paq.push(['setTrackerUrl', u+'matomo.php']); _paq.push(['setTrackerUrl', u+'matomo.php']);
_paq.push(['setSiteId', '2']); _paq.push(['setSiteId', '3']);
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0]; 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); g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
})(); })();
</script> #} </script>
</head> </head>
<body> <body>
{% block header %} {% block header %}
<header>
<div></div>
</header>
{% endblock %} {% endblock %}
{% block main %} {% block main %}