瀏覽代碼

Add tiktok (fix #933)

Amauri CHAMPEAUX 3 年之前
父節點
當前提交
76d264fd71
共有 1 個文件被更改,包括 18 次插入0 次删除
  1. 18 0
      tarteaucitron.services.js

+ 18 - 0
tarteaucitron.services.js

@@ -5304,3 +5304,21 @@ tarteaucitron.services.weborama = {
     }
     }
 };
 };
 
 
+// tiktok
+tarteaucitron.services.tiktok = {
+    "key": "tiktok",
+    "type": "analytic",
+    "name": "Tiktok",
+    "uri": "https://www.tiktok.com/legal/tiktok-website-cookies-policy",
+    "needConsent": true,
+    "cookies": [],
+    "js": function () {
+        "use strict";
+
+        if (tarteaucitron.user.tiktokId === undefined) {
+            return;
+        }
+
+        tarteaucitron.addScript('https://analytics.tiktok.com/i18n/pixel/sdk.js?sdkid=' + tarteaucitron.user.tiktokId);
+    }
+};