-
Notifications
You must be signed in to change notification settings - Fork 10
/
tracking.html
39 lines (36 loc) · 1.46 KB
/
tracking.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
{% if TRACKING_ID %}
<!-- Piwik -->
<script type="text/javascript">
<!--
var _paq = _paq || [];
_paq.push(["trackPageView"]);
_paq.push(["enableLinkTracking"]);
_paq.push([function() {
function getOriginalVisitorCookieTimeout(obj) {
var now = new Date(),
nowTs = Math.round(now.getTime() / 1000),
visitorInfo = obj.getVisitorInfo();
var createTs = parseInt(visitorInfo[2]);
var cookieTimeout = 33696000; // 13 mois en secondes
var originalTimeout = createTs + cookieTimeout - nowTs;
return originalTimeout;
}
this.setVisitorCookieTimeout(getOriginalVisitorCookieTimeout(this));
}]);
(function() {
var u=(("https:" == document.location.protocol) ? "https" : "http") + "://stats.co-ment.com/";
_paq.push(["setTrackerUrl", u+"piwik.php"]);
_paq.push(["setSiteId", "{{ TRACKING_ID }}"]);
var d=document, g=d.createElement("script"), s=d.getElementsByTagName("script")[0]; g.type="text/javascript";
g.defer=true; g.async=true; g.src=u+"piwik.js"; s.parentNode.insertBefore(g,s);
})();
<!-- End Piwik Code -->
$(document).ready(function() {
$('#hide-piwik-cookies-optout').click(function() {
$('#piwik-cookies-optout iframe').slideToggle("fast");
});
});
-->
</script>
<div id="piwik-cookies-optout"><iframe frameborder="no" width="900px" height="90px" src="https://stats.co-ment.com/index.php?module=CustomOptOut&action=optOut&idSite=17&language={{ LANGUAGE_CODE }}"></iframe></div>
{% endif %}