Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
A node.js API for mixpanel
JavaScript
branch: master

This branch is 2 commits ahead, 112 commits behind mixpanel:master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
example
lib
mixpanel-node.tmproj
package.json
readme.md

readme.md

Mixpanel-node

This library provides many of the features in the official javascript mixpanel library. It is easy to use, and fully async.

Installation

npm install mixpanel

Usage

var mixpanel = require('mixpanel');

var mp_client = new mixpanel.Client('YOUR MIXPANEL TOKEN');
mp_client.identify("some unique client id");
mp_client.name_tag("client username");

mp_client.track("my event", {
    as: "many",
    properties: "as",
    you: "want"
}, function(err) {
    if(err) throw err;
});

// manual funnel tracking is supported, but not recommended
mp_client.track_funnel("my funnel", 1, "first goal", {
    distinct_id: "unique identifier"
}, function(err) {
    if(err) throw err;
});
mp_client.track_funnel("my funnel", 2, "second goal", {
    distinct_id: "unique identifier"
}, function(err) {
    if(err) throw err;
});

Attribution/Credits

Heavily inspired by the original js library copyright Mixpanel, Inc. (http://mixpanel.com/)

Modifications by Carl Sverre

Something went wrong with that request. Please try again.