From 92c75af8de451bfb36d3c4def8f5883809eda71f Mon Sep 17 00:00:00 2001 From: Amauri CHAMPEAUX Date: Wed, 30 Jun 2021 12:58:58 +0200 Subject: [PATCH 1/6] Add pinterest pixel --- tarteaucitron.services.js | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/tarteaucitron.services.js b/tarteaucitron.services.js index 864e004..239b222 100644 --- a/tarteaucitron.services.js +++ b/tarteaucitron.services.js @@ -32,6 +32,37 @@ tarteaucitron.services.iframe = { } }; +// pinterestpixel +tarteaucitron.services.pinterestpixel = { + "key": "pinterestpixel", + "type": "ads", + "name": "Pinterest Pixel", + "uri": "https://help.pinterest.com/fr/business/article/track-conversions-with-pinterest-tag", + "needConsent": true, + "cookies": [ '_pinterest_sess', '_pinterest_ct', '_pinterest_ct_mw', '_pinterest_ct_rt', '_epik', '_derived_epik', '_pin_unauth', '_pinterest_ct_ua'], + "js": function () { + "use strict"; + + if (tarteaucitron.user.pinterestpixelId === undefined) { + return; + } + + if(!window.pintrk) { + window.pintrk = function() { + window.pintrk.queue.push(Array.prototype.slice.call(arguments)); + }; + + var n=window.pintrk; + n.queue=[]; + n.version="3.0"; + + tarteaucitron.addScript('https://s.pinimg.com/ct/core.js', '', function() { + window.pintrk('load', tarteaucitron.user.pinterestpixelId); + window.pintrk('page'); + }); + } + } +}; // elfsight tarteaucitron.services.elfsight = { From 2ed802f9fd1f63ebf58512a8bbc55848446c10d0 Mon Sep 17 00:00:00 2001 From: Amauri CHAMPEAUX Date: Wed, 21 Jul 2021 12:12:19 +0200 Subject: [PATCH 2/6] Add cookies for firebase --- tarteaucitron.services.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/tarteaucitron.services.js b/tarteaucitron.services.js index 239b222..24892d8 100644 --- a/tarteaucitron.services.js +++ b/tarteaucitron.services.js @@ -1875,7 +1875,14 @@ tarteaucitron.services.firebase = { "name": "Firebase", "uri": "https://firebase.google.com/support/privacy", "needConsent": true, - "cookies": [], + "cookies": (function () { + var googleIdentifier = tarteaucitron.user.firebaseMeasurementId, + tagGCookie = '_ga_' + googleIdentifier; + + tagGCookie = tagGCookie.replace(/G-/g, ''); + + return ['_ga', tagGCookie]; + })(), "js": function () { "use strict"; From 04f16ce0acba4efd33bfa350eefb39e614279557 Mon Sep 17 00:00:00 2001 From: SBNTT Date: Wed, 21 Jul 2021 15:03:56 +0200 Subject: [PATCH 3/6] add anonymize_ip to multiplegtag service --- tarteaucitron.services.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tarteaucitron.services.js b/tarteaucitron.services.js index 24892d8..3c420bd 100644 --- a/tarteaucitron.services.js +++ b/tarteaucitron.services.js @@ -3771,7 +3771,7 @@ tarteaucitron.services.multiplegtag = { tarteaucitron.addScript('https://www.googletagmanager.com/gtag/js?id=' + ua, '', function () { window.gtag = function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); - gtag('config', ua); + gtag('config', ua, { 'anonymize_ip': true }); }); }); } From da69f1d6ab1e99a9f084213b3f2f32b4281c1380 Mon Sep 17 00:00:00 2001 From: Maxime Huran Date: Mon, 26 Jul 2021 16:35:39 +0200 Subject: [PATCH 4/6] Add bingadsMore to bingAds service In order to be able to send some e-commerce values like : ```js window.uetq = window.uetq || []; window.uetq.push ('event', '', {'revenue_value': 100.00 }); ``` --- tarteaucitron.services.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tarteaucitron.services.js b/tarteaucitron.services.js index 24892d8..1f10bf1 100644 --- a/tarteaucitron.services.js +++ b/tarteaucitron.services.js @@ -3985,6 +3985,10 @@ tarteaucitron.services.bingads = { bingadsCreate.q = window.uetq; window.uetq = new UET(bingadsCreate); window.uetq.push('pageLoad'); + + if (typeof tarteaucitron.user.bingadsMore === 'function') { + tarteaucitron.user.bingadsMore(); + } }); } }; From c37dd44b2a525264e7b42a140fe7a4e0d90ffafa Mon Sep 17 00:00:00 2001 From: Jean-Michel Frouin Date: Mon, 26 Jul 2021 14:32:05 +0200 Subject: [PATCH 5/6] [Evol/#745] Service Marketo --- tarteaucitron.services.js | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/tarteaucitron.services.js b/tarteaucitron.services.js index 24892d8..f326a92 100644 --- a/tarteaucitron.services.js +++ b/tarteaucitron.services.js @@ -4369,3 +4369,37 @@ tarteaucitron.services.bandcamp = { }); } }; + +// Marketo munchkin +tarteaucitron.services.marketomunchkin = { + "key": "marketomunchkin", + "type": "api", + "name": "Marketo munchkin", + "uri": "https://documents.marketo.com/legal/cookies", + "needConsent": true, + "cookies": ['OptAnon', '_mkto_trk'], + "js": function () { + "use strict"; + if (tarteaucitron.user.marketomunchkinkey === undefined) { + return; + } + var didInit = false; + function initMunchkin() { + if(didInit === false) { + didInit = true; + Munchkin.init(tarteaucitron.user.marketomunchkinkey); + } + } + var s = document.createElement('script'); + s.type = 'text/javascript'; + s.async = true; + s.src = '//munchkin.marketo.net/munchkin.js'; + s.onreadystatechange = function() { + if (this.readyState == 'complete' || this.readyState == 'loaded') { + initMunchkin(); + } + }; + s.onload = initMunchkin; + document.getElementsByTagName('head')[0].appendChild(s); + } +}; From bf61aec1e1c90a639fb7b5cb37a777b28add43a4 Mon Sep 17 00:00:00 2001 From: Luc MULLER Date: Thu, 29 Jul 2021 11:48:44 +0200 Subject: [PATCH 6/6] Event loaded should be sent after js script is executed in order to be able to manipulate result of the script after loaded event is sent --- tarteaucitron.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tarteaucitron.js b/tarteaucitron.js index 0604979..40493e7 100644 --- a/tarteaucitron.js +++ b/tarteaucitron.js @@ -1004,8 +1004,8 @@ var tarteaucitron = { tarteaucitron.pro('!' + key + '=engage'); tarteaucitron.launch[key] = true; - tarteaucitron.sendEvent(key + '_loaded'); if (typeof tarteaucitronMagic === 'undefined' || tarteaucitronMagic.indexOf("_" + key + "_") < 0) { tarteaucitron.services[key].js(); } + tarteaucitron.sendEvent(key + '_loaded'); } } var itemStatusElem = document.getElementById('tacCurrentStatus'+key);