Features Pricing Services
Compare
Resources
Contact Start Free Trial
Home/Docs/Analytics

Analytics

Two dashboards, one data source. Both compute on demand from Shopify orders. No external warehouse, no daily ETL job, no stale data — just live queries against Shopify with a thin sliding cache for performance.

Admin dashboard (KPI for the merchant)

Open Admin → Analytics. You'll see:

Filters: period (week / month / year / custom), agent, company. Comparison toggle shows the previous equivalent period side-by-side.

Agent dashboard (KPI scoped per agent)

From the agent app, the Commissions tab and home tiles show:

Strict scoping: the agent endpoint never returns data outside the agent's assignment / territory.

Period selector and comparison

Periods supported:

Comparison: when on, the dashboard shows the previous equivalent period. "This week vs last week", "This month vs last month", and so on. Custom ranges compare to the same-length window immediately before.

Caching behavior

Every analytics query goes through a sliding cache in Upstash:

Range typeTTLInvalidation
Live preset (this week / month / year)60 secondsRefund webhook calls bustShop() to invalidate.
Custom past range5 minutesSame — refund invalidates everything for the shop.

This means you don't pay GraphQL cost for repeated dashboard refreshes within the cache window, and a refund hitting your store always invalidates downstream metrics within seconds.

i

If KV_REST_API_URL isn't configured, caching degrades open — every dashboard query goes straight to Shopify. Functional, but slower. Recommended for production.

Top customers / top agents tables

Both tables are sortable client-side and exportable as CSV via the same export endpoint as commissions. Useful for monthly leaderboard recognition or commercial planning.

Was this helpful?
Edit this page on GitHub