From 5b50bfcb3e2355f315ccad0962007db652996dff Mon Sep 17 00:00:00 2001 From: Euan Cameron Date: Mon, 23 Apr 2018 09:52:25 +0100 Subject: [PATCH 01/22] Add _gat_gtag_UA cookie to gtag cookies array --- tarteaucitron.services.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tarteaucitron.services.js b/tarteaucitron.services.js index 81ea5c7..6c42d72 100644 --- a/tarteaucitron.services.js +++ b/tarteaucitron.services.js @@ -871,7 +871,13 @@ tarteaucitron.services.gtag = { "name": "Google Analytics (gtag.js)", "uri": "https://support.google.com/analytics/answer/6004245", "needConsent": true, - "cookies": ['_ga', '_gat', '_gid', '__utma', '__utmb', '__utmc', '__utmt', '__utmz'], + "cookies": (function () { + // Add _gat_gtag_UA_XXXXXXX_XX cookie to cookies array + var gatGtagUaCookie = '_gat_gtag_' + tarteaucitron.user.gtagUa; + gatGtagUaCookie = gatGtagUaCookie.replace(/-/g, '_'); + cookies = ['_ga', '_gat', '_gid', '__utma', '__utmb', '__utmc', '__utmt', '__utmz', gatGtagUaCookie]; + return cookies; + })(), "js": function () { "use strict"; window.dataLayer = window.dataLayer || []; From d02bcca16d05828ace0ac461163d34d153d9ba97 Mon Sep 17 00:00:00 2001 From: Euan Cameron Date: Mon, 23 Apr 2018 10:25:09 +0100 Subject: [PATCH 02/22] Add _gat_gtag_UA cookie to gtag cookies array - Removed unneeded variable --- tarteaucitron.services.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tarteaucitron.services.js b/tarteaucitron.services.js index 6c42d72..c072580 100644 --- a/tarteaucitron.services.js +++ b/tarteaucitron.services.js @@ -875,8 +875,7 @@ tarteaucitron.services.gtag = { // Add _gat_gtag_UA_XXXXXXX_XX cookie to cookies array var gatGtagUaCookie = '_gat_gtag_' + tarteaucitron.user.gtagUa; gatGtagUaCookie = gatGtagUaCookie.replace(/-/g, '_'); - cookies = ['_ga', '_gat', '_gid', '__utma', '__utmb', '__utmc', '__utmt', '__utmz', gatGtagUaCookie]; - return cookies; + return ['_ga', '_gat', '_gid', '__utma', '__utmb', '__utmc', '__utmt', '__utmz', gatGtagUaCookie]; })(), "js": function () { "use strict"; From eeaa77de33640b63a4b06d62a0d1508efbf9e01f Mon Sep 17 00:00:00 2001 From: Christian Oliff Date: Tue, 24 Apr 2018 16:45:13 +0900 Subject: [PATCH 03/22] Always load Google Analytics over HTTPS Recommended by Google - and is safer and faster --- tarteaucitron.services.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tarteaucitron.services.js b/tarteaucitron.services.js index 81ea5c7..761209f 100644 --- a/tarteaucitron.services.js +++ b/tarteaucitron.services.js @@ -854,7 +854,7 @@ tarteaucitron.services.analytics = { }; window.ga.l = new Date(); - tarteaucitron.addScript('//www.google-analytics.com/analytics.js', '', function () { + tarteaucitron.addScript('https://www.google-analytics.com/analytics.js', '', function () { ga('create', tarteaucitron.user.analyticsUa, {'cookieExpires': 34128000}); ga('send', 'pageview'); if (typeof tarteaucitron.user.analyticsMore === 'function') { @@ -876,7 +876,7 @@ tarteaucitron.services.gtag = { "use strict"; window.dataLayer = window.dataLayer || []; - tarteaucitron.addScript('//www.googletagmanager.com/gtag/js?id=' + tarteaucitron.user.gtagUa, '', function () { + tarteaucitron.addScript('https://www.googletagmanager.com/gtag/js?id=' + tarteaucitron.user.gtagUa, '', function () { function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); gtag('config', tarteaucitron.user.gtagUa); From fa024eb3f39e6d3efdee80e7de62e1497e36dc50 Mon Sep 17 00:00:00 2001 From: David Date: Thu, 26 Apr 2018 16:13:28 +0200 Subject: [PATCH 04/22] adding webmecanik service --- tarteaucitron.services.js | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/tarteaucitron.services.js b/tarteaucitron.services.js index 81ea5c7..48e14ea 100644 --- a/tarteaucitron.services.js +++ b/tarteaucitron.services.js @@ -1848,3 +1848,26 @@ tarteaucitron.services.facebookpixel = { } }; +// webmecanik +tarteaucitron.services.webmecanik = { + "key": "webmecanik", + "type": "analytic", + "name": "Webmecanik", + "uri": "https://webmecanik.com/tos", + "needConsent": true, + "cookies": ['mtc_id', 'mtc_sid'], + "js": function () { + "use strict"; + if (tarteaucitron.user.webmecanikurl === undefined) { + return; + } + window['WebmecanikTrackingObject'] = 'mt'; + window['mt'] = window['mt'] || function() { + (window['mt'].q = window['mt'].q || []).push(arguments); + }; + + tarteaucitron.addScript(tarteaucitron.user.webmecanikurl, '', function() { + mt('send', 'pageview'); + }); + } +}; \ No newline at end of file From 24fb4ed4005e84a8f1b1e54c6f1f1513537a6774 Mon Sep 17 00:00:00 2001 From: Norman Pracht - Webmecanik Date: Thu, 26 Apr 2018 16:43:13 +0200 Subject: [PATCH 05/22] update readme to add Webmecanik automation also i noticed that mautic is missing in the list. i created a new category :) --- README.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 2cbfb3a..6df3e5e 100644 --- a/README.md +++ b/README.md @@ -56,7 +56,11 @@ Bonus: * Comment * Disqus * Facebook (commentaire) - + +* Marketing Automation & CRM + * Mautic + * Webmecanik Automation + * Social network * AddThis * AddToAny (feed) From 52fe843be604b3ef0fd0253c19d7d9d980a77a1f Mon Sep 17 00:00:00 2001 From: Encre Informatique Date: Tue, 22 May 2018 12:21:41 -0300 Subject: [PATCH 06/22] Fixed #89 : spanish translation for settings The sentence has been modified as stated in the issue. A couple of translation have been modified. --- lang/tarteaucitron.es.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lang/tarteaucitron.es.js b/lang/tarteaucitron.es.js index 65e5f9b..512d805 100644 --- a/lang/tarteaucitron.es.js +++ b/lang/tarteaucitron.es.js @@ -1,7 +1,7 @@ /*global tarteaucitron */ tarteaucitron.lang = { "adblock": "Hola! Este sitio web es transparente y le da la opción de activar los servicios de terceros.", - "adblock_call": "Por favor deshabilite su AdBlocker para comenzar a personalizar.", + "adblock_call": "Por favor deshabilite su AdBlocker para empezar a personalizar los servicios.", "reload": "Actualizar esta página", "alertBigScroll": "Al continuar para desplazarse,", @@ -14,7 +14,7 @@ tarteaucitron.lang = { "acceptAll": "OK, aceptar todas", "close": "Cerrar", - "all": "Preference for all services", + "all": "Ajustes para todos los servicios", "info": "Protegiendo tu privacidad", "disclaimer": "Aceptando estos servicios terceros, estas aceptando sus cookies y el uso de tecnologías de rastreo necesarias para su correcto funcionamiento.", @@ -28,7 +28,7 @@ tarteaucitron.lang = { "source": "Ver sitio web oficial", "credit": "Gestor de cookies realizada por tarteaucitron.js", - "fallback": "esta deshabilitado.", + "fallback": "está deshabilitado.", "ads": { "title": "Red de publicidad", From 263fa2fd4696562f18a7b7eee63e90d87809b6f1 Mon Sep 17 00:00:00 2001 From: Encre Informatique Date: Tue, 22 May 2018 12:26:07 -0300 Subject: [PATCH 07/22] Fixed #93 : dutch translation The Dutch translation has been added according to the issue. Beware I cannot check the translation itself. The nl locale has been added to the main script. --- lang/tarteaucitron.nl.js | 65 ++++++++++++++++++++++++++++++++++++++++ tarteaucitron.js | 4 ++- 2 files changed, 68 insertions(+), 1 deletion(-) create mode 100644 lang/tarteaucitron.nl.js diff --git a/lang/tarteaucitron.nl.js b/lang/tarteaucitron.nl.js new file mode 100644 index 0000000..f5f6fa7 --- /dev/null +++ b/lang/tarteaucitron.nl.js @@ -0,0 +1,65 @@ +/*global tarteaucitron */ +tarteaucitron.lang = { + "adblock": "Hallo! Deze site is transparant en laat u de services van derden kiezen die u wilt toestaan.", + "adblock_call": "Schakel uw adblocker uit om te beginnen met aanpassen.", + "reload": "Ververs de pagina", + + "alertBigScroll": "Door te blijven scrollen,", + "alertBigClick": "Als je doorgaat met het surfen op deze website,", + "alertBig": "staat je alle diensten van derden toe", + + "alertBigPrivacy": "Deze site maakt gebruik van cookies en geeft u controle over wat u wilt activeren", + "alertSmall": "Beheer instellingen", + "personalize": "Personaliseer", + "acceptAll": "OK, accepteer alle", + "close": "Sluit", + + "all": "Voorkeur voor alle diensten", + + "info": "Bescherming van uw privacy", + "disclaimer": "Door deze services van derden toe te staan, accepteert u hun cookies en het gebruik van trackingtechnologieën die nodig zijn voor hun goede werking.", + "allow": "Toestaan", + "deny": "Weigeren", + "noCookie": "Deze service gebruikt geen cookie", + "useCookie": "Deze service kan worden geïnstalleerd", + "useCookieCurrent": "Deze service is geïnstalleerd", + "useNoCookie": "Deze service heeft geen cookies geïnstalleerd.", + "more": "Lees meer", + "source": "Bekijk de officiële website", + "credit": "Cookie manager mogelijk gemakt door tarteaucitron.js", + + "fallback": "is uitgeschakeld.", + + "ads": { + "title": "Advertentienetwerk", + "details": "Advertentienetwerken kunnen inkomsten genereren door advertentieruimte op de site te verkopen." + }, + "analytic": { + "title": "Bezoekers meting", + "details": "De bezoekersdiensten voor het publiek worden gebruikt om nuttige statistieken te genereren om de site te verbeteren." + }, + "social": { + "title": "Sociale netwerken", + "details": "Sociale netwerken kunnen de bruikbaarheid van de site verbeteren en helpen deze via de shares te promoten." + }, + "video": { + "title": "Videos", + "details": "Video sharing-services helpen om rich media op de site toe te voegen en de zichtbaarheid ervan te vergroten." + }, + "comment": { + "title": "Comments", + "details": "Commentsmanagers faciliteren het indienen van opmerkingen en het bestrijden van spam." + }, + "support": { + "title": "Support", + "details": "Support diensten stellen u in staat contact op te nemen met het team van de site en helpen het te verbeteren." + }, + "api": { + "title": "APIs", + "details": "APIs worden gebruikt om scripts te laden: geolocatie, zoekmachines, vertalingen, ..." + }, + "other": { + "title": "Overig", + "details": "Diensten om webinhoud weer te geven." + } +}; diff --git a/tarteaucitron.js b/tarteaucitron.js index 88cd673..cfe1cb5 100644 --- a/tarteaucitron.js +++ b/tarteaucitron.js @@ -1040,7 +1040,7 @@ var tarteaucitron = { "use strict"; if (!navigator) { return 'en'; } - var availableLanguages = 'cs,en,fr,es,it,de,pt,pl,ru', + var availableLanguages = 'cs,en,fr,es,it,de,nl,pt,pl,ru', defaultLanguage = 'en', lang = navigator.language || navigator.browserLanguage || navigator.systemLanguage || navigator.userLang || null, @@ -1077,6 +1077,8 @@ var tarteaucitron = { return 'it_IT'; } else if (userLanguage === 'pt') { return 'pt_PT'; + } else if (userLanguage === 'nl') { + return 'nl_NL'; } else { return 'en_US'; } From a5f0900963b1025ce03e073aed72052e497655c6 Mon Sep 17 00:00:00 2001 From: Thomas Combe Date: Thu, 24 May 2018 09:47:44 +0200 Subject: [PATCH 08/22] Allow user to select tarteaucitron cookie domain (for multi-site) --- tarteaucitron.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/tarteaucitron.js b/tarteaucitron.js index 88cd673..0cada71 100644 --- a/tarteaucitron.js +++ b/tarteaucitron.js @@ -865,14 +865,15 @@ var tarteaucitron = { expireTime = time + 31536000000, // 365 days regex = new RegExp("!" + key + "=(wait|true|false)", "g"), cookie = tarteaucitron.cookie.read().replace(regex, ""), - value = 'tarteaucitron=' + cookie + '!' + key + '=' + status; - - if (tarteaucitron.cookie.read().indexOf(key + '=' + status) === -1) { + value = 'tarteaucitron=' + cookie + '!' + key + '=' + status, + domain = (tarteaucitron.parameters.cookieDomain !== undefined && tarteaucitron.parameters.cookieDomain !== '') ? 'domain=' + tarteaucitron.parameters.cookieDomain + ';' : ''; + + if (tarteaucitron.cookie.read().indexOf(key + '=' + status) === -1) { tarteaucitron.pro('!' + key + '=' + status); } d.setTime(expireTime); - document.cookie = value + '; expires=' + d.toGMTString() + '; path=/;'; + document.cookie = value + '; expires=' + d.toGMTString() + '; path=/;' + domain; }, "read": function () { "use strict"; From 7143dc9258853a103b0e7c938992a6fbea4dd0c0 Mon Sep 17 00:00:00 2001 From: Fabian Christen Date: Fri, 25 May 2018 11:12:56 +0200 Subject: [PATCH 09/22] Add service for Issuu (www.issuu.com) Iframe embed --- README.md | 1 + tarteaucitron.services.js | 139 +++++++++++++++++++++++++------------- 2 files changed, 93 insertions(+), 47 deletions(-) diff --git a/README.md b/README.md index 2cbfb3a..e7b2fc4 100644 --- a/README.md +++ b/README.md @@ -85,6 +85,7 @@ Bonus: * SlideShare * Vimeo * YouTube + * Issuu ## Visitors outside the EU diff --git a/tarteaucitron.services.js b/tarteaucitron.services.js index 81ea5c7..08e49bd 100644 --- a/tarteaucitron.services.js +++ b/tarteaucitron.services.js @@ -15,7 +15,7 @@ tarteaucitron.services.iframe = { var width = x.getAttribute("width"), height = x.getAttribute("height"), url = x.getAttribute("data-url"); - + return ''; }); }, @@ -143,7 +143,7 @@ tarteaucitron.services.amazon = { 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®ion=' + tarteaucitron.getLanguage().toUpperCase() + '&placement=' + productId + '&asins=' + productId + '&show_border=true&link_opens_in_new_window=true', iframe = ''; - + return iframe; }); }, @@ -169,7 +169,7 @@ tarteaucitron.services.calameo = { width = x.getAttribute("width"), height = x.getAttribute("height"), url = '//v.calameo.com/?bkcode=' + id; - + return ''; }); }, @@ -227,13 +227,13 @@ tarteaucitron.services.clicmanager = { uniqIds.push(uniqId); return '
'; }); - + 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]); } }, @@ -254,11 +254,11 @@ tarteaucitron.services.crazyegg = { "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'); } }; @@ -283,7 +283,7 @@ tarteaucitron.services.criteo = { uniqIds.push(uniqId); return '
'; }); - + for (i = 0; i < uniqIds.length; i += 1) { uri = '//cas.criteo.com/delivery/ajs.php?'; uri += 'zoneid=' + document.getElementById(uniqIds[i]).getAttribute('zoneid'); @@ -296,7 +296,7 @@ tarteaucitron.services.criteo = { 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]); } }, @@ -325,7 +325,7 @@ tarteaucitron.services.dailymotion = { frame_height = 'height=', video_frame, params = 'info=' + x.getAttribute("showinfo") + '&autoPlay=' + x.getAttribute("autoplay"); - + if (video_id === undefined) { return ""; } @@ -376,7 +376,7 @@ tarteaucitron.services.datingaffiliation = { width = x.getAttribute("width"), height = x.getAttribute("height"), url = 'http://www.tools-affil2.com/rotaban/ban.php?' + comfrom; - + return ''; }); }, @@ -410,7 +410,7 @@ tarteaucitron.services.datingaffiliationpopup = { uniqIds.push(uniqId); return '
'; }); - + for (i = 0; i < uniqIds.length; i += 1) { uri = 'http://www.promotools.biz/da/popunder/script.php?'; uri += 'comfrom=' + document.getElementById(uniqIds[i]).getAttribute('comfrom') + '&'; @@ -433,7 +433,7 @@ tarteaucitron.services.datingaffiliationpopup = { uri += 'snd=' + document.getElementById(uniqIds[i]).getAttribute('snd') + '&'; uri += 'aabd=' + document.getElementById(uniqIds[i]).getAttribute('aabd') + '&'; uri += 'aabs=' + document.getElementById(uniqIds[i]).getAttribute('aabs'); - + tarteaucitron.makeAsync.init(uri, uniqIds[i]); } }, @@ -463,7 +463,7 @@ tarteaucitron.services.disqus = { "fallback": function () { "use strict"; var id = 'disqus'; - + if (document.getElementById('disqus_thread')) { document.getElementById('disqus_thread').innerHTML = tarteaucitron.engage(id); } @@ -638,7 +638,7 @@ tarteaucitron.services.getplus = { 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'); @@ -753,7 +753,7 @@ tarteaucitron.services.adsensesearchresult = { "fallback": function () { "use strict"; var id = 'adsensesearchresult'; - + if (document.getElementById('gcse_searchresults')) { document.getElementById('gcse_searchresults').innerHTML = tarteaucitron.engage(id); } @@ -773,7 +773,7 @@ tarteaucitron.services.googleadwordsconversion = { 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, @@ -805,7 +805,7 @@ tarteaucitron.services.googleadwordsremarketing = { 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, @@ -828,7 +828,7 @@ tarteaucitron.services.gajs = { 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(); @@ -853,7 +853,7 @@ tarteaucitron.services.analytics = { 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'); @@ -875,12 +875,12 @@ tarteaucitron.services.gtag = { "js": function () { "use strict"; window.dataLayer = window.dataLayer || []; - + tarteaucitron.addScript('//www.googletagmanager.com/gtag/js?id=' + tarteaucitron.user.gtagUa, '', function () { function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); gtag('config', tarteaucitron.user.gtagUa); - + if (typeof tarteaucitron.user.gtagMore === 'function') { tarteaucitron.user.gtagMore(); } @@ -915,7 +915,7 @@ tarteaucitron.services.googlemaps = { uniqIds.push(uniqId); return '
'; }); - + for (i = 0; i < uniqIds.length; i += 1) { mapOptions = { zoom: parseInt(document.getElementById(uniqIds[i]).getAttribute('zoom'), 10), @@ -1006,12 +1006,12 @@ tarteaucitron.services.mautic = { if (tarteaucitron.user.mauticurl === undefined) { return; } - + window['MauticTrackingObject'] = 'mt'; window['mt'] = window['mt'] || function() { (window['mt'].q = window['mt'].q || []).push(arguments); }; - + tarteaucitron.addScript(tarteaucitron.user.mauticurl, '', function() { mt('send', 'pageview'); }); @@ -1031,7 +1031,7 @@ tarteaucitron.services.microsoftcampaignanalytics = { if (tarteaucitron.user.microsoftcampaignanalyticsUUID === undefined) { return; } - + tarteaucitron.addScript('//flex.atdmt.com/mstag/site/' + tarteaucitron.user.microsoftcampaignanalyticsUUID + '/mstag.js', 'mstag_tops', function () { window.mstag = {loadTag : function () {}, time : (new Date()).getTime()}; window.mstag.loadTag("analytics", {dedup: "1", domainId: tarteaucitron.user.microsoftcampaignanalyticsdomainId, type: "1", actionid: tarteaucitron.user.microsoftcampaignanalyticsactionId}); @@ -1078,14 +1078,14 @@ tarteaucitron.services.prelinker = { uniqIds.push(uniqId); return '
'; }); - + for (i = 0; i < uniqIds.length; i += 1) { uri = 'http://promo.easy-dating.org/banner/index?'; uri += 'site_id=' + document.getElementById(uniqIds[i]).getAttribute('siteId') + '&'; uri += 'banner_id=' + document.getElementById(uniqIds[i]).getAttribute('bannerId') + '&'; uri += 'default_language=' + document.getElementById(uniqIds[i]).getAttribute('defaultLanguage') + '&'; uri += 'tr4ck=' + document.getElementById(uniqIds[i]).getAttribute('trackrt'); - + tarteaucitron.makeAsync.init(uri, uniqIds[i]); } }, @@ -1111,7 +1111,7 @@ tarteaucitron.services.prezi = { width = x.getAttribute("width"), height = x.getAttribute("height"), url = 'https://prezi.com/embed/' + id + '/?bgcolor=ffffff&lock_to_path=0&autoplay=0&autohide_ctrls=0'; - + return ''; }); }, @@ -1145,12 +1145,12 @@ tarteaucitron.services.pubdirecte = { uniqIds.push(uniqId); return '
'; }); - + 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]); } }, @@ -1174,7 +1174,7 @@ tarteaucitron.services.purechat = { if (tarteaucitron.user.purechatId === undefined) { return; } - + tarteaucitron.addScript('//app.purechat.com/VisitorWidget/WidgetScript', '', function () { try { window.w = new PCWidget({ c: tarteaucitron.user.purechatId, f: true }); @@ -1196,7 +1196,7 @@ tarteaucitron.services.shareaholic = { if (tarteaucitron.user.shareaholicSiteId === undefined) { return; } - + tarteaucitron.fallback(['shareaholic-canvas'], ''); tarteaucitron.addScript('//dsms0mj1bbhn4.cloudfront.net/assets/pub/shareaholic.js', '', function () { try { @@ -1230,7 +1230,7 @@ tarteaucitron.services.shareasale = { uniqIds.push(uniqId); return '
'; }); - + for (i = 0; i < uniqIds.length; i += 1) { uri = 'https://shareasale.com/sale.cfm?'; uri += 'amount=' + document.getElementById(uniqIds[i]).getAttribute('amount') + '&'; @@ -1240,7 +1240,7 @@ tarteaucitron.services.shareasale = { uri += 'perlead=' + document.getElementById(uniqIds[i]).getAttribute('perlead') + '&'; uri += 'perhit=' + document.getElementById(uniqIds[i]).getAttribute('perhit') + '&'; uri += 'merchantID=' + document.getElementById(uniqIds[i]).getAttribute('merchantID'); - + document.getElementById(uniqIds[i]).innerHTML = ''; } }, @@ -1266,12 +1266,12 @@ tarteaucitron.services.sharethis = { } 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(); @@ -1300,7 +1300,7 @@ tarteaucitron.services.slideshare = { width = x.getAttribute("width"), height = x.getAttribute("height"), url = '//www.slideshare.net/slideshow/embed_code/' + id; - + return ''; }); }, @@ -1334,7 +1334,7 @@ tarteaucitron.services.statcounter = { uniqIds.push(uniqId); return '
'; }); - + for (i = 0; i < uniqIds.length; i += 1) { tarteaucitron.makeAsync.init(uri, uniqIds[i]); } @@ -1414,11 +1414,11 @@ tarteaucitron.services.twenga = { "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'); } }; @@ -1471,7 +1471,7 @@ tarteaucitron.services.twitterembed = { html += '>'; 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]); @@ -1555,7 +1555,7 @@ tarteaucitron.services.vimeo = { video_height = x.getAttribute("height"), frame_height = 'height=', video_frame; - + if (video_id === undefined) { return ""; } @@ -1676,10 +1676,10 @@ tarteaucitron.services.xiti = { 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(); } @@ -1704,7 +1704,7 @@ tarteaucitron.services.youtube = { 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 ""; } @@ -1751,7 +1751,7 @@ tarteaucitron.services.youtubeplaylist = { 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 (playlist_id === undefined) { return ""; } @@ -1848,3 +1848,48 @@ tarteaucitron.services.facebookpixel = { } }; +//Issuu +tarteaucitron.services.issuu = { + "key": "issuu", + "type": "other", + "name": "Issuu", + "uri": "https://issuu.com/legal/privacy", + "needConsent": true, + "cookies": ['__qca', 'iutk', 'mc'], + "js": function () { + "use strict"; + tarteaucitron.fallback(['issuu_player'], function (x) { + var issuu_id = x.getAttribute("issuuID"), + issuu_width = x.getAttribute("width"), + frame_width = 'width=', + issuu_height = x.getAttribute("height"), + frame_height = 'height=', + issuu_frame; + + if (issuu_id === undefined) { + return ""; + } + if (issuu_width !== undefined) { + frame_width += '"' + issuu_width + '" '; + } else { + frame_width += '"" '; + } + if (issuu_height !== undefined) { + frame_height += '"' + issuu_height + '" '; + } else { + frame_height += '"" '; + } + issuu_frame = ''; + return issuu_frame; + }); + }, + "fallback": function () { + "use strict"; + var id = 'issuu'; + tarteaucitron.fallback(['issuu_player'], function (elem) { + elem.style.width = elem.getAttribute('width') + 'px'; + elem.style.height = elem.getAttribute('height') + 'px'; + return tarteaucitron.engage(id); + }); + } +}; From a4bae2d1e3bbfa146662cec714d4e4b03d33625b Mon Sep 17 00:00:00 2001 From: Thomas Combe Date: Fri, 25 May 2018 16:05:48 +0200 Subject: [PATCH 10/22] Add how to use it --- README.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/README.md b/README.md index 2cbfb3a..2cd12a2 100644 --- a/README.md +++ b/README.md @@ -99,3 +99,23 @@ In PHP for example, you can bypass all the script by setting this var `tarteauci # Installation guide [Visit opt-out.ferank.eu](https://opt-out.ferank.eu/) + + +# How to use + +```html + + + +``` From bc451eb573407d3548a5ac865f844bd730f9a85f Mon Sep 17 00:00:00 2001 From: Amauri CHAMPEAUX Date: Fri, 25 May 2018 23:49:34 +0200 Subject: [PATCH 11/22] Add reCAPTCHA --- tarteaucitron.services.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/tarteaucitron.services.js b/tarteaucitron.services.js index ee91c55..f5f4e27 100644 --- a/tarteaucitron.services.js +++ b/tarteaucitron.services.js @@ -973,6 +973,20 @@ tarteaucitron.services.jsapi = { } }; +// recaptcha +tarteaucitron.services.recaptcha = { + "key": "recaptcha", + "type": "api", + "name": "reCAPTCHA", + "uri": "http://www.google.com/policies/privacy/", + "needConsent": true, + "cookies": ['nid'], + "js": function () { + "use strict"; + tarteaucitron.addScript('https://www.google.com/recaptcha/api.js'); + } +}; + // linkedin tarteaucitron.services.linkedin = { "key": "linkedin", From da6b132f488b45a06140c0346ead1f2fb821ff0f Mon Sep 17 00:00:00 2001 From: Ricci Dorian Date: Sat, 2 Jun 2018 23:19:51 +0200 Subject: [PATCH 12/22] Added iframe google maps with search query --- tarteaucitron.services.js | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/tarteaucitron.services.js b/tarteaucitron.services.js index 50f07dc..35a6c05 100644 --- a/tarteaucitron.services.js +++ b/tarteaucitron.services.js @@ -937,6 +937,38 @@ tarteaucitron.services.googlemaps = { } }; +// googlemaps search +tarteaucitron.services.googlemapssearch = { + "key": "googlemapssearch", + "type": "api", + "name": "Google Maps Seard API", + "uri": "http://www.google.com/ads/preferences/", + "needConsent": true, + "cookies": ['nid'], + "js": function () { + "use strict"; + tarteaucitron.fallback(['googlemapssearch'], function (x) { + var width = x.getAttribute("width"), + height = x.getAttribute("height"), + // url = x.getAttribute("data-url"); + query = escape(x.getAttribute("data-search")), + key = x.getAttribute("data-api-key"); + + // return ''; + return ' ' + }); + }, + "fallback": function () { + "use strict"; + var id = 'googlemapssearch'; + tarteaucitron.fallback(['googlemapssearch'], function (elem) { + elem.style.width = elem.getAttribute('width') + 'px'; + elem.style.height = elem.getAttribute('height') + 'px'; + return tarteaucitron.engage(id); + }); + } +}; + // google tag manager tarteaucitron.services.googletagmanager = { "key": "googletagmanager", From cf3a58fa86974eb5cd4fddd30c23ab437e2687d5 Mon Sep 17 00:00:00 2001 From: Ricci Dorian Date: Sun, 3 Jun 2018 13:10:37 +0200 Subject: [PATCH 13/22] added customisation of time cookie expire --- tarteaucitron.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/tarteaucitron.js b/tarteaucitron.js index 0cada71..d8d2c14 100644 --- a/tarteaucitron.js +++ b/tarteaucitron.js @@ -6,6 +6,8 @@ var scripts = document.getElementsByTagName('script'), cdn = path.split('/').slice(0, -1).join('/') + '/', alreadyLaunch = (alreadyLaunch === undefined) ? 0 : alreadyLaunch, tarteaucitronForceLanguage = (tarteaucitronForceLanguage === undefined) ? '' : tarteaucitronForceLanguage, + tarteaucitronForceExpire = (tarteaucitronForceExpire === undefined) ? '' : tarteaucitronForceExpire, + timeExipre = 31536000000, tarteaucitronProLoadServices, tarteaucitronNoAdBlocker = false; @@ -860,9 +862,15 @@ var tarteaucitron = { "owner": {}, "create": function (key, status) { "use strict"; + + if (tarteaucitronForceExpire !== '') { + // The number of day cann't be higher than 1 year + timeExipre = (tarteaucitronForceExpire > 365) ? 31536000000 : tarteaucitronForceExpire * 86400000; // Multiplication to tranform the number of days to milliseconds + } + var d = new Date(), time = d.getTime(), - expireTime = time + 31536000000, // 365 days + expireTime = time + timeExipre, // 365 days regex = new RegExp("!" + key + "=(wait|true|false)", "g"), cookie = tarteaucitron.cookie.read().replace(regex, ""), value = 'tarteaucitron=' + cookie + '!' + key + '=' + status, From b35fb330142989c43584b21ceb54bf15bac913bf Mon Sep 17 00:00:00 2001 From: eldk Date: Mon, 11 Jun 2018 14:01:46 +0200 Subject: [PATCH 14/22] allow tarteaucitronAlertSmall to be at top when orientation is set to top. On mobile, when Adsense Auto Ads is in use, and orientation to bottom, the small alert should be behind ads. This allow alert to be at top and unhide it. --- css/tarteaucitron.css | 12 ++++++++++-- tarteaucitron.js | 2 +- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/css/tarteaucitron.css b/css/tarteaucitron.css index d0f24c8..3b0951d 100644 --- a/css/tarteaucitron.css +++ b/css/tarteaucitron.css @@ -364,9 +364,17 @@ /*** * Small alert */ + +.tarteaucitronAlertSmallTop { + top: 0; +} + +.tarteaucitronAlertSmallBottom { + bottom: 0; +} + #tarteaucitronAlertSmall { background: #333; - bottom: 0; display: none; padding: 0; position: fixed; @@ -542,4 +550,4 @@ ins.ferank-publicite, ins.adsbygoogle { div.amazon_product { height:240px; width:120px; -} \ No newline at end of file +} diff --git a/tarteaucitron.js b/tarteaucitron.js index 0cada71..29347a7 100644 --- a/tarteaucitron.js +++ b/tarteaucitron.js @@ -296,7 +296,7 @@ var tarteaucitron = { } if (defaults.showAlertSmall === true) { - html += '
'; + html += '
'; html += '
'; html += ' ' + tarteaucitron.lang.alertSmall; html += '
'; From 87d590e4762fe0f39f02acc11b5757ccf916d3b9 Mon Sep 17 00:00:00 2001 From: eldk Date: Tue, 12 Jun 2018 01:52:31 +0200 Subject: [PATCH 15/22] add DNT DoNotTrack Support : When browser make request with DNT header set to yes or 1, set all services to false and service.fallback if needed. tarteaucitronAlertBig is not displayed/needed but tarteaucitronAlertSmall is. --- tarteaucitron.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tarteaucitron.js b/tarteaucitron.js index 0cada71..81b806c 100644 --- a/tarteaucitron.js +++ b/tarteaucitron.js @@ -405,6 +405,7 @@ var tarteaucitron = { isDenied = (cookie.indexOf(service.key + '=false') >= 0) ? true : false, isAllowed = (cookie.indexOf(service.key + '=true') >= 0) ? true : false, isResponded = (cookie.indexOf(service.key + '=false') >= 0 || cookie.indexOf(service.key + '=true') >= 0) ? true : false; + isDNTRequested = (navigator.doNotTrack === "1" || navigator.doNotTrack === "yes" || navigator.msDoNotTrack === "1" || window.doNotTrack === "1") ? true : false; if (tarteaucitron.added[service.key] !== true) { tarteaucitron.added[service.key] = true; @@ -462,6 +463,13 @@ var tarteaucitron = { } tarteaucitron.state[service.key] = false; tarteaucitron.userInterface.color(service.key, false); + } else if (!isResponded && isDNTRequested) { + tarteaucitron.cookie.create(service.key, 'false'); + if (typeof service.fallback === 'function') { + service.fallback(); + } + tarteaucitron.state[service.key] = false; + tarteaucitron.userInterface.color(service.key, false); } else if (!isResponded) { tarteaucitron.cookie.create(service.key, 'wait'); if (typeof service.fallback === 'function') { From d20fe6798a9d405c295d46d6f7f03bb4e96dd92a Mon Sep 17 00:00:00 2001 From: eldk Date: Tue, 12 Jun 2018 16:09:35 +0200 Subject: [PATCH 16/22] =?UTF-8?q?add=20option=20to=20enable=20DoNotTrackSu?= =?UTF-8?q?pport=20support=20:=20default=20:=20false=20to=20enable=20add?= =?UTF-8?q?=20:=20"handleBrowserDNTRequest":=20true=20/*=20R=C3=A9pondre?= =?UTF-8?q?=20au=20DoNotTrack=20du=20navigateur*/=20to=20on=20page=20tarte?= =?UTF-8?q?aucitron.init=20script.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tarteaucitron.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tarteaucitron.js b/tarteaucitron.js index 81b806c..1fa353b 100644 --- a/tarteaucitron.js +++ b/tarteaucitron.js @@ -183,7 +183,8 @@ var tarteaucitron = { "orientation": "top", "removeCredit": false, "showAlertSmall": true, - "cookieslist": true + "cookieslist": true, + "handleBrowserDNTRequest": false }, params = tarteaucitron.parameters; @@ -196,6 +197,7 @@ var tarteaucitron = { tarteaucitron.orientation = defaults.orientation; tarteaucitron.hashtag = defaults.hashtag; tarteaucitron.highPrivacy = defaults.highPrivacy; + tarteaucitron.handleBrowserDNTRequest = defaults.handleBrowserDNTRequest; // Step 1: load css linkElement.rel = 'stylesheet'; @@ -463,7 +465,7 @@ var tarteaucitron = { } tarteaucitron.state[service.key] = false; tarteaucitron.userInterface.color(service.key, false); - } else if (!isResponded && isDNTRequested) { + } else if (!isResponded && isDNTRequested && tarteaucitron.handleBrowserDNTRequest) { tarteaucitron.cookie.create(service.key, 'false'); if (typeof service.fallback === 'function') { service.fallback(); From 9be7b802167c1fb35b8bc1c7e8f7a027faee37d1 Mon Sep 17 00:00:00 2001 From: eldk Date: Tue, 12 Jun 2018 16:35:02 +0200 Subject: [PATCH 17/22] add DoNotTrack (handleBrowserDNTRequest) option to doc --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index be5c5c2..bc0dbd1 100644 --- a/README.md +++ b/README.md @@ -119,6 +119,7 @@ tarteaucitron.init({ "showAlertSmall": true, /* afficher le petit bandeau en bas à droite ? */ "cookieslist": true, /* Afficher la liste des cookies installés ? */ "removeCredit": false, /* supprimer le lien vers la source ? */ + "handleBrowserDNTRequest": false, /* Répondre au DoNotTrack du navigateur ?*/ "cookieDomain": ".my-multisite-domaine.fr" /* Nom de domaine sur lequel sera posé le cookie - pour les multisites / sous-domaines - Facultatif */ }); From 2c755da28e4d71c40578c2b42eff4be7206cf06c Mon Sep 17 00:00:00 2001 From: encreinformatique Date: Thu, 14 Jun 2018 11:51:25 +0200 Subject: [PATCH 18/22] Fix couple of mispelling Line 9 and 29 have been modified to fix a mispelling. Thank you @johandenhollander --- lang/tarteaucitron.nl.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lang/tarteaucitron.nl.js b/lang/tarteaucitron.nl.js index f5f6fa7..dda9e78 100644 --- a/lang/tarteaucitron.nl.js +++ b/lang/tarteaucitron.nl.js @@ -6,7 +6,7 @@ tarteaucitron.lang = { "alertBigScroll": "Door te blijven scrollen,", "alertBigClick": "Als je doorgaat met het surfen op deze website,", - "alertBig": "staat je alle diensten van derden toe", + "alertBig": "sta je alle diensten van derden toe", "alertBigPrivacy": "Deze site maakt gebruik van cookies en geeft u controle over wat u wilt activeren", "alertSmall": "Beheer instellingen", @@ -26,7 +26,7 @@ tarteaucitron.lang = { "useNoCookie": "Deze service heeft geen cookies geïnstalleerd.", "more": "Lees meer", "source": "Bekijk de officiële website", - "credit": "Cookie manager mogelijk gemakt door tarteaucitron.js", + "credit": "Cookie manager mogelijk gemaakt door tarteaucitron.js", "fallback": "is uitgeschakeld.", From 43438682c74c40d911a38adacfcaed9534bc5ab8 Mon Sep 17 00:00:00 2001 From: Ozee31 Date: Fri, 15 Jun 2018 15:31:42 +0200 Subject: [PATCH 19/22] fix Uncaught TypeError: Cannot set property 'push' of undefined if tarteaucitron.job is undefined --- tarteaucitron.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/tarteaucitron.js b/tarteaucitron.js index 3d8e718..8b9b361 100644 --- a/tarteaucitron.js +++ b/tarteaucitron.js @@ -327,17 +327,20 @@ var tarteaucitron = { div.id = 'tarteaucitronRoot'; body.appendChild(div, body); div.innerHTML = html; - + if (tarteaucitron.job !== undefined) { tarteaucitron.job = tarteaucitron.cleanArray(tarteaucitron.job); for (index = 0; index < tarteaucitron.job.length; index += 1) { tarteaucitron.addService(tarteaucitron.job[index]); } + } else { + tarteaucitron.job = [] } tarteaucitron.isAjax = true; + tarteaucitron.job.push = function (id) { - + // ie <9 hack if (typeof tarteaucitron.job.indexOf === 'undefined') { tarteaucitron.job.indexOf = function (obj, start) { @@ -349,7 +352,7 @@ var tarteaucitron = { return -1; }; } - + if (tarteaucitron.job.indexOf(id) === -1) { Array.prototype.push.call(this, id); } From ec634a20374a914ce5a077685503f4febf1e527a Mon Sep 17 00:00:00 2001 From: Amauri CHAMPEAUX Date: Fri, 15 Jun 2018 16:15:34 +0200 Subject: [PATCH 20/22] Wrong var definition --- tarteaucitron.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tarteaucitron.js b/tarteaucitron.js index 4e296c1..7603843 100644 --- a/tarteaucitron.js +++ b/tarteaucitron.js @@ -409,7 +409,7 @@ var tarteaucitron = { isWaiting = (cookie.indexOf(service.key + '=wait') >= 0) ? true : false, isDenied = (cookie.indexOf(service.key + '=false') >= 0) ? true : false, isAllowed = (cookie.indexOf(service.key + '=true') >= 0) ? true : false, - isResponded = (cookie.indexOf(service.key + '=false') >= 0 || cookie.indexOf(service.key + '=true') >= 0) ? true : false; + isResponded = (cookie.indexOf(service.key + '=false') >= 0 || cookie.indexOf(service.key + '=true') >= 0) ? true : false, isDNTRequested = (navigator.doNotTrack === "1" || navigator.doNotTrack === "yes" || navigator.msDoNotTrack === "1" || window.doNotTrack === "1") ? true : false; if (tarteaucitron.added[service.key] !== true) { From 4721ede6fe4c9cf311955b08dd6186bcabb34667 Mon Sep 17 00:00:00 2001 From: Steffen Anders Date: Mon, 18 Jun 2018 12:50:23 +0200 Subject: [PATCH 21/22] Add support for "Ad Up Technology" services --- README.md | 3 + tarteaucitron.services.js | 193 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 196 insertions(+) diff --git a/README.md b/README.md index a593e1e..75c6b96 100644 --- a/README.md +++ b/README.md @@ -21,6 +21,9 @@ Bonus: ## Supported services * Advertising network + * Ad Up Technology (ads) + * Ad Up Technology (conversion) + * Ad Up Technology (retargeting) * Amazon * Clicmanager * Criteo diff --git a/tarteaucitron.services.js b/tarteaucitron.services.js index 1fed07c..574e0d8 100644 --- a/tarteaucitron.services.js +++ b/tarteaucitron.services.js @@ -106,6 +106,199 @@ tarteaucitron.services.addtoanyshare = { } }; +// aduptech ads +tarteaucitron.services.aduptech_ads = { + "key": "aduptech_ads", + "type": "ads", + "name": "Ad Up Technology (ads)", + "uri": "https://www.adup-tech.com/datenschutz", + "needConsent": true, + "cookies": [], + "js": function () { + "use strict"; + + var IDENTIFIER = "aduptech_ads", + API_URL = "https://s.d.adup-tech.com/jsapi"; + + var elements = document.getElementsByClassName(IDENTIFIER); + if (!elements || elements.length === 0) { + return; + } + + tarteaucitron.fallback([IDENTIFIER], ""); + + tarteaucitron.addScript(API_URL, "", function() { + for (var i = 0; i < elements.length; i++) { + var element = elements[i]; + + if (!element.getAttribute("id")) { + element.setAttribute("id", IDENTIFIER + Math.random().toString(36).substr(2, 9)); + } + + window.uAd.embed(element.getAttribute("id"), { + placementKey: element.getAttribute("placementKey"), + responsive: Boolean(element.getAttribute("responsive")), + lazy: Boolean(element.getAttribute("lazy")), + adtest: Boolean(element.getAttribute("test")), + query: element.getAttribute("query") || "", + minCpc: element.getAttribute("minCpc") || "", + pageUrl: element.getAttribute("pageUrl") || "", + skip: element.getAttribute("skip") || "" + }); + } + }); + + }, + "fallback": function () { + "use strict"; + tarteaucitron.fallback(["aduptech_ads"], tarteaucitron.engage("aduptech_ads")); + } +}; + +// aduptech conversion +tarteaucitron.services.aduptech_conversion = { + "key": "aduptech_conversion", + "type": "ads", + "name": "Ad Up Technology (conversion)", + "uri": "https://www.adup-tech.com/datenschutz", + "needConsent": true, + "cookies": [], + "js": function () { + "use strict"; + + var IDENTIFIER = "aduptech_conversion", + CONVERSION_PIXEL_BASE_URL = "https://d.adup-tech.com/campaign/conversion"; + + var elements = document.getElementsByClassName(IDENTIFIER); + if (!elements || elements.length === 0) { + return; + } + + tarteaucitron.fallback([IDENTIFIER], ""); + + for (var i = 0; i < elements.length; i++) { + var element = elements[i]; + + if (!element.getAttribute("advertiserId") || !element.getAttribute("conversionCode")) { + continue; + } + + var url = CONVERSION_PIXEL_BASE_URL + + "/" + encodeURIComponent(element.getAttribute("advertiserId")) + + "?t=" + encodeURIComponent(element.getAttribute("conversionCode")); + + if (element.getAttribute("price")) { + url += "&price=" + encodeURIComponent(element.getAttribute("price")); + } + + if (element.getAttribute("quantity")) { + url += "&quantity=" + encodeURIComponent(element.getAttribute("quantity")); + } + + if (element.getAttribute("total")) { + url += "&total=" + encodeURIComponent(element.getAttribute("total")); + } + + if (element.getAttribute("orderId")) { + url += "&order_id=" + encodeURIComponent(element.getAttribute("orderId")); + } + + if (element.getAttribute("itemNumber")) { + url += "&item_number=" + encodeURIComponent(element.getAttribute("itemNumber")); + } + + if (element.getAttribute("description")) { + url += "&description=" + encodeURIComponent(element.getAttribute("description")); + } + + (new Image()).src = url; + } + } +}; + +// aduptech retargeting +tarteaucitron.services.aduptech_retargeting = { + "key": "aduptech_retargeting", + "type": "ads", + "name": "Ad Up Technology (retargeting)", + "uri": "https://www.adup-tech.com/datenschutz", + "needConsent": true, + "cookies": [], + "js": function () { + "use strict"; + + var IDENTIFIER = "aduptech_retargeting", + API_URL = "https://s.d.adup-tech.com/services/retargeting.js"; + + var elements = document.getElementsByClassName(IDENTIFIER); + if (!elements || elements.length === 0) { + return; + } + + tarteaucitron.fallback([IDENTIFIER], ""); + + window.AdUpRetargeting = function(api) { + for (var i = 0; i < elements.length; i++) { + var element = elements[i]; + + api.init(); + + api.setAccount(element.getAttribute("account")); + + if (element.getAttribute("email")) { + api.setEmail(element.getAttribute("email")); + } else if (element.getAttribute("hashedEmail")) { + api.setHashedEmail(element.getAttribute("hashedEmail")); + } + + if (element.getAttribute("product")) { + try { + api.setProduct(JSON.parse(element.getAttribute("product"))); + } catch (e) { + api.setProduct(element.getAttribute("product")); + } + } + + if (element.getAttribute("transaction")) { + try { + api.setTransaction(JSON.parse(element.getAttribute("transaction"))); + } catch (e) { + api.setTransaction(element.getAttribute("transaction")); + } + } + + if (element.getAttribute("demarkUser")) { + api.setDemarkUser(); + } else if (element.getAttribute("demarkProducts")) { + api.setDemarkProducts(); + } + + if (element.getAttribute("conversionCode")) { + api.setConversionCode(element.getAttribute("conversionCode")); + } + + if (element.getAttribute("device")) { + var setter = "set" + element.getAttribute("device").charAt(0).toUpperCase() + element.getAttribute("device").slice(1); + if (typeof api[setter] === 'function') { + api[setter](); + } + } + + if (element.getAttribute("track")) { + var tracker = "track" + element.getAttribute("track").charAt(0).toUpperCase() + element.getAttribute("track").slice(1); + if (typeof api[tracker] === "function") { + api[tracker](); + } else { + api.trackHomepage(); + } + } + }; + }; + + tarteaucitron.addScript(API_URL); + } +}; + // alexa tarteaucitron.services.alexa = { "key": "alexa", From 741dd6be67bb6d6286303163d1b4dde6f2525112 Mon Sep 17 00:00:00 2001 From: lucmuller Date: Tue, 26 Jun 2018 10:32:31 +0200 Subject: [PATCH 22/22] Ajout d'un engagement pour Recaptcha MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Afin de laisser la possibilité à l'utilisateur d'afficher recaptcha pour envoyer les formulaires --- tarteaucitron.services.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tarteaucitron.services.js b/tarteaucitron.services.js index 12291f5..ba771ea 100644 --- a/tarteaucitron.services.js +++ b/tarteaucitron.services.js @@ -1206,7 +1206,13 @@ tarteaucitron.services.recaptcha = { "cookies": ['nid'], "js": function () { "use strict"; + tarteaucitron.fallback(['g-recaptcha'], ''); tarteaucitron.addScript('https://www.google.com/recaptcha/api.js'); + }, + "fallback": function () { + "use strict"; + var id = 'recaptcha'; + tarteaucitron.fallback(['g-recaptcha'], tarteaucitron.engage(id)); } }; @@ -2159,4 +2165,3 @@ tarteaucitron.services.webmecanik = { }); } }; -