Selaa lähdekoodia

Merge pull request #331 from snapeuh/master

Add leadforensics
Amauri CHAMPEAUX 6 vuotta sitten
vanhempi
commit
6029ea3d78
2 muutettua tiedostoa jossa 28 lisäystä ja 0 poistoa
  1. 1 0
      .gitignore
  2. 27 0
      tarteaucitron.services.js

+ 1 - 0
.gitignore

@@ -0,0 +1 @@
+.idea

+ 27 - 0
tarteaucitron.services.js

@@ -637,6 +637,33 @@ tarteaucitron.services.datingaffiliationpopup = {
     }
 };
 
+// leadforensics
+tarteaucitron.services.leadforensics = {
+    "key": "leadforensics",
+    "type": "analytic",
+    "name": "LeadForensics",
+    "uri": "https://www.leadforensics.com/privacy-policy/",
+    "needConsent": true,
+    "cookies": ['trackalyzer'],
+    "js": function () {
+        "use strict";
+        if (tarteaucitron.user.leadforensicsSf14gv === undefined ||
+            tarteaucitron.user.leadforensicsIidentifier === undefined) {
+            return;
+        }
+
+        window.sf14gv = tarteaucitron.user.leadforensicsSf14gv;
+
+        (function() {
+            var sf14g = document.createElement('script'); sf14g.type = 'text/javascript'; sf14g.async = true;
+            sf14g.src = ('https:' == document.location.protocol ? 'https://' : 'http://') + 't.sf14g.com/sf14g.js';
+            var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(sf14g, s);
+        })();
+
+        tarteaucitron.addScript('//secure.leadforensics.com/js/' + tarteaucitron.user.leadforensicsIidentifier + '.js');
+    }
+};
+
 // disqus
 tarteaucitron.services.disqus = {
     "key": "disqus",