From aa5c4fc5be50915ad7c8010cbf564ade13c1cf46 Mon Sep 17 00:00:00 2001 From: Amauri CHAMPEAUX Date: Fri, 15 Jul 2022 17:59:39 +0200 Subject: [PATCH] Fix #963 --- tarteaucitron.services.js | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/tarteaucitron.services.js b/tarteaucitron.services.js index c517955..72ce2c8 100644 --- a/tarteaucitron.services.js +++ b/tarteaucitron.services.js @@ -56,6 +56,34 @@ tarteaucitron.services.trustpilot = { } }; +// snapchat +tarteaucitron.services.snapchat = { + "key": "snapchat", + "type": "analytic", + "name": "Snapchat", + "uri": "https://snap.com/fr-FR/privacy/privacy-policy", + "needConsent": true, + "cookies": [], + "js": function () { + "use strict"; + + if (tarteaucitron.user.snapchatId === undefined || tarteaucitron.user.snapchatEmail === undefined) { + return; + } + + var a = window.snaptr = function() { + a.handleRequest ? a.handleRequest.apply(a, arguments) : a.queue.push(arguments) + }; + a.queue = []; + window.snaptr('init', tarteaucitron.user.snapchatId, { + 'user_email': tarteaucitron.user.snapchatEmail + }); + window.snaptr('track', 'PAGE_VIEW'); + + tarteaucitron.addScript('https://sc-static.net/scevent.min.js'); + } +}; + // antvoice tarteaucitron.services.antvoice = { "key": "antvoice",