1.0.0 • Published 8 years ago
statsmcfly v1.0.0
Stats McFly API Module for Node.js
This a module to make interacting with the statsmcfly.com API easy.
Install
npm install statsmcflyExample
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:cfor count orvfor value, optionaltimestamp: unix timestamp optional
statsmcfly.get( { event: '' })
event: name of event to return results for.
1.0.0
8 years ago