Metrics

Metrics

Visualize your shop's average order value, orders per month and more customizable graphs

npm install @pinelab/vendure-plugin-metrics
Latest version1.7.0
Compatibility>=2.2.0
Last publishedDec 20, 2024
Pinelab
PinelabWebshops for mission-driven brands and wholesalers

Official documentation here

A plugin to visualize your shops most important metrics of the past year.

image

Getting started

  1. Configure the plugin in vendure-config.ts:
  1. Rebuild your Admin UI
  2. Start your Vendure server and login as administrator
  3. You should now be able to add the widget metrics on your dashboard.

Metric results are cached in memory to prevent heavy database queries every time a user opens its dashboard.

Built-in Metrics

  1. Revenue (per product): The total revenue per month, or the revenue generated by specific variants if a variant is selected.
  2. Average Order Value (AOV): The average of order.totalWithTax of the orders per week/month
  3. Units sold: The number of units sold for the selected variant(s).

You can implement the MetricStrategy interface and pass it to the MetricsPlugin.init() function to have your custom metric visible in the Widget.

Contributions

Thanks @dalyathan for his contributions on this plugin.