Skip to content

feat(analytics): conversion-funnel instrumentation — Umami dead on canonical www host, no checkout events, /pro + landing dark #4931

Description

@koala73

Problem

The conversion funnel is unmeasurable end-to-end, and part of it is silently dark:

  1. Umami is disabled on the canonical production host. https://worldmonitor.app/ 301s to https://www.worldmonitor.app/, but UMAMI_DOMAINS in src/services/analytics.ts is 'worldmonitor.app,happy.worldmonitor.app'. The deployed tracker (abacus.worldmonitor.app/script.js) gates on exact hostname match (O&&!L.includes(h) in the minified tracker), so every pageview/event from www.worldmonitor.app — the host all traffic lands on — is dropped. Dashboard analytics (gate-hit, sign-up, identify) have been dead since the www canonicalization.
  2. No checkout events exist. The Umami catalog stops at gate-hit / sign-up; there is no checkout-start or checkout-success, so paywall→purchase conversion cannot be computed. Purchase truth lives only server-side (Convex webhooks).
  3. The money pages emit no analytics at all. /pro (pro-test SPA) and / (welcome landing) load no tracker.

Scope

  • Add www.worldmonitor.app to UMAMI_DOMAINS (keep apex + happy; tech/finance/commodity stay excluded per the upstream Umami Document news digest methodology #4183 note). Update the pinned assertion in tests/secondary-startup.test.mts.
  • Add checkout-start / checkout-success / checkout-failed to the typed event catalog; fire from src/services/checkout.ts#startCheckout (with surface + authed props) and from the checkout-return reconciliation in src/app/panel-layout.ts.
  • Add the Umami tracker (nonce="wm-static-bootstrap", data-domains incl. www) to pro-test/index.html and pro-test/welcome.html; fire checkout-start from pro-test/src/services/checkout.ts; tag primary landing CTAs with data-umami-event.
  • Rebuild public/pro/ (freshness gate).

With this, the funnel reads end-to-end in one tool: pageview → gate-hit → checkout-start → checkout-success, segmented by plan via the existing identifyUser.

Part of the 2026-07-06 revenue review (bet B2).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions