Replaced Piwik code by Matomo one (#5543).
This commit is contained in:
parent
03d359403d
commit
01f591ffe0
@ -42,18 +42,32 @@
|
||||
<link rel="stylesheet" href="#CHEMIN{css/spip.css}"/>
|
||||
<link href="#CHEMIN{images/logo-16.png}" type="image/png" rel="icon">
|
||||
|
||||
<!-- Piwik -->
|
||||
<script type="text/javascript">
|
||||
var _paq = _paq || [];
|
||||
<!-- Matomo -->
|
||||
<script>
|
||||
var _paq = window._paq = window._paq || [];
|
||||
/* tracker methods like "setCustomDimension" should be called before "trackPageView" */
|
||||
_paq.push([function() {
|
||||
var self = this;
|
||||
function getOriginalVisitorCookieTimeout() {
|
||||
var now = new Date(),
|
||||
nowTs = Math.round(now.getTime() / 1000),
|
||||
visitorInfo = self.getVisitorInfo();
|
||||
var createTs = parseInt(visitorInfo[2]);
|
||||
var cookieTimeout = 33696000; // 13 mois en secondes
|
||||
var originalTimeout = createTs + cookieTimeout - nowTs;
|
||||
return originalTimeout;
|
||||
}
|
||||
this.setVisitorCookieTimeout( getOriginalVisitorCookieTimeout() );
|
||||
}]);
|
||||
_paq.push(['trackPageView']);
|
||||
_paq.push(['enableLinkTracking']);
|
||||
(function() {
|
||||
var u="//piwik.april.org/";
|
||||
_paq.push(['setTrackerUrl', u+'piwik.php']);
|
||||
var u="https://statistiques.april.org/";
|
||||
_paq.push(['setTrackerUrl', u+'matomo.php']);
|
||||
_paq.push(['setSiteId', '4']);
|
||||
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
|
||||
g.type='text/javascript'; g.async=true; g.defer=true; g.src=u+'piwik.js'; s.parentNode.insertBefore(g,s);
|
||||
g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
|
||||
})();
|
||||
</script>
|
||||
<noscript><p><img src="//piwik.april.org/piwik.php?idsite=4" style="border:0;" alt="" /></p></noscript>
|
||||
<!-- End Piwik Code -->
|
||||
<noscript><p><img src="//statistiques.april.org/matomo.php?idsite=4&rec=1" style="border:0;" alt="" /></p></noscript>
|
||||
<!-- End Matomo Code -->
|
||||
|
Loading…
Reference in New Issue
Block a user