浏览代码

Add clicky service

Amauri CHAMPEAUX 10 年之前
父节点
当前提交
067e260bfa
共有 1 个文件被更改,包括 23 次插入0 次删除
  1. 23 0
      tarteaucitron.services.js

+ 23 - 0
tarteaucitron.services.js

@@ -25,6 +25,29 @@ tarteaucitron.services.addthis = {
     }
 };
 
+// clicky
+tarteaucitron.services.clicky = {
+    "key": "clicky",
+    "type": "analytics",
+    "name": "Clicky",
+    "uri": "https://clicky.com/terms",
+    "needConsent": true,
+    "js": function () {
+        "use strict";
+        if (tarteaucitron.user.clickyId === undefined) {
+            return;
+        }
+        var clicky_site_ids = clicky_site_ids || [];
+        clicky_site_ids.push(tarteaucitron.user.clickyId);
+        tarteaucitron.addScript('//static.getclicky.com/js');
+    },
+    "fallback": function () {
+        "use strict";
+        var cookies = ['_jsuid', '_eventqueue', '_referrer_og', '_utm_og', '_first_pageview', 'clicky_olark'];
+        tarteaucitron.cookie.purge(cookies);
+    }
+};
+
 // disqus
 tarteaucitron.services.disqus = {
     "key": "disqus",