Merge pull request #784 from bgrozev/round-analytics-values

Rounds floats passed to analytics (instead of truncating them).
This commit is contained in:
Дамян Минков 2016-08-12 16:51:29 -05:00 committed by GitHub
commit 202ad0542f
1 changed files with 1 additions and 1 deletions

View File

@ -12,7 +12,7 @@
Analytics.prototype.sendEvent = function (action, data) { Analytics.prototype.sendEvent = function (action, data) {
// empty label and add the value, the value should be integer or null // 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); ga('send', 'event', 'jit.si', action, "", value ? value : null);
}; };