Remove piwik
The _paq var need to be in the main scope, not possible with this script.
This commit is contained in:
parent
521b2280ee
commit
257ba24255
|
|
@ -1,42 +1,5 @@
|
|||
/*global tarteaucitron, ga, Shareaholic, stLight*/
|
||||
|
||||
// piwik
|
||||
tarteaucitron.services.piwik = {
|
||||
"key": "piwik",
|
||||
"type": "analytics",
|
||||
"name": "Piwik",
|
||||
"uri": "http://piwik.org/privacy/",
|
||||
"needConsent": false,
|
||||
"js": function () {
|
||||
"use strict";
|
||||
if (tarteaucitron.user.piwikServer === undefined ||
|
||||
tarteaucitron.user.piwikSiteId === undefined) { return; }
|
||||
|
||||
var _paq = _paq || [];
|
||||
_paq.push([function () {
|
||||
var self = this;
|
||||
function getOriginalVisitorCookieTimeout() {
|
||||
var now = new Date(),
|
||||
nowTs = Math.round(now.getTime() / 1000),
|
||||
visitorInfo = self.getVisitorInfo(),
|
||||
createTs = parseInt(visitorInfo[2]),
|
||||
cookieTimeout = 33696000,
|
||||
originalTimeout = createTs + cookieTimeout - nowTs;
|
||||
return originalTimeout;
|
||||
}
|
||||
this.setVisitorCookieTimeout(getOriginalVisitorCookieTimeout());
|
||||
}]);
|
||||
_paq.push(['trackPageView']);
|
||||
_paq.push(['enableLinkTracking']);
|
||||
_paq.push(['setTrackerUrl', tarteaucitron.user.piwikServer + 'piwik.php']);
|
||||
_paq.push(['setSiteId', tarteaucitron.user.piwikSiteId]);
|
||||
if (typeof tarteaucitron.user.analyticsMore() === 'function') {
|
||||
tarteaucitron.user.piwikMore();
|
||||
}
|
||||
tarteaucitron.addScript('//' + tarteaucitron.user.piwikServer + '/piwik.js');
|
||||
}
|
||||
};
|
||||
|
||||
// disqus
|
||||
tarteaucitron.services.disqus = {
|
||||
"key": "disqus",
|
||||
|
|
@ -56,8 +19,10 @@ tarteaucitron.services.disqus = {
|
|||
"use strict";
|
||||
var id = 'disqus';
|
||||
|
||||
if (document.getElementById('disqus_thread')) {
|
||||
document.getElementById('disqus_thread').innerHTML = tarteaucitron.engage(id);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
// shareathis
|
||||
|
|
|
|||
Loading…
Reference in New Issue