Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

an event value can only be an integer according to the API specification

  • Loading branch information...
commit 600433c2d88e16d79f9c6ba4990737f48dcf22f6 1 parent cb12127
@hannesgassert hannesgassert authored
Showing with 3 additions and 3 deletions.
  1. +1 −1  README.md
  2. +2 −2 lib/ga.js
View
2  README.md
@@ -16,5 +16,5 @@ Server side google analytics
category: 'Videos',
action: 'Video Loading',
label: 'Gone With the Wind',
- value: 1.234
+ value: 42
});
View
4 lib/ga.js
@@ -84,8 +84,8 @@ GoogleAnalytics.prototype.trackEvent = function(event, userId, cb) {
utme: '5(' + payload.join('*') + ')'
};
- if (typeof event.value === 'number') {
- obj.utme += '(' + event.value + ')';
+ if (typeof event.value !== 'undefined') {
+ obj.utme += '(' + Math.round(event.value) + ')';
}
if (event.nonInteraction) {
Please sign in to comment.
Something went wrong with that request. Please try again.