From c59d9e7c8b7dc90d8b09a1c28b84314ad4b51741 Mon Sep 17 00:00:00 2001 From: Boris Grozev Date: Fri, 12 Aug 2016 15:21:53 -0500 Subject: [PATCH] Rounds floats passed to analytics (instead of truncating them). --- analytics.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/analytics.js b/analytics.js index 03a178393..7dc8aed91 100644 --- a/analytics.js +++ b/analytics.js @@ -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); };