Pārlūkot izejas kodu

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

j8
Boris Grozev 8 gadus atpakaļ
vecāks
revīzija
c59d9e7c8b
1 mainītis faili ar 1 papildinājumiem un 1 dzēšanām
  1. 1
    1
      analytics.js

+ 1
- 1
analytics.js Parādīt failu

@@ -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
   };

Notiek ielāde…
Atcelt
Saglabāt