metron-client

A client library for working with metron.

Build

npm install && grunt

Usage Examples

In the browser

var tracker = new Metron.Tracker({
  domain: 'https://redditanalytics.com',
});

tracker.send({
  event: 'embed',
  action: 'create',
  thing: id,
  sr: sr,
  live: live,
}, callback);

In node.js

NOTE: See request for http api.

var Metron = require('metron-client');

var tracker = new Metron.Tracker({
  domain: 'https://redditanalytics.com',
});

var request = tracker.send({
  event: 'embed',
  action: 'create',
  thing: id,
  sr: sr,
  live: live,
}, callback);