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

This commit is contained in:
Boris Grozev 2016-08-12 15:21:53 -05:00
parent ec98e6fdff
commit c59d9e7c8b
1 changed files with 1 additions and 1 deletions

View File

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