node-mixpanel-data-exporter

0.0.1 • Public • Published

node-mixpanel-data-exporter

This provides a wrapper to Mixpanel's Data Export API

Quick Start

Initialize

  //initialize with required api_key and api_secret
  var Mixpanel_Exporter = require('./mixpanel_exporter')
    , mixpanel_exporter = new Mixpanel_Exporter({
          api_key: 'your api key'
        , api_secret: 'your api secret'
        , format: 'json' //optional and will default to json
      })

Request to any of the API Methods

  mixpanel_exporter.fetch('events', {
      event: ['your event name']
    , type: 'general'
    , unit: 'minute'
    ...
  }, function(error, request, body) {

  })

If the API Method has a path, use the full path

  mixpanel_exporter.fetch('events/top', {
      type: 'general'
      ...
  }, function(error, request, body) {
    
  })

You can also call any of the methods directly

  mixpanel_exporter.events({
      event: ['your event name']
    , type: 'general'
    , unit: 'minute'
    ...
  }, function(error, request, body) {
  
  })

If the method has a forward slash, replace it with an underscore

  mixpanel_exporter.events_top({
      type: 'general'
      ...
  }, function(error, request, body) {
  
  })

Tests

  make

Readme

Keywords

none

Package Sidebar

Install

npm i node-mixpanel-data-exporter

Weekly Downloads

52

Version

0.0.1

License

MIT

Last publish

Collaborators

  • tyke