Skip to content

tyke/node-mixpanel-data-exporter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published