harvestd-client
v0.0.2
Published
NodeJS client library for the harvestd event collector
Downloads
4
Maintainers
Readme
Install
npm install --save harvestd-client
Use
var harvestd = require('harvestd-client');
var client = new harvestd.Client({
host: 'your-server-hostname.com',
token: '<your api token>'
secure: true, // optional, defaults to false
port: 80 // optional, defaults to 80
});
client.preTrack(function(event, data, cb){
// do stuff here
cb(event, data);
});
client.trackEvent('test-event', { test: 'foo' });