From 5b50bfcb3e2355f315ccad0962007db652996dff Mon Sep 17 00:00:00 2001 From: Euan Cameron Date: Mon, 23 Apr 2018 09:52:25 +0100 Subject: [PATCH 1/7] 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 2/7] 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 3/7] 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 52fe843be604b3ef0fd0253c19d7d9d980a77a1f Mon Sep 17 00:00:00 2001 From: Encre Informatique Date: Tue, 22 May 2018 12:21:41 -0300 Subject: [PATCH 4/7] 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 a5f0900963b1025ce03e073aed72052e497655c6 Mon Sep 17 00:00:00 2001 From: Thomas Combe Date: Thu, 24 May 2018 09:47:44 +0200 Subject: [PATCH 5/7] 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 a4bae2d1e3bbfa146662cec714d4e4b03d33625b Mon Sep 17 00:00:00 2001 From: Thomas Combe Date: Fri, 25 May 2018 16:05:48 +0200 Subject: [PATCH 6/7] 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 7/7] 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",