Permalink
Browse files

Merge pull request #13 from joshvermaire/allow_empty_dimensions

Remove requirement for the optional parameter 'dimensions'
  • Loading branch information...
ncb000gt committed Nov 6, 2012
2 parents 0f72520 + 5a5c934 commit 0844542a7edc39d7cc6ec5ecd4a3aafa2de96276
Showing with 4 additions and 2 deletions.
  1. +4 −2 lib/ga.js
View
@@ -150,8 +150,10 @@ GA.prototype.get = function(options, cb) {
entry.metrics.push(object_metric);
var object_dimension = {};
- object_dimension[dimension.name] = parsed_data.rows[i][dimension_index];
- entry.dimensions.push(object_dimension);
+ if (dimension) {
+ object_dimension[dimension.name] = parsed_data.rows[i][dimension_index];
+ entry.dimensions.push(object_dimension);
+ }
self.emit('entry', entry);
entries.push(entry);

0 comments on commit 0844542

Please sign in to comment.