The Gotchas
Turning events into trustworthy numbers is where the traps live. Each shows the naive answer next to the correct one.
Definition drift
Someone asks "what's our conversion rate?" Marketing means qualified ÷ leads; Sales means deals ÷ qualified. Same word, different denominators — and very different answers.
Marketing conversion (qualified ÷ leads)
45.3%
Sales conversion (deals ÷ qualified)
36.4%
Lesson
Pin every metric's numerator, denominator, window, and dedupe rule before anyone reads it.
Late / out-of-order events
Jun 1's deals were rolled up the night of Jun 1. A deal that actually closed Jun 1 is reported two days late — after that window's pre-aggregate was already written.
Pre-aggregated value (stale)
3
After recomputing the affected window
4
Lesson
Pre-aggregates drift when events arrive late. Recompute the affected windows — tally's recompute is idempotent for exactly this.
Double counting
A won deal is emitted by two systems (CRM and billing) with the same identity. A naive event count treats them as two deals.
Naive count of events
3
Distinct by idempotency key
2
Lesson
Count distinct on a stable idempotency key (or enforce it at the store) so the same logical action is counted once.