Amauri CHAMPEAUX 2 years ago
parent
commit
069e7a713e
1 changed files with 24 additions and 0 deletions
  1. 24 0
      tarteaucitron.services.js

+ 24 - 0
tarteaucitron.services.js

@@ -32,6 +32,30 @@ tarteaucitron.services.iframe = {
     }
 };
 
+// trustpilot
+tarteaucitron.services.trustpilot = {
+    "key": "trustpilot",
+    "type": "other",
+    "name": "Trustpilot",
+    "uri": "https://fr.legal.trustpilot.com/for-reviewers/end-user-privacy-terms",
+    "needConsent": true,
+    "cookies": [],
+    "js": function () {
+        "use strict";
+        tarteaucitron.fallback(['trustpilot-widget'], '');
+        tarteaucitron.addScript('https://widget.trustpilot.com/bootstrap/v5/tp.widget.sync.bootstrap.min.js');
+    },
+    "fallback": function () {
+        "use strict";
+        var id = 'trustpilot';
+        tarteaucitron.fallback(['trustpilot-widget'], function (elem) {
+            elem.style.width = elem.getAttribute('data-style-width');
+            elem.style.height = elem.getAttribute('data-style-height');
+            return tarteaucitron.engage(id);
+        });
+    }
+};
+
 // antvoice
 tarteaucitron.services.antvoice = {
     "key": "antvoice",