Skip to main content
← Back to plugins
Metrics

Metrics

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

Version3.1.0
Compatibility>=2.2.0
CategoryAdmin tools
Downloads1.6K monthly
Last updatedFeb 5, 2026

Official documentation here

A plugin to visualize your shops most important metrics.

image

Getting started

  1. Configure the plugin in vendure-config.ts:
Ts
  1. Rebuild your Admin UI
  2. Run a database migration to add the necessary tables to your database.
  3. Start your Vendure server and login as administrator
  4. You should now be able to add the widget Advanced Metrics to 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 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. Below is the implementation of the AOV metric, already included in the plugin, but it serves as an example of how to implement a custom metric.

Ts

Contributions

Special thanks to@dalyathan for his contributions on this plugin.

Changelog
  • Upgraded to Vendure 3.5.3
  • Documentation update
  • Updated official documentation URL
  • Abandoned server side tracking. Use dedicated analytics tool instead. This plugin focusses on measuring existing data in Vendure.
  • BREAKING: Custom metrics don't receive session entities anymore, because server side tracking is no longer supported.
  • Showing both with and without tax for AOV.
  • Upgrade to Vendure to 3.3.2
  • Dedicated config for removing old request logs
  • Fixed bug where sessions were not being calculated correctly
  • Using device-detector-js to detect device type instead of ua-parser-js, because we see a lot of 'Unknown' devices in production.
  • Only track requests that are coming in via pageVisit mutation.
  • Added optional inputs to pageVisit mutation.
  • Renamed Visitors to Sessions
  • Added server side tracking: Log shop-api events and store in database, to allow for server side visitor tracking
  • Entities are loaded on plugin instead of in strategies, for better performance.
  • Metric results are now persisted in the database instead of in memory.
  • Generation of metrics and loading of entities moved to worker.
  • Fixed a bug where variant IDs were not being passed correctly to the metrics query.
  • Update Vendure to 3.1.1
  • Fixed chart text color to display correctly in dark mode.
  • Allow showing metrics of past X months instead of always past 12 months.
  • Removed conversion metric, as it is can not be accurately calculated based on created orders alone
  • Small improvement in query performance
  • Allow specifying per metric if it's filterable by variant ID's
  • Added conversion metric
  • Fixed widget ID to prevent conflicts with Vendure's built in widget
  • Added loading state for widget
  • Only fetch relations from DB when variants are passed in for better performance
  • Added revenue (per variant) metric
  • Calculate with or without tax based on channel settings
  • Use number instead of currency formatting for Units Sold metric
  • Added a max cache age of 12 hours for metrics
  • Fix typescript build errors (#525)
  • Update compatibility range (#480)
  • Updated Vendure to 2.2.6
  • Updated vendure to 2.1.1
  • Reintroduced custom strategies and using the new Chartist charts (#236)