ソースを参照

Rounds floats passed to analytics (instead of truncating them).

j8
Boris Grozev 8年前
コミット
c59d9e7c8b
1個のファイルの変更1行の追加1行の削除
  1. 1
    1
      analytics.js

+ 1
- 1
analytics.js ファイルの表示

@@ -12,7 +12,7 @@
12 12
 
13 13
   Analytics.prototype.sendEvent = function (action, data) {
14 14
     // empty label and add the value, the value should be integer or null
15
-    var value = parseInt(data);
15
+    var value = Math.round(parseFloat(data));
16 16
 
17 17
     ga('send', 'event', 'jit.si', action, "", value ? value : null);
18 18
   };

読み込み中…
キャンセル
保存