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 rel="stylesheet" href="#CHEMIN{css/spip.css}"/>
|
||||||
<link href="#CHEMIN{images/logo-16.png}" type="image/png" rel="icon">
|
<link href="#CHEMIN{images/logo-16.png}" type="image/png" rel="icon">
|
||||||
|
|
||||||
<!-- Piwik -->
|
<!-- Matomo -->
|
||||||
<script type="text/javascript">
|
<script>
|
||||||
var _paq = _paq || [];
|
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(['trackPageView']);
|
||||||
_paq.push(['enableLinkTracking']);
|
_paq.push(['enableLinkTracking']);
|
||||||
(function() {
|
(function() {
|
||||||
var u="//piwik.april.org/";
|
var u="https://statistiques.april.org/";
|
||||||
_paq.push(['setTrackerUrl', u+'piwik.php']);
|
_paq.push(['setTrackerUrl', u+'matomo.php']);
|
||||||
_paq.push(['setSiteId', '4']);
|
_paq.push(['setSiteId', '4']);
|
||||||
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.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>
|
</script>
|
||||||
<noscript><p><img src="//piwik.april.org/piwik.php?idsite=4" style="border:0;" alt="" /></p></noscript>
|
<noscript><p><img src="//statistiques.april.org/matomo.php?idsite=4&rec=1" style="border:0;" alt="" /></p></noscript>
|
||||||
<!-- End Piwik Code -->
|
<!-- End Matomo Code -->
|
||||||
|
Loading…
Reference in New Issue
Block a user