KPI master catalog
KPI master catalog
Canonical list of portal KPIs by client. Sources live under apps/safrazkhan-portals/public/portal/sources/umami/. Display labels for events, channels, query params, and KPI keys are managed in /admin → Alias enrichment.
Last refreshed 36 seconds ago
This page is the agency master document. Client-facing charts stay on each portal path (e.g. Doorware). Rebuild with npm run bi:build after SQL or alias changes that Evidence joins.
Clients
| Client | Portal | Umami website_id | Access |
|---|---|---|---|
| Doorware | /doorware | 9392fb9a-76fd-4001-9768-d227a70bbcb7 | Cloudflare Access |
Doorware — commercial KPIs
| KPI key | Alias label (admin) | Definition | Source | Surface |
|---|---|---|---|---|
total_revenue | Total revenue | Gross purchase revenue from event_data.revenue (30d) | kpis.sql | BigValue |
orders | Completed orders | Count of purchase events (30d) | kpis.sql | BigValue |
total_sessions | Storefront sessions | Distinct sessions with activity (30d) | kpis.sql | BigValue |
daily_revenue | Daily purchase revenue | Revenue by UTC day | daily_revenue.sql | AreaChart |
order_revenue_dist | Order revenue distribution | Row-level purchase amounts (cust_*) | order_revenue_dist.sql | Histogram |
Doorware — checkout funnel
Shopify event names (not GA4 aliases). Funnel + Sankey count unique visitors with actual stage events.
| Stage raw key | Alias label | Events |
|---|---|---|
product_added_to_cart | Add to cart | product_added_to_cart |
cart_viewed | View cart | cart_viewed |
checkout_* | Checkout | checkout_started, contact/address/shipping submitted |
payment_info_submitted | Payment | payment_info_submitted |
purchase | Purchase | purchase |
| KPI / view | Source | Surface |
|---|---|---|
| Funnel totals | funnel_totals.sql | FunnelChart |
| Flow + drop-off | funnel_sankey.sql | SankeyDiagram |
| Steps by day | funnel_steps.sql | stacked BarChart |
| Intensity heatmap | funnel_heatmap.sql | Heatmap |
Doorware — identity & journeys
| KPI / view | Definition | Source | Surface |
|---|---|---|---|
| Purchase IDs | cust_* purchases + email / device / order | purchase_distinct_ids.sql | DataTable |
| Purchaser history | Merged sk_* / device sessions → cust_* | purchaser_session_summary.sql | DataTable |
| Journey events | Full event stream across merged identities | purchaser_journey_events.sql | DataTable (Details) |
| Enriched purchasers | Pre-purchase sessions/pageviews, days to purchase, top path | purchaser_journey_enriched.sql | ScatterPlot + table |
days_to_purchase | First seen → first purchase (merged IDs) | purchaser_journey_enriched.sql | Scatter X |
Doorware — acquisition (landing enrichment)
Same first-touch logic as /admin/sql landing CTE. Labels come from portal_control.enrichment_aliases when present.
| KPI / view | Definition | Source | Surface |
|---|---|---|---|
unique_visitors_channel | Unique visitors by first-touch channel | channel_summary_agg.sql | BarChart + table |
| Channel × landing × UTM | Aggregate visitor properties | visitor_acquisition_agg.sql | DataTable |
| Query param keys | First-touch url_query keys | visitor_param_keys_agg.sql | DataTable |
Channel buckets (raw → admin alias): google_ads, meta, microsoft_ads, tiktok, x_twitter, linkedin, utm_only, referrer, direct_or_unknown.
How to extend a new client
- Add client in
/admin(slug +website_id). - Copy Doorware SQL under
sources/umami/, swapwebsite_id, or parameterize later. - Seed alias rows:
POST /api/admin/aliasesor insert intoportal_control.enrichment_aliases. - Add a section to this page + a portal path under
pages/<slug>/. npm run env:bi && npm run bi:build && npm run portals:pages.
Related
- Component quick reference
- Doorware portal
- Agency admin
- Migration:
apps/safrazkhan-portals/migrations/002_enrichment_aliases.sql