Browse Source

Add tiktok (fix #933)

Amauri CHAMPEAUX 3 years ago
parent
commit
76d264fd71
1 changed files with 18 additions and 0 deletions
  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);
+    }
+};