1.0.0 • Published 6 years ago

statsmcfly v1.0.0

Weekly downloads
2
License
ISC
Repository
-
Last release
6 years ago

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 track
  • value: value you want to store. can be numbers, strings or json objects
  • type: c for count or v for value, optional
  • timestamp: unix timestamp optional

statsmcfly.get( { event: '' })

  • event: name of event to return results for.