From 5eff7626cdc4d6b1fe126575d6ed5099f5ac80fb Mon Sep 17 00:00:00 2001 From: Phoennix79 Date: Mon, 29 Nov 2021 23:18:43 +0100 Subject: [PATCH 1/2] Add widget id to Tawk.to service --- tarteaucitron.services.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tarteaucitron.services.js b/tarteaucitron.services.js index b70c7e1..52fe474 100644 --- a/tarteaucitron.services.js +++ b/tarteaucitron.services.js @@ -4176,10 +4176,12 @@ tarteaucitron.services.tawkto = { return; } + tarteaucitron.user.tawktoWidgetId = tarteaucitron.user.tawktoWidgetId || 'default'; + window.Tawk_API = window.Tawk_API || {}; window.Tawk_LoadStart = new Date(); - tarteaucitron.addScript('https://embed.tawk.to/' + tarteaucitron.user.tawktoId + '/default'); + tarteaucitron.addScript('https://embed.tawk.to/' + tarteaucitron.user.tawktoId + '/' + tarteaucitron.user.tawktoWidgetId); } }; From 74c47e9c496749c79e402694cd02b267c9dfbd3b Mon Sep 17 00:00:00 2001 From: Phoennix79 Date: Mon, 29 Nov 2021 23:58:11 +0100 Subject: [PATCH 2/2] Add Criteo OneTag service --- tarteaucitron.services.js | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/tarteaucitron.services.js b/tarteaucitron.services.js index 52fe474..6c7347a 100644 --- a/tarteaucitron.services.js +++ b/tarteaucitron.services.js @@ -1023,6 +1023,32 @@ tarteaucitron.services.criteo = { } }; +// criteo onetag +tarteaucitron.services.criteoonetag = { + "key": "criteoonetag", + "type": "ads", + "name": "Criteo OneTag", + "uri": "https://www.criteo.com/privacy/", + "needConsent": true, + "cookies": ['uid', 'tk', 'uid3pd'], + "js": function() { + "use strict"; + if (tarteaucitron.user.criteoonetagAccount === undefined) return; + + window.criteo_q = window.criteo_q || []; + window.criteo_q.push({ + event: "setAccount", + account: tarteaucitron.user.criteoonetagAccount + }) + + tarteaucitron.addScript('//static.criteo.net/js/ld/ld.js', '', function() { + if (typeof tarteaucitron.user.criteoonetagMore === 'function') { + tarteaucitron.user.criteoonetagMore(); + } + }); + } +}; + // artetv tarteaucitron.services.artetv = { "key": "artetv",