Skip to main content

Analytics Dashboard

The Analytics Dashboard gives tenant admins a unified view of revenue, product performance, customer spend, conversion health, and refund rates — all scoped to their tenant and computed live from order history.

Accessing the dashboard

Log in to the Admin panel and click Dashboards → Analytics in the left sidebar. All data shown is scoped to your tenant; data from other tenants is never visible.

Date range selection

A date range bar appears at the top of the dashboard. Use the preset buttons or the date picker to choose a window:

PresetWindow
7dLast 7 calendar days
30dLast 30 calendar days (default)
90dLast 90 calendar days
YTDJanuary 1 of the current year through today

Click Apply after selecting a custom range. Analytics results are cached for 60 seconds per tenant per range, so back-to-back refreshes of the same window are fast.


Widgets

1. Revenue by Day

A line chart showing daily revenue (green line) and refunded revenue (red line) within the selected period.

  • Y-axis: USD totals (cents-to-dollars conversion applied automatically).
  • X-axis: Calendar date in YYYY-MM-DD format.
  • Only orders with status PAID, FULFILLING, SHIPPED, or COMPLETE count toward revenue. Orders with status REFUNDED or PARTIALLY_REFUNDED count toward the refund line.

[screenshot: revenue-line-chart.png]

Click Export CSV to download a file with columns: date, revenue_usd, order_count, refunded_usd.


2. Top Products

A horizontal bar chart ranking the top 10 products by revenue within the selected period.

  • Each bar represents one product; bar length = total revenue.
  • Revenue is computed at the line-item level (quantity × unitPriceCents) so multi-item orders contribute each product separately.
  • Only orders in completed statuses are included.

[screenshot: top-products-bar-chart.png]

Click Export CSV to download a file with columns: product_id, name, sku, qty_sold, revenue_usd.


3. Top Customers

A table ranking the top 10 customers by total spend within the selected period. Customers without a customerId (e.g., guest orders) are excluded.

ColumnDescription
CustomerDisplay name captured at order time
OrdersNumber of completed orders in the window
Total SpentSum of totalCents across those orders

[screenshot: top-customers-table.png]

Click Export CSV to download a file with columns: customer_id, display_name, order_count, total_spent_usd.


4. Conversion Funnel

Four-step funnel showing drop-off from session start to shipped order. Each row shows the raw count and the conversion rate from the prior step.

StepDefinition
Sessions StartedAll order sessions created in the window
Sessions CompletedSessions that reached the SUBMITTED state
Orders ConfirmedOrders in any completed status (PAID, FULFILLING, SHIPPED, COMPLETE)
Orders ShippedOrders with status SHIPPED

[screenshot: conversion-funnel.png]

A low Sessions Completed / Sessions Started ratio suggests friction in the ordering flow (address validation, shipping-type selection, payment).

Click Export CSV to download a one-row file with all four counts and their conversion rates.


5. Refund Rate KPI

A summary card showing refund health for the selected period.

FieldDescription
Refund Rate(refunded + partially refunded) / total orders as a percentage
Total OrdersAll orders (completed + refunded) in the window
RefundedCount of orders with status REFUNDED
Partial RefundsCount of orders with status PARTIALLY_REFUNDED
Total RefundedSum of totalCents for refunded/partially-refunded orders

The rate badge is color-coded: green (≤5%), yellow (5–10%), red (>10%).

[screenshot: refund-rate-kpi.png]

Click Export CSV to download a one-row summary file.


Caching

All five analytics queries are cached in Valkey for 60 seconds per tenant per date range. If you need real-time data immediately after an order or refund, wait 60 seconds and click Refresh.

Permissions

Access to the Analytics Dashboard requires the admin.access permission. If you see a 403 error, contact your account owner to grant admin access.


Admins can generate shareable, time-limited links to any implemented report. The recipient does not need an admin account.

From the Admin panel

  1. Go to Dashboards → Analytics.
  2. Click the Share button next to the report you want to share.
  3. Choose a link expiry (default 7 days, configurable).
  4. Copy the generated URL and share it with your recipient.

The link encodes the report type, tenant, period, and an expiry timestamp — all signed with HMAC-SHA256. Tampered or expired links show a clear error page.

From a Discord command (admin only)

/report revenue 30d
/report sales 7d
/report products 90d

The bot responds with a summary embed and an Open full report button that links to the public share URL.

Downloaded CSV

Each public report page includes a Download CSV button. The CSV:

  • Uses UTF-8 with BOM (compatible with Excel)
  • Follows RFC 4180 (quoted fields when needed)
  • Is named <report-type>-<from>-<to>.csv

CSV download is available for Revenue Overview, Sales Velocity, and Product Performance. The remaining seven reports are planned for a future release.