From 3fc1c4ffa0d196f0d281117e88f8ea6772563c24 Mon Sep 17 00:00:00 2001 From: Amauri CHAMPEAUX Date: Wed, 15 Jun 2022 19:31:00 +0200 Subject: [PATCH] Add Plausible #960 --- tarteaucitron.services.js | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/tarteaucitron.services.js b/tarteaucitron.services.js index 69b455b..37321ba 100644 --- a/tarteaucitron.services.js +++ b/tarteaucitron.services.js @@ -32,6 +32,25 @@ tarteaucitron.services.iframe = { } }; +// plausible +tarteaucitron.services.plausible = { + "key": "plausible", + "type": "analytic", + "name": "Plausible", + "uri": "https://plausible.io/privacy", + "needConsent": false, + "cookies": [], + "js": function () { + "use strict"; + + if (tarteaucitron.user.plausibleDomain === undefined) { + return; + } + + tarteaucitron.addScript('https://plausible.io/js/script.js', '', '', '', 'data-domain', tarteaucitron.user.plausibleDomain); + } +}; + // videas tarteaucitron.services.videas = { "key": "videas",