← projects

[Cell by Cell]

AOV, Funnel & A/B

Average order value with and without upsells across gateways, funnel steps and A/B tests — migrated from an analyst's view with parity to the cent.

● In productionProduct & FrontendCompany↑ Analytics Dashboards HubReactRechartsPostgresSQL
01 /context

An analyst had built an AOV dashboard on a view that unioned three sales tables. It worked, but lived outside the hub, had no auth, and mixed three concepts of cost in ROAS.

02 /my role

Built the new version in the hub, reusing the analyst's business rules and using the original view as the parity oracle.

03 /problem

Migrate without changing the numbers — and fix what was wrong without hiding that it changed.

04 /how it works
  1. 01 · Our own union

    Rebuilt the union of the sales tables (plus internal traffic) as a mirror of about 170k cells with a sanity guard.

  2. 02 · Parity, cell by cell

    Totals, macro groups and entries match the old view to the cent, with four deliberate divergences documented (channel cost, internal traffic, measured vs prorated funnel, FX).

  3. 03 · The whole dashboard

    3 pages, 8 KPIs, heat tables with cross-filter, a funnel (front, order bump, upsell, downsell), warnings and A/B with confidence intervals.

05 /architecture
01
Sales tables ×3 + internal
02
Union in mirror
03
Parity check
04
RPCs
05
AOV · funnel · A/B
06 /results
Parity to the cent with the previous view for every month loaded.
07 /what broke and what I changed
  • ! brokeBack-end ROAS read around 0.2 because a daily channel cost was stamped on every row and then summed (about 270× too much).

    → changedUse the allocated-cost column the view already exposed — a one-line fix, documented for the original author.

08 /related