7.1.2 • Published 10 months ago

vendure-plugin-metrics v7.1.2

Weekly downloads
-
License
MIT
Repository
github
Last release
10 months ago

Vendure Metrics plugin

Vendure version

A plugin to measure and visualize your shop's average order value (AOV),number of orders per month or per week and number of items per product variant for the past 12 months (or weeks) per variants.

image

Getting started

  1. Configure the plugin in vendure-config.ts:
import { MetricsPlugin } from "vendure-plugin-metrics";

plugins: [
  ...
    MetricsPlugin,
    AdminUiPlugin.init({
      port: 3002,
      route: 'admin',
      app: compileUiExtensions({
        outputPath: path.join(__dirname, '__admin-ui'),
        extensions: [SalesPerVariantPlugin.ui],
      }),
    }),
  ...
]
  1. Start your Vendure server and login as administrator
  2. You should now be able to select metrics when you click on the button add widget

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

Metrics

  1. Average Order Value (AOV): The average of order.totalWithTax of the orders per week/month
  2. Nr of items: The number of items sold. When no variants are selected, this metric counts the total nr of items in an order.
  3. Nr of orders: The number of order per week/month

Breaking changes since 5.x

For simplicity and performance reasons, we decided it makes more sense to display our 3 metrics of choice, and not have metrics extensible with custom Metrics for now. This is what changes in your vendure-config:

- plugins: [
-   MetricsPlugin.init({
-     metrics: [
-       new NrOfOrdersMetric(),
-       new AverageOrderValueMetric(),
-       new ConversionRateMetric(),
-       new RevenueMetric(),
-     ],
-  }),
- ]
+ plugins: [
+     MetricsPlugin,
+ ]

You can now also view metrics per variant(s) if you'd like.

Contributions

Thanks @dalyathan for his contributions on this plugin.

7.1.2

10 months ago

7.1.1

10 months ago

7.1.0

10 months ago

5.5.0

1 year ago

7.0.6

12 months ago

5.4.0

1 year ago

7.0.5

12 months ago

5.0.1

1 year ago

6.0.0

1 year ago

7.0.0

1 year ago

5.6.7

1 year ago

4.10.0

1 year ago

4.3.0

2 years ago

4.2.2

2 years ago

4.2.1

2 years ago

4.2.0

2 years ago