killbill-memoizeit

Name Message Date
src
pom.xml
README.md

Analytics plugin

The Analytics plugin provides simple, yet powerful, dashboarding capabilities.

To create a dashboard, go to (http://127.0.0.1:8080/plugins/killbill-analytics/static/analytics.html).

A dashboard is constituted of a number of reports, each of them being numbered, starting from 1. All reports are displayed in a single column, the report number 1 being the top most one. All reports share the same X axis.

Each report can contain one or multiple time series, the source data being a table or a view with the following format:

SQL column nameDescription
pivotSubcategory in your dataOptional
dayX values (date or datetime)Required
countY values (float)Required

To configure a report, create a INI file in the following format:

[report_name]
tableName = view_or_table_name_to_query
prettyName = Pretty name to use for the dashboard legend

The path to the INI file can be configured via -Dcom.ning.billing.osgi.bundles.analytics.reports.configuration

API

The dashboard system is controlled by query parameters:

  • report1, report2, etc.: report name (from the configuration). The number determines in which slot the data should be displayed, starting from the top of the page. For example, report1=trials&report1=conversions&report1=cancellations&report2=accounts will graph the trials, conversions and cancellations reports in the first slot (on the same graph), and the accounts report below (in slot 2)
  • startDate and endDate: dates to filter the data on the server side. For example: startDate=2012-08-01&endDate=2013-10-01
  • smooth1, smooth2, etc.: smoothing function to apply for data in a given slot. Currently support smoothing functions are:
  • AVERAGE_WEEKLY: average the values on a weekly basis
  • AVERAGE_MONTHLY: average the values on a monthly basis
  • SUM_WEEKLY: sum all values on a weekly basis
  • SUM_MONTHLY: sum all values on a monthly basis
  • To filter pivots from a report, use ! for exclusions and $ for inclusions. For example, report1=payments_per_day$AUD$EUR will graph the payments for AUD and EUR only, whereas report1=payments_per_day!AUD!EUR will graph all payments but the ones in AUD and EUR.