diff --git a/README.md b/README.md index 2cbfb3a..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 @@ -56,7 +59,11 @@ Bonus: * Comment * Disqus * Facebook (commentaire) - + +* Marketing Automation & CRM + * Mautic + * Webmecanik Automation + * Social network * AddThis * AddToAny (feed) @@ -85,6 +92,7 @@ Bonus: * SlideShare * Vimeo * YouTube + * Issuu ## Visitors outside the EU @@ -99,3 +107,24 @@ 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 + + + +``` 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/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", diff --git a/lang/tarteaucitron.nl.js b/lang/tarteaucitron.nl.js new file mode 100644 index 0000000..dda9e78 --- /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": "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", + "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 gemaakt 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..39de7c1 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; @@ -183,7 +185,8 @@ var tarteaucitron = { "orientation": "top", "removeCredit": false, "showAlertSmall": true, - "cookieslist": true + "cookieslist": true, + "handleBrowserDNTRequest": false }, params = tarteaucitron.parameters; @@ -196,6 +199,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'; @@ -296,7 +300,7 @@ var tarteaucitron = { } if (defaults.showAlertSmall === true) { - html += '
'; + html += '
'; html += '
'; html += ' ' + tarteaucitron.lang.alertSmall; html += '
'; @@ -327,17 +331,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 +356,7 @@ var tarteaucitron = { return -1; }; } - + if (tarteaucitron.job.indexOf(id) === -1) { Array.prototype.push.call(this, id); } @@ -404,7 +411,8 @@ 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) { tarteaucitron.added[service.key] = true; @@ -462,6 +470,13 @@ var tarteaucitron = { } tarteaucitron.state[service.key] = false; tarteaucitron.userInterface.color(service.key, false); + } else if (!isResponded && isDNTRequested && tarteaucitron.handleBrowserDNTRequest) { + 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') { @@ -860,19 +875,26 @@ 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; - - 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"; @@ -1040,7 +1062,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 +1099,8 @@ var tarteaucitron = { return 'it_IT'; } else if (userLanguage === 'pt') { return 'pt_PT'; + } else if (userLanguage === 'nl') { + return 'nl_NL'; } else { return 'en_US'; } diff --git a/tarteaucitron.services.js b/tarteaucitron.services.js index 81ea5c7..ba771ea 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 ''; }); }, @@ -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", @@ -143,7 +336,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 +362,7 @@ tarteaucitron.services.calameo = { width = x.getAttribute("width"), height = x.getAttribute("height"), url = '//v.calameo.com/?bkcode=' + id; - + return ''; }); }, @@ -227,13 +420,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 +447,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 +476,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 +489,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 +518,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 +569,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 +603,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 +626,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 +656,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 +831,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 +946,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 +966,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 +998,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 +1021,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,8 +1046,7 @@ tarteaucitron.services.analytics = { window.ga.q.push(arguments); }; 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') { @@ -871,16 +1063,20 @@ 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, '_'); + return ['_ga', '_gat', '_gid', '__utma', '__utmb', '__utmc', '__utmt', '__utmz', gatGtagUaCookie]; + })(), "js": function () { "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); - + if (typeof tarteaucitron.user.gtagMore === 'function') { tarteaucitron.user.gtagMore(); } @@ -915,7 +1111,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), @@ -932,6 +1128,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", @@ -968,6 +1196,26 @@ 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.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)); + } +}; + // linkedin tarteaucitron.services.linkedin = { "key": "linkedin", @@ -1006,12 +1254,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 +1279,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 +1326,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 +1359,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 +1393,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 +1422,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 +1444,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 +1478,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 +1488,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 +1514,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 +1548,7 @@ tarteaucitron.services.slideshare = { width = x.getAttribute("width"), height = x.getAttribute("height"), url = '//www.slideshare.net/slideshow/embed_code/' + id; - + return ''; }); }, @@ -1334,7 +1582,7 @@ tarteaucitron.services.statcounter = { uniqIds.push(uniqId); return '
'; }); - + for (i = 0; i < uniqIds.length; i += 1) { tarteaucitron.makeAsync.init(uri, uniqIds[i]); } @@ -1414,11 +1662,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 +1719,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 +1803,7 @@ tarteaucitron.services.vimeo = { video_height = x.getAttribute("height"), frame_height = 'height=', video_frame; - + if (video_id === undefined) { return ""; } @@ -1676,10 +1924,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 +1952,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 +1999,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 +2096,72 @@ 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); + }); + } +}; + +// 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'); + }); + } +};