Browse Source

Add smartsupp

Amauri CHAMPEAUX 4 years ago
parent
commit
ef29a87e4e
1 changed files with 29 additions and 0 deletions
  1. 29 0
      tarteaucitron.services.js

+ 29 - 0
tarteaucitron.services.js

@@ -66,6 +66,35 @@ tarteaucitron.services.plezi = {
     }
 };
 
+
+// smartsupp
+tarteaucitron.services.smartsupp = {
+    "key": "smartsupp",
+    "type": "support",
+    "name": "Smartsupp",
+    "uri": "https://www.smartsupp.com/help/privacy/",
+    "needConsent": true,
+    "cookies": ['ssupp.vid', 'ssupp.visits', 'AWSALB', 'AWSALBCORS'],
+    "js": function () {
+        "use strict";
+
+        if (tarteaucitron.user.smartsuppKey === undefined) {
+            return;
+        }
+
+        window._smartsupp = _smartsupp || {};
+        window._smartsupp.key = tarteaucitron.user.smartsuppKey;
+        window.smartsupp = function() {
+            window.smartsupp._.push(arguments)
+        };
+        window.smartsupp._ = [];
+
+        tarteaucitron.addScript('https://www.smartsuppchat.com/loader.js');
+    }
+};
+
+
+
 // sharpspring
 tarteaucitron.services.sharpspring = {
     "key": "sharpspring",