Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

metrics-stripe-subscriptions

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

metrics-stripe-subscriptions

Stripe subscriptions plugin for segmentio/metrics

  • 0.0.2
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
9
increased by800%
Maintainers
1
Weekly downloads
 
Created
Source

metrics-stripe-subscriptions

A Stripe subscriptions plugin for segmentio/metrics.

Use this plugin to visualize Stripe subscriptions over time.

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 divided by date granularity.

Daily:

  • stripe subscriptions today - the number of subscriptions today
  • stripe subscription mrr today - the amount subscription mrr today
  • stripe subscriptions yesterday - the number of subscriptions yesterday
  • stripe subscription mrr yesterday - the amount subscription mrr yesterday
  • stripe subscriptions 2 days ago - the number of subscriptions 2 days ago
  • stripe subscription mrr 2 days ago - the amount subscription mrr 2 days ago

Weekly:

  • stripe subscriptions past week - the number of subscriptions last week
  • stripe subscription mrr past week - total subscription mrr last week
  • stripe subscriptions 2 weeks ago - the number of subscriptions 2 weeks ago
  • stripe subscription mrr 2 weeks ago - total subscription mrr 2 weeks ago

Monthly:

  • stripe subscriptions past month - the number of subscriptions last month
  • stripe subscription mrr past month - total subscription mrr last month
  • stripe subscriptions 2 months ago - the number of subscriptions 2 months ago
  • stripe subscription mrr 2 months ago - total subscription mrr 2 months ago

Total:

  • stripe subscriptions - total amount of Stripe subscriptions
  • stripe subscription mrr - total amount subscription mrr

Weekly Sparkline:

  • stripe subscriptions last week - an array of subscriptions in the past 7 days
  • stripe subscription mrr last week - an array of subscription amounts in the past 7 days

License

MIT

Keywords

FAQs

Package last updated on 01 Jul 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc