소스 검색

Merge pull request #801 from jitsi/reloads-update

Updates statistics implementation.
j8
hristoterezov 9 년 전
부모
커밋
8d466ad77f
1개의 변경된 파일5개의 추가작업 그리고 3개의 파일을 삭제
  1. 5
    3
      analytics.js

+ 5
- 3
analytics.js 파일 보기

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

Loading…
취소
저장