@agilo/medusa-analytics-plugin

中文文档
1.4.0发布于 2026/02/26MITESM + CJS构建来源已验证近 30 天下载 4053

A simple analytics plugin for Medusa

原始使用文档
文档目录5 节
  1. Overview
  2. Requirements
  3. Features
  4. Getting Started
  5. Contributing

Medusa logo

Medusa Analytics Plugin

Get actionable insights into your store's performance and make data-driven decisions right from the Medusa Admin dashboard.

Overview

The Medusa Analytics Plugin is a lightweight analytics extension for the Medusa Admin dashboard. It provides store admins with a clear view of sales and product performance using focused KPIs, charts, and tables, all accessible directly within the Medusa Admin panel.

✅ Compatible with Medusa v2.11.0 and above

Requirements

  • Medusa v2.11.0+ - This plugin requires Medusa v2.11.0 or later due to its dependency on the Caching Module, which was introduced in that version.

Features

  • Date Range Picker with presets: This Month, Last Month, Last 3 Months, Custom Range (applies to all analytics)
  • Tabbed Interface: Switch between Orders and Products analytics
  • Charts & KPIs:
    • Orders Tab:
      • Total Orders (KPI)
      • Total Sales (KPI)
      • Orders Over Time (Line Chart)
      • Sales Over Time (Line Chart)
      • Top Regions by Sales (Bar Chart)
      • Order Status Breakdown (Pie Chart)
    • Products Tab:
      • Top-Selling Products (Bar Chart)
      • Out-of-Stock Variants (Table)
      • Low Stock Variants (Table)

Getting Started

  1. Install the plugin in your Medusa project:

    yarn add @agilo/medusa-analytics-plugin
    
  2. Add the plugin to your Medusa backend configuration. In medusa-config.ts, add the following to the plugins array:

    plugins: [
      {
        resolve: '@agilo/medusa-analytics-plugin',
        options: {},
      },
      // ...other plugins
    ],
    
  3. Install dependencies:

    yarn
    
  4. Start your Medusa server:

    yarn dev
    
  5. Access the Analytics page from the Medusa Admin dashboard.

Contributing

We welcome contributions and feedback. To get involved, open an issue or submit a pull request on GitHub →

版本与发布记录

@agilo/medusa-analytics-plugin 共发布 10 个版本,首次发布于 2025/08/01;过去 12 个月发布了 5 个版本。最新版本附带 npm provenance 构建来源证明,可追溯到公开的 CI 构建记录。

版本发布日期距今
1.4.0latest2026/02/268 个月前
1.3.52026/02/208 个月前
1.3.42026/02/208 个月前
1.3.32026/02/208 个月前
1.3.22026/02/198 个月前
1.2.12025/09/261.1 年前

其他发布通道:canary → 1.2.0-0。

关于 @agilo/medusa-analytics-plugin 的常见问题

@agilo/medusa-analytics-plugin 是什么?

A simple analytics plugin for Medusa

如何安装 @agilo/medusa-analytics-plugin?

在项目目录运行 npm install @agilo/medusa-analytics-plugin,或使用 pnpm add / yarn add / bun add。它还需要宿主项目提供 peer 依赖:@medusajs/ui(>=4.0.0 <5.0.0)、@medusajs/icons(>=2.11.0 <3.0.0)、@medusajs/medusa(>=2.11.0 <3.0.0)、@medusajs/admin-sdk(>=2.11.0 <3.0.0)、@medusajs/framework(>=2.11.0 <3.0.0)。npm 7 及以上与 pnpm 8 及以上默认会自动安装必需的 peer 依赖,Yarn 需要手动安装。

@agilo/medusa-analytics-plugin 支持 TypeScript 吗?

该包的 package.json 没有声明类型入口。需要类型提示时,可以在 npm 上查找社区维护的 @types/agilo__medusa-analytics-plugin 是否存在。

@agilo/medusa-analytics-plugin 支持 ESM 还是 CommonJS?

同时提供 ES Module 与 CommonJS 入口,import 和 require() 都可以使用,打包工具会自动选择合适的版本。

@agilo/medusa-analytics-plugin 需要什么版本的 Node.js?

package.json 的 engines 字段要求 Node.js >=20。版本不符时 npm 默认只给出警告,开启 engine-strict 后会拒绝安装。

@agilo/medusa-analytics-plugin 可以商用吗?

@agilo/medusa-analytics-plugin 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@agilo/medusa-analytics-plugin 的下载量有多少?

根据 npm 官方下载统计,@agilo/medusa-analytics-plugin 在 2026/10/05 – 2026/11/03 这 30 天内被下载 4,053 次,日均约 135 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@agilo/medusa-analytics-plugin 还在维护吗?

最新版本 1.4.0 发布于 2026/02/26(8 个月前);至今共发布 10 个版本,其中过去 12 个月发布了 5 个;首次发布于 2025/08/01。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。