Browse Source

Add Plausible #960

Amauri CHAMPEAUX 2 năm trước cách đây
mục cha
commit
3fc1c4ffa0
1 tập tin đã thay đổi với 19 bổ sung0 xóa
  1. 19 0
      tarteaucitron.services.js

+ 19 - 0
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",