Skip to content

Instantly share code, notes, and snippets.

@PaquitoSoft
Created September 29, 2012 14:46
Show Gist options
  • Save PaquitoSoft/3804233 to your computer and use it in GitHub Desktop.
Save PaquitoSoft/3804233 to your computer and use it in GitHub Desktop.
Problem with googleanalytics nodejs module
var ga = require('googleanalytics'),
util = require('util');
var GA = new ga.GA();
GA.login(function(err, token) {
var options = {
'ids': 'ga:UA-29498666-1',
'start-date': '2012-09-01',
'end-date': '2012-09-30',
'dimensions': 'ga:pagePath',
'metrics': 'ga:pageviews',
'sort': '-ga:pagePath'
};
GA.get(options, function(err, entries) {
util.debug(JSON.stringify(entries));
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment