瀏覽代碼

Adds browser name as parameter.

master
damencho 8 年之前
父節點
當前提交
adb1b33441
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2
    2
      analytics.js

+ 2
- 2
analytics.js 查看文件

10
     ga('send', 'pageview');
10
     ga('send', 'pageview');
11
   }
11
   }
12
 
12
 
13
-  Analytics.prototype.sendEvent = function (action, data, label) {
13
+  Analytics.prototype.sendEvent = function (action, data, label, browserName) {
14
     // empty label if missing value for it and add the value,
14
     // empty label if missing value for it and add the value,
15
     // the value should be integer or null
15
     // the value should be integer or null
16
     var value = Math.round(parseFloat(data));
16
     var value = Math.round(parseFloat(data));
17
 
17
 
18
     ga('send', 'event', 'jit.si',
18
     ga('send', 'event', 'jit.si',
19
-        action, label ? label : "", value ? value : null);
19
+        action + '.' + browserName, label ? label : "", value ? value : null);
20
   };
20
   };
21
 
21
 
22
   ctx.Analytics = Analytics;
22
   ctx.Analytics = Analytics;

Loading…
取消
儲存