Add eTracker

This commit is contained in:
Amauri CHAMPEAUX 2015-08-17 00:50:45 +02:00
parent ff77e04b6c
commit c60dbb1e47
2 changed files with 24 additions and 2 deletions

View File

@ -10,7 +10,7 @@ var scripts = document.getElementsByTagName('script'),
tarteaucitronNoAdBlocker = false;
var tarteaucitron = {
"version": 317,
"version": 323,
"cdn": cdn,
"user": {},
"lang": {},
@ -1080,7 +1080,7 @@ var tarteaucitron = {
return 'en_US';
}
},
"addScript": function (url, id, callback, execute) {
"addScript": function (url, id, callback, execute, attrName, attrVal) {
"use strict";
var script,
done = false;
@ -1095,6 +1095,10 @@ var tarteaucitron = {
script.id = (id !== undefined) ? id : '';
script.async = true;
script.src = url;
if (attrName !== undefined && attrVal !== undefined) {
script.setAttribute(attrName, attrVal);
}
if (typeof callback === 'function') {
script.onreadystatechange = script.onload = function () {

View File

@ -461,6 +461,24 @@ tarteaucitron.services.ekomi = {
}
};
// etracker
tarteaucitron.services.etracker = {
"key": "etracker",
"type": "analytic",
"name": "eTracker",
"uri": "https://www.etracker.com/en/data-protection.html",
"needConsent": true,
"cookies": [],
"js": function () {
"use strict";
if (tarteaucitron.user.etracker === undefined) {
return;
}
tarteaucitron.addScript('//static.etracker.com/code/e.js', '_etLoader', function () {}, true, "data-secure-code", tarteaucitron.user.etracker);
}
};
// facebook
tarteaucitron.services.facebook = {
"key": "facebook",