tarteauxmyrtilles/tarteaucitron.services.js

1445 lines
49 KiB
JavaScript

/*global tarteaucitron, ga, Shareaholic, stLight, clicky, top, google, Typekit, FB, ferankReady, IN, stButtons, twttr, GS_googleAddAdSenseService, GS_googleEnableAllServices, GA_googleAddSlot, GA_googleFetchAds*/
/*jslint regexp: true, nomen: true*/
// addthis
tarteaucitron.services.addthis = {
"key": "addthis",
"type": "social",
"name": "AddThis",
"uri": "http://www.addthis.com/privacy/privacy-policy#publisher-visitors",
"needConsent": true,
"cookies": ['__atuvc', '__atuvs'],
"js": function () {
"use strict";
if (tarteaucitron.user.addthisPubId === undefined) {
return;
}
if (tarteaucitron.isAjax === true) {
window.addthis = null;
window._adr = null;
window._atc = null;
window._atd = null;
window._ate = null;
window._atr = null;
window._atw = null;
}
tarteaucitron.fallback(['addthis_sharing_toolbox'], '');
tarteaucitron.addScript('//s7.addthis.com/js/300/addthis_widget.js#pubid=' + tarteaucitron.user.addthisPubId);
},
"fallback": function () {
"use strict";
var id = 'addthis';
tarteaucitron.fallback(['addthis_sharing_toolbox'], tarteaucitron.engage(id));
}
};
// addtoanyfeed
tarteaucitron.services.addtoanyfeed = {
"key": "addtoanyfeed",
"type": "social",
"name": "AddToAny (feed)",
"uri": "https://www.addtoany.com/privacy",
"needConsent": true,
"cookies": [],
"js": function () {
"use strict";
if (tarteaucitron.user.addtoanyfeedUri === undefined) {
return;
}
tarteaucitron.user.addtoanyfeedSubscribeLink = 'https://www.addtoany.com/subscribe?linkurl=' + tarteaucitron.user.addtoanyfeedUri;
window.a2a_config = window.a2a_config || {};
window.a2a_config.linkurl = tarteaucitron.user.addtoanyfeedUri;
tarteaucitron.addScript('//static.addtoany.com/menu/feed.js');
},
"fallback": function () {
"use strict";
tarteaucitron.user.addtoanyfeedSubscribeLink = 'https://www.addtoany.com/subscribe?linkurl=' + tarteaucitron.user.addtoanyfeedUri;
}
};
// addtoanyshare
tarteaucitron.services.addtoanyshare = {
"key": "addtoanyshare",
"type": "social",
"name": "AddToAny (share)",
"uri": "https://www.addtoany.com/privacy",
"needConsent": true,
"cookies": [],
"js": function () {
"use strict";
tarteaucitron.fallback(['tac_addtoanyshare'], '');
tarteaucitron.addScript('//static.addtoany.com/menu/page.js');
},
"fallback": function () {
"use strict";
var id = 'addtoanyshare';
tarteaucitron.fallback(['tac_addtoanyshare'], tarteaucitron.engage(id));
}
};
// alexa
tarteaucitron.services.alexa = {
"key": "alexa",
"type": "analytic",
"name": "Alexa",
"uri": "http://www.alexa.com/help/privacy",
"needConsent": true,
"cookies": ['__asc', '__auc'],
"js": function () {
"use strict";
if (tarteaucitron.user.alexaAccountID === undefined) {
return;
}
window._atrk_opts = {
atrk_acct: tarteaucitron.user.alexaAccountID,
domain: window.location.hostname.match(/[^\.]*\.[^.]*$/)[0],
dynamic: true
};
tarteaucitron.addScript('https://d31qbv1cthcecs.cloudfront.net/atrk.js');
}
};
// amazon
tarteaucitron.services.amazon = {
"key": "amazon",
"type": "ads",
"name": "Amazon",
"uri": "http://www.amazon.fr/gp/help/customer/display.html?ie=UTF8&*Version*=1&*entries*=0&nodeId=201149360",
"needConsent": true,
"cookies": [],
"js": function () {
"use strict";
tarteaucitron.fallback(['amazon_product'], function (x) {
var amazonId = x.getAttribute("amazonid"),
productId = x.getAttribute("productid"),
url = '//ws-eu.amazon-adsystem.com/widgets/q?ServiceVersion=20070822&OneJS=1&Operation=GetAdHtml&MarketPlace=' + tarteaucitron.getLanguage().toUpperCase() + '&source=ss&ref=ss_til&ad_type=product_link&tracking_id=' + amazonId + '&marketplace=amazon&region=' + tarteaucitron.getLanguage().toUpperCase() + '&placement=' + productId + '&asins=' + productId + '&show_border=true&link_opens_in_new_window=true',
iframe = '<iframe style="width:120px;height:240px;" marginwidth="0" marginheight="0" scrolling="no" frameborder="0" src="' + url + '"></iframe>';
return iframe;
});
},
"fallback": function () {
"use strict";
var id = 'amazon';
tarteaucitron.fallback(['amazon_product'], tarteaucitron.engage(id));
}
};
// calameo
tarteaucitron.services.calameo = {
"key": "calameo",
"type": "video",
"name": "Calameo",
"uri": "http://fr.calameo.com/privacy",
"needConsent": true,
"cookies": [],
"js": function () {
"use strict";
tarteaucitron.fallback(['calameo-canvas'], function (x) {
var id = x.getAttribute("data-id"),
width = x.getAttribute("width"),
height = x.getAttribute("height"),
url = '//v.calameo.com/?bkcode=' + id;
return '<iframe src="' + url + '" width="' + width + '" height="' + height + '" frameborder="0" scrolling="no" allowtransparency allowfullscreen></iframe>';
});
},
"fallback": function () {
"use strict";
var id = 'calameo';
tarteaucitron.fallback(['calameo-canvas'], function (elem) {
elem.style.width = elem.getAttribute('width') + 'px';
elem.style.height = elem.getAttribute('height') + 'px';
return tarteaucitron.engage(id);
});
}
};
// clicky
tarteaucitron.services.clicky = {
"key": "clicky",
"type": "analytic",
"name": "Clicky",
"uri": "https://clicky.com/terms",
"needConsent": true,
"cookies": ['_jsuid', '_eventqueue', '_referrer_og', '_utm_og', '_first_pageview', 'clicky_olark', 'no_trackyy_' + tarteaucitron.user.clickyId, 'unpoco_' + tarteaucitron.user.clickyId, 'heatmaps_g2g_' + tarteaucitron.user.clickyId],
"js": function () {
"use strict";
if (tarteaucitron.user.clickyId === undefined) {
return;
}
tarteaucitron.addScript('//static.getclicky.com/js', '', function () {
if (typeof clicky.init === 'function') {
clicky.init(tarteaucitron.user.clickyId);
}
if (typeof tarteaucitron.user.clickyMore === 'function') {
tarteaucitron.user.clickyMore();
}
});
}
};
// clicmanager
tarteaucitron.services.clicmanager = {
"key": "clicmanager",
"type": "ads",
"name": "Clicmanager",
"uri": "http://www.clicmanager.fr/infos_legales.php",
"needConsent": true,
"cookies": [],
"js": function () {
"use strict";
var uniqIds = [],
i,
uri;
tarteaucitron.fallback(['clicmanager-canvas'], function (x) {
var uniqId = '_' + Math.random().toString(36).substr(2, 9);
uniqIds.push(uniqId);
return '<div id="' + uniqId + '" c="' + x.getAttribute('c') + '" s="' + x.getAttribute('s') + '" t="' + x.getAttribute('t') + '"></div>';
});
for (i = 0; i < uniqIds.length; i += 1) {
uri = '//ads.clicmanager.fr/exe.php?';
uri += 'c=' + document.getElementById(uniqIds[i]).getAttribute('c') + '&';
uri += 's=' + document.getElementById(uniqIds[i]).getAttribute('s') + '&';
uri += 't=' + document.getElementById(uniqIds[i]).getAttribute('t');
tarteaucitron.makeAsync.init(uri, uniqIds[i]);
}
},
"fallback": function () {
"use strict";
var id = 'clicmanager';
tarteaucitron.fallback(['clicmanager-canvas'], tarteaucitron.engage(id));
}
};
// crazyegg
tarteaucitron.services.crazyegg = {
"key": "crazyegg",
"type": "analytic",
"name": "Crazy Egg",
"uri": "https://www.crazyegg.com/privacy",
"needConsent": true,
"cookies": [],
"js": function () {
"use strict";
if (tarteaucitron.user.crazyeggId === undefined) {
return;
}
tarteaucitron.addScript('//script.crazyegg.com/pages/scripts/' + tarteaucitron.user.crazyeggId.substr(0, 4) + '/' + tarteaucitron.user.crazyeggId.substr(4, 4) + '.js');
}
};
// criteo
tarteaucitron.services.criteo = {
"key": "criteo",
"type": "ads",
"name": "Criteo",
"uri": "http://www.criteo.com/privacy/",
"needConsent": true,
"cookies": [],
"js": function () {
"use strict";
document.MAX_ct0 = '';
var uniqIds = [],
i,
uri;
tarteaucitron.fallback(['criteo-canvas'], function (x) {
var uniqId = '_' + Math.random().toString(36).substr(2, 9);
uniqIds.push(uniqId);
return '<div id="' + uniqId + '" zoneid="' + x.getAttribute('zoneid') + '"></div>';
});
for (i = 0; i < uniqIds.length; i += 1) {
uri = '//cas.criteo.com/delivery/ajs.php?';
uri += 'zoneid=' + document.getElementById(uniqIds[i]).getAttribute('zoneid');
uri += '&nodis=1&cb=' + Math.floor(Math.random() * 99999999999);
uri += '&loc=' + encodeURI(window.location);
uri += (document.MAX_used !== ',') ? '&exclude=' + document.MAX_used : '';
uri += (document.charset !== undefined ? '&charset=' + document.charset : '');
uri += (document.characterSet !== undefined ? '&charset=' + document.characterSet : '');
uri += (document.referrer !== undefined) ? '&referer=' + encodeURI(document.referrer) : '';
uri += (document.context !== undefined) ? '&context=' + encodeURI(document.context) : '';
uri += ((document.MAX_ct0 !== undefined) && (document.MAX_ct0.substring(0, 4) === 'http')) ? '&ct0=' + encodeURI(document.MAX_ct0) : '';
uri += (document.mmm_fo !== undefined) ? '&mmm_fo=1' : '';
tarteaucitron.makeAsync.init(uri, uniqIds[i]);
}
},
"fallback": function () {
"use strict";
var id = 'criteo';
tarteaucitron.fallback(['criteo-canvas'], tarteaucitron.engage(id));
}
};
// dailymotion
tarteaucitron.services.dailymotion = {
"key": "dailymotion",
"type": "video",
"name": "Dailymotion",
"uri": "http://www.dailymotion.com/legal/privacy",
"needConsent": true,
"cookies": ['ts', 'dmvk', 'hist', 'v1st', 's_vi'],
"js": function () {
"use strict";
tarteaucitron.fallback(['dailymotion_player'], function (x) {
var video_id = x.getAttribute("videoID"),
video_width = x.getAttribute("width"),
frame_width = 'width=',
video_height = x.getAttribute("height"),
frame_height = 'height=',
video_frame,
params = 'info=' + x.getAttribute("showinfo") + '&autoPlay=' + x.getAttribute("autoplay");
if (video_id === undefined) {
return "";
}
if (video_width !== undefined) {
frame_width += '"' + video_width + '" ';
} else {
frame_width += '"" ';
}
if (video_height !== undefined) {
frame_height += '"' + video_height + '" ';
} else {
frame_height += '"" ';
}
video_frame = '<iframe src="//www.dailymotion.com/embed/video/' + video_id + '?' + params + '" ' + frame_width + frame_height + ' frameborder="0" allowfullscreen></iframe>';
return video_frame;
});
},
"fallback": function () {
"use strict";
var id = 'dailymotion';
tarteaucitron.fallback(['dailymotion_player'], function (elem) {
elem.style.width = elem.getAttribute('width') + 'px';
elem.style.height = elem.getAttribute('height') + 'px';
return tarteaucitron.engage(id);
});
}
};
// disqus
tarteaucitron.services.disqus = {
"key": "disqus",
"type": "comment",
"name": "Disqus",
"uri": "https://help.disqus.com/customer/portal/articles/466259-privacy-policy",
"needConsent": true,
"cookies": [],
"js": function () {
"use strict";
if (tarteaucitron.user.disqusShortname === undefined) {
return;
}
tarteaucitron.addScript('//' + tarteaucitron.user.disqusShortname + '.disqus.com/embed.js');
tarteaucitron.addScript('//' + tarteaucitron.user.disqusShortname + '.disqus.com/count.js');
},
"fallback": function () {
"use strict";
var id = 'disqus';
if (document.getElementById('disqus_thread')) {
document.getElementById('disqus_thread').innerHTML = tarteaucitron.engage(id);
}
}
};
// ekomi
tarteaucitron.services.ekomi = {
"key": "ekomi",
"type": "social",
"name": "eKomi",
"uri": "http://www.ekomi-us.com/us/privacy/",
"needConsent": true,
"cookies": [],
"js": function () {
"use strict";
if (tarteaucitron.user.ekomiCertId === undefined) {
return;
}
window.eKomiIntegrationConfig = [
{certId: tarteaucitron.user.ekomiCertId}
];
tarteaucitron.addScript('//connect.ekomi.de/integration_1410173009/' + tarteaucitron.user.ekomiCertId + '.js');
}
};
// facebook
tarteaucitron.services.facebook = {
"key": "facebook",
"type": "social",
"name": "Facebook",
"uri": "https://www.facebook.com/help/cookies/",
"needConsent": true,
"cookies": [],
"js": function () {
"use strict";
tarteaucitron.fallback(['fb-post', 'fb-follow', 'fb-activity', 'fb-send', 'fb-share-button', 'fb-like'], '');
tarteaucitron.addScript('//connect.facebook.net/' + tarteaucitron.getLocale() + '/sdk.js#xfbml=1&version=v2.0', 'facebook-jssdk');
if (tarteaucitron.isAjax === true) {
if (typeof FB !== "undefined") {
FB.XFBML.parse();
}
}
},
"fallback": function () {
"use strict";
var id = 'facebook';
tarteaucitron.fallback(['fb-post', 'fb-follow', 'fb-activity', 'fb-send', 'fb-share-button', 'fb-like'], tarteaucitron.engage(id));
}
};
// facebooklikebox
tarteaucitron.services.facebooklikebox = {
"key": "facebooklikebox",
"type": "social",
"name": "Facebook (like box)",
"uri": "https://www.facebook.com/help/cookies/",
"needConsent": true,
"cookies": [],
"js": function () {
"use strict";
tarteaucitron.fallback(['fb-like-box'], '');
tarteaucitron.addScript('//connect.facebook.net/' + tarteaucitron.getLocale() + '/sdk.js#xfbml=1&version=v2.0', 'facebook-jssdk');
if (tarteaucitron.isAjax === true) {
if (typeof FB !== "undefined") {
FB.XFBML.parse();
}
}
},
"fallback": function () {
"use strict";
var id = 'facebooklikebox';
tarteaucitron.fallback(['fb-like-box'], tarteaucitron.engage(id));
}
};
// facebookcomment
tarteaucitron.services.facebookcomment = {
"key": "facebookcomment",
"type": "comment",
"name": "Facebook (commentaire)",
"uri": "https://www.facebook.com/help/cookies/",
"needConsent": true,
"cookies": [],
"js": function () {
"use strict";
tarteaucitron.fallback(['fb-comments'], '');
tarteaucitron.addScript('//connect.facebook.net/' + tarteaucitron.getLocale() + '/sdk.js#xfbml=1&version=v2.0', 'facebook-jssdk');
if (tarteaucitron.isAjax === true) {
if (typeof FB !== "undefined") {
FB.XFBML.parse();
}
}
},
"fallback": function () {
"use strict";
var id = 'facebookcomment';
tarteaucitron.fallback(['fb-comments'], tarteaucitron.engage(id));
}
};
// ferank
tarteaucitron.services.ferank = {
"key": "ferank",
"type": "analytic",
"name": "FERank",
"uri": "https://www.ferank.fr/respect-vie-privee/#mesureaudience",
"needConsent": false,
"cookies": [],
"js": function () {
"use strict";
tarteaucitron.addScript('//static.ferank.fr/pixel.js', '', function () {
if (typeof tarteaucitron.user.ferankMore === 'function') {
tarteaucitron.user.ferankMore();
}
});
}
};
// ferank pub
tarteaucitron.services.ferankpub = {
"key": "ferankpub",
"type": "ads",
"name": "FERank (pub)",
"uri": "https://www.ferank.fr/respect-vie-privee/#regiepublicitaire",
"needConsent": false,
"cookies": [],
"js": function () {
"use strict";
tarteaucitron.addScript('//static.ferank.fr/publicite.async.js');
if (tarteaucitron.isAjax === true) {
if (typeof ferankReady === 'function') {
ferankReady();
}
}
},
"fallback": function () {
"use strict";
var id = 'ferankpub';
tarteaucitron.fallback(['ferank-publicite'], tarteaucitron.engage(id));
}
};
// get+
tarteaucitron.services.getplus = {
"key": "getplus",
"type": "analytic",
"name": "Get+",
"uri": "http://www.getplus.fr/Conditions-generales-de-vente_a226.html",
"needConsent": true,
"cookies": ['_first_pageview', '_jsuid', 'no_trackyy_' + tarteaucitron.user.getplusId, '_eventqueue'],
"js": function () {
"use strict";
if (tarteaucitron.user.getplusId === undefined) {
return;
}
window.webleads_site_ids = window.webleads_site_ids || [];
window.webleads_site_ids.push(tarteaucitron.user.getplusId);
tarteaucitron.addScript('//stats.webleads-tracker.com/js');
}
};
// google+
tarteaucitron.services.gplus = {
"key": "gplus",
"type": "social",
"name": "Google+",
"uri": "http://www.google.fr/intl/policies/privacy/",
"needConsent": true,
"cookies": [],
"js": function () {
"use strict";
tarteaucitron.addScript('https://apis.google.com/js/platform.js');
},
"fallback": function () {
"use strict";
var id = 'gplus';
tarteaucitron.fallback(['g-plus', 'g-plusone'], tarteaucitron.engage(id));
}
};
// google+ badge
tarteaucitron.services.gplusbadge = {
"key": "gplusbadge",
"type": "social",
"name": "Google+ (badge)",
"uri": "http://www.google.fr/intl/policies/privacy/",
"needConsent": true,
"cookies": [],
"js": function () {
"use strict";
tarteaucitron.addScript('https://apis.google.com/js/platform.js');
},
"fallback": function () {
"use strict";
var id = 'gplusbadge';
tarteaucitron.fallback(['g-page', 'g-person'], tarteaucitron.engage(id));
}
};
// google adsense
tarteaucitron.services.adsense = {
"key": "adsense",
"type": "ads",
"name": "Google Adsense",
"uri": "http://www.google.com/ads/preferences/",
"needConsent": true,
"cookies": [],
"js": function () {
"use strict";
tarteaucitron.addScript('//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js');
},
"fallback": function () {
"use strict";
var id = 'adsense';
tarteaucitron.fallback(['adsbygoogle'], tarteaucitron.engage(id));
}
};
// google adsense premium
tarteaucitron.services.adsensepremium = {
"key": "adsensepremium",
"type": "ads",
"name": "Google Adsense (premium)",
"uri": "http://www.google.com/ads/preferences/",
"needConsent": true,
"cookies": [],
"js": function () {
"use strict";
if (tarteaucitron.user.adsensepremium === undefined) {
return;
}
var div = document.createElement('div'),
increment = 0,
timer;
div.setAttribute("id", "tarteaucitronAdsensePremium");
document.getElementsByTagName('body')[0].appendChild(div);
tarteaucitron.makeAsync.init('//partner.googleadservices.com/gampad/google_service.js', 'tarteaucitronAdsensePremium');
timer = setInterval(function () {
increment += 1;
if (typeof GS_googleAddAdSenseService !== "undefined" &&
typeof GS_googleEnableAllServices !== "undefined" &&
typeof GA_googleAddSlot !== "undefined" &&
typeof GA_googleFetchAds !== "undefined") {
var i,
arr = tarteaucitron.user.adsensepremiumArr.split(',');
GS_googleAddAdSenseService(tarteaucitron.user.adsensepremium);
GS_googleEnableAllServices();
for (i = 0; i < arr.length; i += 1) {
GA_googleAddSlot(tarteaucitron.user.adsensepremium, arr[i]);
}
GA_googleFetchAds();
clearInterval(timer);
} else if (increment >= 100) {
clearInterval(timer);
}
}, 10);
}
};
// google adsense search (form)
tarteaucitron.services.adsensesearchform = {
"key": "adsensesearchform",
"type": "ads",
"name": "Google Adsense Search (form)",
"uri": "http://www.google.com/ads/preferences/",
"needConsent": true,
"cookies": [],
"js": function () {
"use strict";
tarteaucitron.addScript('//www.google.com/coop/cse/brand?form=cse-search-box&lang=' + tarteaucitron.getLanguage());
}
};
// google adsense search (result)
tarteaucitron.services.adsensesearchresult = {
"key": "adsensesearchresult",
"type": "ads",
"name": "Google Adsense Search (result)",
"uri": "http://www.google.com/ads/preferences/",
"needConsent": true,
"cookies": [],
"js": function () {
"use strict";
if (tarteaucitron.user.adsensesearchresultCx === undefined) {
return;
}
tarteaucitron.addScript('//www.google.com/cse/cse.js?cx=' + tarteaucitron.user.adsensesearchresultCx);
},
"fallback": function () {
"use strict";
var id = 'adsensesearchresult';
if (document.getElementById('gcse_searchresults')) {
document.getElementById('gcse_searchresults').innerHTML = tarteaucitron.engage(id);
}
}
};
// googleadwordsconversion
tarteaucitron.services.googleadwordsconversion = {
"key": "googleadwordsconversion",
"type": "ads",
"name": "Google Adwords (conversion)",
"uri": "https://www.google.com/settings/ads",
"needConsent": true,
"cookies": [],
"js": function () {
"use strict";
if (tarteaucitron.user.adwordsconversionId === undefined) {
return;
}
tarteaucitron.addScript('//www.googleadservices.com/pagead/conversion_async.js', '', function () {
window.google_trackConversion({
google_conversion_id: tarteaucitron.user.adwordsconversionId,
google_conversion_label: tarteaucitron.user.adwordsconversionLabel,
google_custom_params: {
parameter1: tarteaucitron.user.adwordsconversionCustom1,
parameter2: tarteaucitron.user.adwordsconversionCustom2
}
});
});
}
};
// googleadwordsremarketing
tarteaucitron.services.googleadwordsremarketing = {
"key": "googleadwordsremarketing",
"type": "ads",
"name": "Google Adwords (remarketing)",
"uri": "https://www.google.com/settings/ads",
"needConsent": true,
"cookies": [],
"js": function () {
"use strict";
if (tarteaucitron.user.adwordsremarketingId === undefined) {
return;
}
tarteaucitron.addScript('//www.googleadservices.com/pagead/conversion_async.js', '', function () {
window.google_trackConversion({
google_conversion_id: tarteaucitron.user.adwordsremarketingId,
google_remarketing_only: true
});
});
}
};
// google analytics (old)
tarteaucitron.services.gajs = {
"key": "gajs",
"type": "analytic",
"name": "Google Analytics (ga.js)",
"uri": "https://support.google.com/analytics/answer/6004245",
"needConsent": true,
"cookies": ['_ga', '_gat', '__utma', '__utmb', '__utmc', '__utmt', '__utmz'],
"js": function () {
"use strict";
window._gaq = window._gaq || [];
window._gaq.push(['_setAccount', tarteaucitron.user.gajsUa]);
window._gaq.push(['_trackPageview']);
tarteaucitron.addScript('//www.google-analytics.com/ga.js', '', function () {
if (typeof tarteaucitron.user.gajsMore === 'function') {
tarteaucitron.user.gajsMore();
}
});
}
};
// google analytics
tarteaucitron.services.analytics = {
"key": "analytics",
"type": "analytic",
"name": "Google Analytics (universal)",
"uri": "https://support.google.com/analytics/answer/6004245",
"needConsent": true,
"cookies": ['_ga', '_gat', '__utma', '__utmb', '__utmc', '__utmt', '__utmz'],
"js": function () {
"use strict";
window.GoogleAnalyticsObject = 'ga';
window.ga = window.ga || function () {
window.ga.q = window.ga.q || [];
window.ga.q.push(arguments);
};
window.ga.l = new Date();
tarteaucitron.addScript('//www.google-analytics.com/analytics.js', '', function () {
ga('create', tarteaucitron.user.analyticsUa, {'cookieExpires': 34128000});
ga('send', 'pageview');
if (typeof tarteaucitron.user.analyticsMore === 'function') {
tarteaucitron.user.analyticsMore();
}
});
}
};
// google maps
tarteaucitron.services.googlemaps = {
"key": "googlemaps",
"type": "api",
"name": "Google Maps",
"uri": "http://www.google.com/ads/preferences/",
"needConsent": true,
"cookies": [],
"js": function () {
"use strict";
var mapOptions,
map,
uniqIds = [],
i;
tarteaucitron.addScript('//maps.googleapis.com/maps/api/js?v=3.exp&signed_in=true&callback=tac_googlemaps_callback');
window.tac_googlemaps_callback = function () {
tarteaucitron.fallback(['googlemaps-canvas'], function (x) {
var uniqId = '_' + Math.random().toString(36).substr(2, 9);
uniqIds.push(uniqId);
return '<div id="' + uniqId + '" zoom="' + x.getAttribute('zoom') + '" latitude="' + x.getAttribute('latitude') + '" longitude="' + x.getAttribute('longitude') + '" style="width:' + x.offsetWidth + 'px;height:' + x.offsetHeight + 'px"></div>';
});
for (i = 0; i < uniqIds.length; i += 1) {
mapOptions = {
zoom: parseInt(document.getElementById(uniqIds[i]).getAttribute('zoom'), 10),
center: new google.maps.LatLng(parseFloat(document.getElementById(uniqIds[i]).getAttribute('latitude'), 10), parseFloat(document.getElementById(uniqIds[i]).getAttribute('longitude'), 10))
};
map = new google.maps.Map(document.getElementById(uniqIds[i]), mapOptions);
}
};
},
"fallback": function () {
"use strict";
var id = 'googlemaps';
tarteaucitron.fallback(['googlemaps-canvas'], tarteaucitron.engage(id));
}
};
// google tag manager
tarteaucitron.services.googletagmanager = {
"key": "googletagmanager",
"type": "api",
"name": "Google Tag Manager",
"uri": "http://www.google.com/ads/preferences/",
"needConsent": true,
"cookies": ['_ga', '_gat', '__utma', '__utmb', '__utmc', '__utmt', '__utmz', '__gads', '_drt_', 'FLC', 'exchange_uid', 'id', 'fc', 'rrs', 'rds', 'rv', 'uid', 'UIDR', 'UID', 'clid', 'ipinfo', 'acs'],
"js": function () {
"use strict";
if (tarteaucitron.user.googletagmanagerId === undefined) {
return;
}
window.dataLayer = window.dataLayer || [];
window.dataLayer.push({
'gtm.start': new Date().getTime(),
event: 'gtm.js'
});
tarteaucitron.addScript('//www.googletagmanager.com/gtm.js?id=' + tarteaucitron.user.googletagmanagerId);
}
};
// jsapi
tarteaucitron.services.jsapi = {
"key": "jsapi",
"type": "api",
"name": "Google jsapi",
"uri": "http://www.google.com/policies/privacy/",
"needConsent": true,
"cookies": [],
"js": function () {
"use strict";
tarteaucitron.addScript('//www.google.com/jsapi');
}
};
// linkedin
tarteaucitron.services.linkedin = {
"key": "linkedin",
"type": "social",
"name": "Linkedin",
"uri": "https://www.linkedin.com/legal/cookie_policy",
"needConsent": true,
"cookies": [],
"js": function () {
"use strict";
tarteaucitron.fallback(['tacLinkedin'], '');
tarteaucitron.addScript('//platform.linkedin.com/in.js');
if (tarteaucitron.isAjax === true) {
if (typeof IN !== "undefined") {
IN.parse();
}
}
},
"fallback": function () {
"use strict";
var id = 'linkedin';
tarteaucitron.fallback(['tacLinkedin'], tarteaucitron.engage(id));
}
};
// pinterest
tarteaucitron.services.pinterest = {
"key": "pinterest",
"type": "social",
"name": "Pinterest",
"uri": "https://about.pinterest.com/privacy-policy",
"needConsent": true,
"cookies": [],
"js": function () {
"use strict";
tarteaucitron.fallback(['tacPinterest'], '');
tarteaucitron.addScript('//assets.pinterest.com/js/pinit.js');
},
"fallback": function () {
"use strict";
var id = 'pinterest';
tarteaucitron.fallback(['tacPinterest'], tarteaucitron.engage(id));
}
};
// prezi
tarteaucitron.services.prezi = {
"key": "prezi",
"type": "video",
"name": "Prezi",
"uri": "https://prezi.com/privacy-policy/",
"needConsent": true,
"cookies": [],
"js": function () {
"use strict";
tarteaucitron.fallback(['prezi-canvas'], function (x) {
var id = x.getAttribute("data-id"),
width = x.getAttribute("width"),
height = x.getAttribute("height"),
url = 'https://prezi.com/embed/' + id + '/?bgcolor=ffffff&amp;lock_to_path=0&amp;autoplay=0&amp;autohide_ctrls=0';
return '<iframe src="' + url + '" width="' + width + '" height="' + height + '" frameborder="0" scrolling="no" allowtransparency allowfullscreen></iframe>';
});
},
"fallback": function () {
"use strict";
var id = 'prezi';
tarteaucitron.fallback(['prezi-canvas'], function (elem) {
elem.style.width = elem.getAttribute('width') + 'px';
elem.style.height = elem.getAttribute('height') + 'px';
return tarteaucitron.engage(id);
});
}
};
// pubdirecte
tarteaucitron.services.pubdirecte = {
"key": "pubdirecte",
"type": "ads",
"name": "Pubdirecte",
"uri": "http://pubdirecte.com/contact.php",
"needConsent": true,
"cookies": [],
"js": function () {
"use strict";
var uniqIds = [],
i,
uri;
tarteaucitron.fallback(['pubdirecte-canvas'], function (x) {
var uniqId = '_' + Math.random().toString(36).substr(2, 9);
uniqIds.push(uniqId);
return '<div id="' + uniqId + '" pid="' + x.getAttribute('pid') + '" ref="' + x.getAttribute('ref') + '"></div>';
});
for (i = 0; i < uniqIds.length; i += 1) {
uri = '//www.pubdirecte.com/script/banniere.php?';
uri += 'id=' + document.getElementById(uniqIds[i]).getAttribute('pid') + '&';
uri += 'ref=' + document.getElementById(uniqIds[i]).getAttribute('ref');
tarteaucitron.makeAsync.init(uri, uniqIds[i]);
}
},
"fallback": function () {
"use strict";
var id = 'pubdirecte';
tarteaucitron.fallback(['pubdirecte-canvas'], tarteaucitron.engage(id));
}
};
// shareaholic
tarteaucitron.services.shareaholic = {
"key": "shareaholic",
"type": "social",
"name": "Shareaholic",
"uri": "https://shareaholic.com/privacy/choices",
"needConsent": true,
"cookies": ['__utma', '__utmb', '__utmc', '__utmz', '__utmt_Shareaholic%20Pageviews'],
"js": function () {
"use strict";
if (tarteaucitron.user.shareaholicSiteId === undefined) {
return;
}
tarteaucitron.fallback(['shareaholic-canvas'], '');
tarteaucitron.addScript('//dsms0mj1bbhn4.cloudfront.net/assets/pub/shareaholic.js', '', function () {
try {
Shareaholic.init(tarteaucitron.user.shareaholicSiteId);
} catch (e) {}
});
},
"fallback": function () {
"use strict";
var id = 'shareaholic';
tarteaucitron.fallback(['shareaholic-canvas'], tarteaucitron.engage(id));
}
};
// sharethis
tarteaucitron.services.sharethis = {
"key": "sharethis",
"type": "social",
"name": "ShareThis",
"uri": "http://www.sharethis.com/legal/privacy/",
"needConsent": true,
"cookies": ['__unam'],
"js": function () {
"use strict";
if (tarteaucitron.user.sharethisPublisher === undefined) {
return;
}
var switchTo5x = true,
uri = ('https:' === document.location.protocol ? 'https://ws' : 'http://w') + '.sharethis.com/button/buttons.js';
tarteaucitron.fallback(['tacSharethis'], '');
tarteaucitron.addScript(uri, '', function () {
stLight.options({publisher: tarteaucitron.user.sharethisPublisher, doNotHash: false, doNotCopy: false, hashAddressBar: false});
});
if (tarteaucitron.isAjax === true) {
if (typeof stButtons !== "undefined") {
stButtons.locateElements();
}
}
},
"fallback": function () {
"use strict";
var id = 'sharethis';
tarteaucitron.fallback(['tacSharethis'], tarteaucitron.engage(id));
}
};
// slideshare
tarteaucitron.services.slideshare = {
"key": "slideshare",
"type": "video",
"name": "SlideShare",
"uri": "https://www.linkedin.com/legal/privacy-policy",
"needConsent": true,
"cookies": [],
"js": function () {
"use strict";
tarteaucitron.fallback(['slideshare-canvas'], function (x) {
var id = x.getAttribute("data-id"),
width = x.getAttribute("width"),
height = x.getAttribute("height"),
url = '//www.slideshare.net/slideshow/embed_code/' + id;
return '<iframe src="' + url + '" width="' + width + '" height="' + height + '" frameborder="0" scrolling="no" allowtransparency allowfullscreen></iframe>';
});
},
"fallback": function () {
"use strict";
var id = 'slideshare';
tarteaucitron.fallback(['slideshare-canvas'], function (elem) {
elem.style.width = elem.getAttribute('width') + 'px';
elem.style.height = elem.getAttribute('height') + 'px';
return tarteaucitron.engage(id);
});
}
};
// statcounter
tarteaucitron.services.statcounter = {
"key": "statcounter",
"type": "analytic",
"name": "StatCounter",
"uri": "https://fr.statcounter.com/about/legal/#privacy",
"needConsent": true,
"cookies": ['sc_is_visitor_unique'],
"js": function () {
"use strict";
var uniqIds = [],
i,
uri = '//statcounter.com/counter/counter.js';
tarteaucitron.fallback(['statcounter-canvas'], function (x) {
var uniqId = '_' + Math.random().toString(36).substr(2, 9);
uniqIds.push(uniqId);
return '<div id="' + uniqId + '"></div>';
});
for (i = 0; i < uniqIds.length; i += 1) {
tarteaucitron.makeAsync.init(uri, uniqIds[i]);
}
},
"fallback": function () {
"use strict";
var id = 'statcounter';
tarteaucitron.fallback(['statcounter-canvas'], tarteaucitron.engage(id));
}
};
// timelinejs
tarteaucitron.services.timelinejs = {
"key": "timelinejs",
"type": "api",
"name": "Timeline JS",
"uri": "http://timeline.knightlab.com/#help",
"needConsent": true,
"cookies": [],
"js": function () {
"use strict";
tarteaucitron.fallback(['timelinejs-canvas'], function (x) {
var spreadsheet_id = x.getAttribute("spreadsheet_id"),
width = x.getAttribute("width"),
height = x.getAttribute("height"),
lang = x.getAttribute("lang_2_letter"),
font = x.getAttribute("font"),
map = x.getAttribute("map"),
start_at_end = x.getAttribute("start_at_end"),
hash_bookmark = x.getAttribute("hash_bookmark"),
start_at_slide = x.getAttribute("start_at_slide"),
start_zoom = x.getAttribute("start_zoom"),
url = '//cdn.knightlab.com/libs/timeline/latest/embed/index.html?source=' + spreadsheet_id + '&font=' + font + '&maptype=' + map + '&lang=' + lang + '&start_at_end=' + start_at_end + '&hash_bookmark=' + hash_bookmark + '&start_at_slide=' + start_at_slide + '&start_zoom_adjust=' + start_zoom + '&height=' + height;
return '<iframe src="' + url + '" width="' + width + '" height="' + height + '" frameborder="0" allowtransparency allowfullscreen></iframe>';
});
},
"fallback": function () {
"use strict";
var id = 'timelinejs';
tarteaucitron.fallback(['timelinejs-canvas'], function (elem) {
elem.style.width = elem.getAttribute('width') + 'px';
elem.style.height = elem.getAttribute('height') + 'px';
return tarteaucitron.engage(id);
});
}
};
// typekit
tarteaucitron.services.typekit = {
"key": "typekit",
"type": "api",
"name": "Typekit (adobe)",
"uri": "http://www.adobe.com/fr/privacy.html",
"needConsent": true,
"cookies": [],
"js": function () {
"use strict";
if (tarteaucitron.user.typekitId === undefined) {
return;
}
tarteaucitron.addScript('//use.typekit.net/' + tarteaucitron.user.typekitId + '.js', '', function () {
try {
Typekit.load();
} catch (e) {}
});
}
};
// twenga
tarteaucitron.services.twenga = {
"key": "twenga",
"type": "ads",
"name": "Twenga",
"uri": "http://www.twenga.com/privacy.php",
"needConsent": true,
"cookies": [],
"js": function () {
"use strict";
if (tarteaucitron.user.twengaId === undefined || tarteaucitron.user.twengaLocale === undefined) {
return;
}
tarteaucitron.addScript('//tracker.twenga.' + tarteaucitron.user.twengaLocale + '/st/tracker_' + tarteaucitron.user.twengaId + '.js');
}
};
// twitter
tarteaucitron.services.twitter = {
"key": "twitter",
"type": "social",
"name": "Twitter",
"uri": "https://support.twitter.com/articles/20170514",
"needConsent": true,
"cookies": [],
"js": function () {
"use strict";
tarteaucitron.fallback(['tacTwitter'], '');
tarteaucitron.addScript('//platform.twitter.com/widgets.js', 'twitter-wjs');
},
"fallback": function () {
"use strict";
var id = 'twitter';
tarteaucitron.fallback(['tacTwitter'], tarteaucitron.engage(id));
}
};
// twitter embed
tarteaucitron.services.twitterembed = {
"key": "twitterembed",
"type": "social",
"name": "Twitter (cards)",
"uri": "https://support.twitter.com/articles/20170514",
"needConsent": true,
"cookies": [],
"js": function () {
"use strict";
var uniqIds = [],
i,
e,
html;
tarteaucitron.fallback(['twitterembed-canvas'], function (x) {
var uniqId = '_' + Math.random().toString(36).substr(2, 9);
uniqIds.push(uniqId);
html = '<div id="' + uniqId + '" ';
html += 'tweetid="' + x.getAttribute('tweetid') + '" ';
html += 'theme="' + x.getAttribute('theme') + '" ';
html += 'cards="' + x.getAttribute('cards') + '" ';
html += 'conversation="' + x.getAttribute('conversation') + '" ';
html += 'data-width="' + x.getAttribute('data-width') + '" ';
html += 'data-align="' + x.getAttribute('data-align') + '" ';
html += '></div>';
return html;
});
tarteaucitron.addScript('//platform.twitter.com/widgets.js', 'twitter-wjs', function () {
for (i = 0; i < uniqIds.length; i += 1) {
e = document.getElementById(uniqIds[i]);
twttr.widgets.createTweet(
e.getAttribute('tweetid'),
e,
{
theme: e.getAttribute('theme'),
cards: e.getAttribute('cards'),
conversation: e.getAttribute('conversation'),
lang: tarteaucitron.getLanguage(),
dnt: true,
width: e.getAttribute('data-width'),
align: e.getAttribute('data-align')
}
);
}
});
},
"fallback": function () {
"use strict";
var id = 'twitterembed';
tarteaucitron.fallback(['twitterembed-canvas'], function (elem) {
elem.style.width = elem.getAttribute('data-width') + 'px';
return tarteaucitron.engage(id);
});
}
};
// twitter timeline
tarteaucitron.services.twittertimeline = {
"key": "twittertimeline",
"type": "social",
"name": "Twitter (timelines)",
"uri": "https://support.twitter.com/articles/20170514",
"needConsent": true,
"cookies": [],
"js": function () {
"use strict";
tarteaucitron.fallback(['tacTwitterTimelines'], '');
tarteaucitron.addScript('//platform.twitter.com/widgets.js', 'twitter-wjs');
},
"fallback": function () {
"use strict";
var id = 'twittertimeline';
tarteaucitron.fallback(['tacTwitterTimelines'], tarteaucitron.engage(id));
}
};
// user voice
tarteaucitron.services.uservoice = {
"key": "uservoice",
"type": "support",
"name": "UserVoice",
"uri": "https://www.uservoice.com/privacy/",
"needConsent": true,
"cookies": [],
"js": function () {
"use strict";
if (tarteaucitron.user.userVoiceApi === undefined) {
return;
}
tarteaucitron.addScript('//widget.uservoice.com/' + tarteaucitron.user.userVoiceApi + '.js');
}
};
// vimeo
tarteaucitron.services.vimeo = {
"key": "vimeo",
"type": "video",
"name": "Vimeo",
"uri": "http://vimeo.com/privacy",
"needConsent": true,
"cookies": ['__utmt_player', '__utma', '__utmb', '__utmc', '__utmv', 'vuid', '__utmz', 'player'],
"js": function () {
"use strict";
tarteaucitron.fallback(['vimeo_player'], function (x) {
var video_id = x.getAttribute("videoID"),
video_width = x.getAttribute("width"),
frame_width = 'width=',
video_height = x.getAttribute("height"),
frame_height = 'height=',
video_frame;
if (video_id === undefined) {
return "";
}
if (video_width !== undefined) {
frame_width += '"' + video_width + '" ';
} else {
frame_width += '"" ';
}
if (video_height !== undefined) {
frame_height += '"' + video_height + '" ';
} else {
frame_height += '"" ';
}
video_frame = '<iframe src="//player.vimeo.com/video/' + video_id + '" ' + frame_width + frame_height + ' frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>';
return video_frame;
});
},
"fallback": function () {
"use strict";
var id = 'vimeo';
tarteaucitron.fallback(['vimeo_player'], function (elem) {
elem.style.width = elem.getAttribute('width') + 'px';
elem.style.height = elem.getAttribute('height') + 'px';
return tarteaucitron.engage(id);
});
}
};
// visualrevenue
tarteaucitron.services.visualrevenue = {
"key": "visualrevenue",
"type": "analytic",
"name": "VisualRevenue",
"uri": "http://www.outbrain.com/legal/privacy-713/",
"needConsent": true,
"cookies": ['__vrf', '__vrm', '__vrl', '__vry', '__vru', '__vrid', '__vrz'],
"js": function () {
"use strict";
if (tarteaucitron.user.visualrevenueId === undefined) {
return;
}
window._vrq = window._vrq || [];
window._vrq.push(['id', tarteaucitron.user.visualrevenueId]);
window._vrq.push(['automate', true]);
window._vrq.push(['track', function () {}]);
tarteaucitron.addScript('http://a.visualrevenue.com/vrs.js');
}
};
// vshop
tarteaucitron.services.vshop = {
"key": "vshop",
"type": "ads",
"name": "vShop",
"uri": "http://vshop.fr/privacy-policy",
"needConsent": true,
"cookies": [],
"js": function () {
"use strict";
tarteaucitron.fallback(['vcashW'], '');
tarteaucitron.addScript('//vshop.fr/js/w.js');
},
"fallback": function () {
"use strict";
var id = 'vshop';
tarteaucitron.fallback(['vcashW'], tarteaucitron.engage(id));
}
};
// xiti
tarteaucitron.services.xiti = {
"key": "xiti",
"type": "analytic",
"name": "Xiti",
"uri": "http://www.atinternet.com/politique-du-respect-de-la-vie-privee/",
"needConsent": true,
"cookies": [],
"js": function () {
"use strict";
if (tarteaucitron.user.xitiId === undefined) {
return;
}
var Xt_param = 's=' + tarteaucitron.user.xitiId + '&p=',
Xt_r,
Xt_h,
Xt_i,
Xt_s,
div = document.createElement('div');
try {
Xt_r = top.document.referrer;
} catch (e) {
Xt_r = document.referrer;
}
Xt_h = new Date();
Xt_i = '<img style="display:none" border="0" alt="" ';
Xt_i += 'src="http://logv3.xiti.com/hit.xiti?' + Xt_param;
Xt_i += '&hl=' + Xt_h.getHours() + 'x' + Xt_h.getMinutes() + 'x' + Xt_h.getSeconds();
if (parseFloat(navigator.appVersion) >= 4) {
Xt_s = screen;
Xt_i += '&r=' + Xt_s.width + 'x' + Xt_s.height + 'x' + Xt_s.pixelDepth + 'x' + Xt_s.colorDepth;
}
div.innerHTML = Xt_i + '&ref=' + Xt_r.replace(/[<>"]/g, '').replace(/&/g, '$') + '" title="Internet Audience">';
document.getElementsByTagName('body')[0].appendChild(div.firstChild);
if (typeof tarteaucitron.user.xitiMore === 'function') {
tarteaucitron.user.xitiMore();
}
}
};
// youtube
tarteaucitron.services.youtube = {
"key": "youtube",
"type": "video",
"name": "YouTube",
"uri": "https://www.google.fr/intl/fr/policies/privacy/",
"needConsent": true,
"cookies": ['VISITOR_INFO1_LIVE', 'YSC', 'PREF', 'GEUP'],
"js": function () {
"use strict";
tarteaucitron.fallback(['youtube_player'], function (x) {
var video_id = x.getAttribute("videoID"),
video_width = x.getAttribute("width"),
frame_width = 'width=',
video_height = x.getAttribute("height"),
frame_height = 'height=',
video_frame,
params = 'theme=' + x.getAttribute("theme") + '&rel=' + x.getAttribute("rel") + '&controls=' + x.getAttribute("controls") + '&showinfo=' + x.getAttribute("showinfo") + '&autoplay=' + x.getAttribute("autoplay");
if (video_id === undefined) {
return "";
}
if (video_width !== undefined) {
frame_width += '"' + video_width + '" ';
} else {
frame_width += '"" ';
}
if (video_height !== undefined) {
frame_height += '"' + video_height + '" ';
} else {
frame_height += '"" ';
}
video_frame = '<iframe type="text/html" ' + frame_width + frame_height + ' src="//www.youtube-nocookie.com/embed/' + video_id + '?' + params + '" frameborder="0"></iframe>';
return video_frame;
});
},
"fallback": function () {
"use strict";
var id = 'youtube';
tarteaucitron.fallback(['youtube_player'], function (elem) {
elem.style.width = elem.getAttribute('width') + 'px';
elem.style.height = elem.getAttribute('height') + 'px';
return tarteaucitron.engage(id);
});
}
};
// zopim
tarteaucitron.services.zopim = {
"key": "zopim",
"type": "support",
"name": "Zopim",
"uri": "https://www.zopim.com/privacy",
"needConsent": true,
"cookies": ['__zlcid', '__zprivacy'],
"js": function () {
"use strict";
if (tarteaucitron.user.zopimID === undefined) {
return;
}
tarteaucitron.addScript('//v2.zopim.com/?' + tarteaucitron.user.zopimID);
}
};