statsmcfly
v1.0.0
Published
This a module to make interacting with the [statsmcfly.com](http://statsmcfly.com) API easy.
Downloads
1
Readme
Stats McFly API Module for Node.js
This a module to make interacting with the statsmcfly.com API easy.
Install
npm install statsmcfly
Example
var statsmcfly = require('statsmcfly');
statsmcfly.settings({
apikey: 'myapikey'
});
statsmcfly.track({
event:'new user sign up',
type: 'c',
value:'1'
}, function(err, response) {
console.log("err: " + err);
console.log("response: " + response);
});
Methods
statsmcfly.settings( {apikey:''} )
apikey
: your api key
statsmcfly.track( {event:'', value:1, type: 'c'}, callback)
event
: name of event to trackvalue
: value you want to store. can be numbers, strings or json objectstype
:c
for count orv
for value, optionaltimestamp
: unix timestamp optional
statsmcfly.get( { event: '' })
event
: name of event to return results for.