1.0.4 • Published 10 years ago

metrics-stripe-subscriptions v1.0.4

Weekly downloads
37
License
-
Repository
github
Last release
10 years ago

metrics-stripe-subscriptions

A Stripe subscriptions plugin for segmentio/metrics.

Use this plugin to visualize Stripe subscriptions over time.

npm.io

Installation

$ npm install metrics-stripe-subscriptions 

Quickstart

Here's a full example of a Geckoboard dashboard showing Stripe subscription metrics:

var Metrics = require('metrics');
var subscriptions = require('metrics-stripe-subscriptions');
var geckoboard = require('geckoboard')('api-key');

new Metrics()
  .every('10m', subscriptions('stripe-key'))
  .use(function (metrics) {
    metrics.on('stripe subscriptions today', geckboard('widget-id').number);
  });

Filter Customers

You can further filter customers using stripe-subscriptions filters:

new Metrics()
  .every('10m', subscriptions('stripe-key', { filter: filter }))

function filter (customer) {
  return customer.id !== 'cus_8239d2jd9j'; // filter enterprise customer X
}

Metrics

The metrics exposed by this plugin are:

  • stripe subscriptions - the number of subscriptions
  • stripe subscriptions mrr - the monthly recurring revenue amount representing the subscriptions

and are calculated for the last 30 days, last 52 weeks, and last 10 years.

License

MIT

1.0.4

10 years ago

1.0.2

10 years ago

1.0.1

10 years ago

1.0.0

11 years ago

0.0.3

11 years ago

0.0.2

11 years ago

0.0.1

11 years ago