add matomo
This commit is contained in:
parent
57562dd207
commit
349fcb118f
@ -41,32 +41,22 @@
|
|||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% endblock head %}
|
{% endblock head %}
|
||||||
|
|
||||||
|
|
||||||
<!-- Matomo -->
|
<!-- Matomo -->
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
var _paq = window._paq || [];
|
var _paq = _paq || [];
|
||||||
|
/* tracker methods like "setCustomDimension" should be called before "trackPageView" */
|
||||||
_paq.push([function() {
|
_paq.push(["setDoNotTrack", true]);
|
||||||
var self = this;
|
_paq.push(["disableCookies"]);
|
||||||
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="//lecampus.kevintessier.net/matomo/";
|
var u="//analytics.figureslibres.io/";
|
||||||
_paq.push(['setTrackerUrl', u+'matomo.php']);
|
_paq.push(['setTrackerUrl', u+'piwik.php']);
|
||||||
_paq.push(['setSiteId', '1']);
|
_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.type='text/javascript'; g.async=true; g.defer=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
|
g.type='text/javascript'; g.async=true; g.defer=true; g.src=u+'piwik.js'; s.parentNode.insertBefore(g,s);
|
||||||
})();
|
})();
|
||||||
</script>
|
</script>
|
||||||
<!-- End Matomo Code -->
|
<!-- End Matomo Code -->
|
||||||
|
Loading…
x
Reference in New Issue
Block a user