No description, website, or topics provided.
JavaScript Makefile
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
test
.gitignore
LICENSE
Makefile
README.md
index.js
package.json

README.md

node-mixpanel-data-exporter

This provides a wrapper to Mixpanel's Data Export API

Install

npm install node-mixpanel-data-exporter

Quick Start

Initialize

  //initialize with required api_key and api_secret
  var Mixpanel_Exporter = require('node-mixpanel-data-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