Selaa lähdekoodia

Merge pull request #82 from Webmecanik/add_webmecanik

Adding webmecanik service
Amauri CHAMPEAUX 7 vuotta sitten
vanhempi
commit
dd05f9d213
2 muutettua tiedostoa jossa 28 lisäystä ja 1 poistoa
  1. 5 1
      README.md
  2. 23 0
      tarteaucitron.services.js

+ 5 - 1
README.md

@@ -56,7 +56,11 @@ Bonus:
 * Comment
   * Disqus
   * Facebook (commentaire)
-
+  
+* Marketing Automation & CRM
+  * Mautic
+  * Webmecanik Automation
+  
 * Social network
   * AddThis
   * AddToAny (feed)

+ 23 - 0
tarteaucitron.services.js

@@ -1867,3 +1867,26 @@ tarteaucitron.services.facebookpixel = {
     }
 };
 
+// webmecanik
+tarteaucitron.services.webmecanik = {
+    "key": "webmecanik",
+    "type": "analytic",
+    "name": "Webmecanik",
+    "uri": "https://webmecanik.com/tos",
+    "needConsent": true,
+    "cookies": ['mtc_id', 'mtc_sid'],
+    "js": function () {
+        "use strict";
+        if (tarteaucitron.user.webmecanikurl === undefined) {
+            return;
+        }
+        window['WebmecanikTrackingObject'] = 'mt';
+        window['mt'] = window['mt'] || function() {
+            (window['mt'].q = window['mt'].q || []).push(arguments);
+        };
+
+        tarteaucitron.addScript(tarteaucitron.user.webmecanikurl, '', function() {
+            mt('send', 'pageview');
+        });
+    }
+};