Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ga-report

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ga-report

Unofficial NodeJS wrapper for the Google Analytics Core Reporting API

  • 1.0.0
  • latest
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

Google Analtyics Reporting Build Status

NodeJS wrapper for Google Analytics Core Reporting API

API

Instanciate

Report = require('ga-report');

var report = new Report('user@gmail.com', 'mypassword');
var report.once('ready', function() {
  // ready to report
});

Get Accounts

report.getAccounts(function(err, accounts) {
  console.error(err);
  for (var i = 0; i < accounts.length; i++) {
    console.log(accounts[i]);
  }
});

Get Webproperties

report.getWebproperties(accountId, function(err, webproperties) {
  console.error(err);
  for (var i = 0; i < webproperties.length; i++) {
    console.oog(webproperties[i]);
  }
});

Get Webproperties

report.getWebproperties(accountId, webpropertyId, function(err, profile) {
  console.error(err);
  for (var i = 0; i < profiles.length; i++) {
    console.oog(profiles[i]);
  }
});

Get Report

var options = {
  'ids': 'ga:123456-UA',
  'start-date': '2013-10-01',
  'end-date': '2013-10-31',
  'metrics': 'ga:visits,ga:bounces'
};
report.get(options, functon(err, data) {
  if (err) console.error(err);
  console.dir(data);
)};

Keywords

FAQs

Package last updated on 13 Jan 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc