Funnels & conversion events

Define clean snake_case milestone events, measure multi-step sign-up and checkout funnels, diagnose drop-offs, and keep product tracking privacy-aware.

Moving beyond page views to milestone funnels

Built-in telemetry in Analytics & live health tracks traffic, speed, sign-ins, API latency, and uptime from deploy one. Page views show who arrived, but they cannot reveal where users stall inside an onboarding wizard, booking calendar, or pricing drawer.

Milestone events turn raw traffic into a clear conversion funnel. Tracking a compact set of key actions from first click to verified Stripe payment pinpoints the exact friction point costing you customers.

Designing a clean snake_case event taxonomy

Analytics break down fast when screens emit inconsistent names like ClickedBuy, signup-complete, and UserPaid. Lock a strict lowercase snake_case convention (object_action) before wiring your first event:

  • Use lowercase `snake_case` strictly. Underscores only (checkout_started) prevent charts and queries from splitting one action across multiple spellings.
  • Write milestones in past tense. Pair a noun with a past-tense verb (account_created, onboarding_completed, purchase_completed) for unambiguous event logs.
  • Pair client intent with server truth. Track UI clicks in the browser, but fire commercial milestones like account_created and purchase_completed strictly on the server so ad blockers or closed tabs never lose revenue data.

Starter seven-event product funnel

Most SaaS products, booking apps, and stores only need seven milestone events to diagnose every major conversion leak:

Event nameFire layerKey propertiesQuestion answered
landing_cta_clickedClient UIroute, cta_slot, device_typeDoes your hero promise earn action?
signup_startedClient UIauth_method, entry_routeDo visitors reach the registration form?
account_createdServerauth_provider, role, utm_sourceHow many starts become real accounts?
onboarding_completedServersteps_completed, duration_secDo new users finish initial setup?
feature_activatedServeraction_type, item_countDid users experience core product value?
checkout_startedServerplan_tier, billing_cycle, currencyAre active users selecting a paid plan?
purchase_completedServer (Stripe webhook)plan_tier, amount_cents, currency, is_first_orderHow many checkouts settle in Stripe?

Keep event payloads structured, lean, and completely free of personal identifiers:

json
{
  "event": "purchase_completed",
  "occurred_at": "2026-05-14T16:42:10Z",
  "session_id": "ses_81a9f0c2",
  "user_id": "usr_44b21d9e",
  "environment": "live",
  "properties": {
    "plan_tier": "pro_monthly",
    "billing_cycle": "monthly",
    "amount_cents": 2500,
    "currency": "usd",
    "is_first_order": true,
    "device_type": "mobile"
  }
}

Building and verifying your funnel in five steps

Build and verify milestone tracking in Preview so test clicks never distort your production numbers.

  1. Map four to six critical steps

    Chart the path from landing to paid value; skip noisy hovers and minor UI clicks.

  2. Freeze your snake_case catalog

    Finalize exact event names, server vs client firing layers, and allowed properties upfront.

  3. Wire tracking in Preview

    Store milestone rows in your database with typed validation and indexes on event, user_id, and occurred_at.

  4. Walk the journey as a fresh test user

    Complete sign-up, onboarding, and a Stripe Test checkout in Preview to verify every event fires once.

  5. Publish and gather real baseline volume

    Click Publish and collect at least 100 sessions per step before acting on conversion ratios.

Starter prompt · App

Add structured milestone funnel tracking using lowercase snake_case events: landing_cta_clicked and signup_started on the client, plus server-verified account_created, onboarding_completed, checkout_started, and purchase_completed (recorded strictly from the verified Stripe webhook). Store events in an app_events table indexed on event and occurred_at with opaque user_id only (no PII), and build an admin-only Funnels tab showing step conversion rates filterable by 7d, 30d, and device type.

Because Preview and Live use separate databases, QA runs never pollute Live funnels. See Preview vs Live.

Reading funnel drop-off and finding the real bottleneck

Optimizing checkout barely helps if two-thirds of prospects vanish during sign-up. Always fix the largest percentage drop nearest the top of your funnel first.

Steepest drop-offLikely root causeFix to test in Preview
`landing_cta_clicked` -> `signup_started`Slow route load or unexpected login wallSpeed up transition and preview value before gating
`signup_started` -> `account_created`Long form or missing social sign-inKeep fields minimal and add Google login via Authentication & roles
`account_created` -> `onboarding_completed`Blank dashboard or tedious questionnaireReplace long forms with a fast 2-step setup and starter template
`onboarding_completed` -> `feature_activated`Unclear next action after setupRedirect straight into the user's first core action
`checkout_started` -> `purchase_completed`Hidden fees or mobile form frictionShow total price upfront and verify mobile checkout in Browser Device Lab

Segmenting funnels by device and traffic source

Blended averages conceal broken flows. An 8% overall conversion rate can hide 14% on desktop beside a broken 1.2% mobile Safari button. Segment every funnel by mobile vs desktop, new vs returning users, and traffic source — pairing cohorts on Pro with ROAS & Stripe attribution.

Keeping event tracking privacy-aware and compliant

Strong measurement never requires storing raw personal data inside analytics logs. Build four privacy defaults into every app:

  • Exclude raw PII from event properties. Never log emails, names, phone numbers, addresses, tokens, or payment fields inside event payloads; reference opaque IDs (user_id, session_id) only.
  • Minimize collected events. Tie every tracked milestone to a concrete product decision instead of capturing every keystroke or scroll.
  • Distinguish core commerce records from ad trackers. Server-verified order and sign-up milestones are essential operational records, whereas optional advertising pixels follow regional consent banners and your Privacy Policy.
  • Gate funnel dashboards to admins. Enforce server-side admin role checks on funnel queries so regular members never view aggregate business counts.

Common tracking bugs and troubleshooting

Tracking symptomRoot causeFix
Counts double on refresh or re-renderClient event runs inside an unguarded effectTrigger strictly on user actions or deduplicate via server idempotency_key
`purchase_completed` lags behind StripeEvent fired on a client thank-you routeMove purchase_completed strictly into the server Stripe webhook handler
Funnel breaks after Google sign-inAnonymous session_id dropped on redirectPersist session_id in a first-party cookie and stitch to user_id on callback
Duplicate event names appear in chartsMixed casing (CheckoutStarted vs checkout_started)Enforce a typed allowlist of lowercase snake_case constants on the server
Conversion rate looks unusually highTeam tested directly on LiveRun QA strictly in Preview and exclude internal admin IDs from reports

Next steps

Still have a question?Ask our team and other builders on Discord.

From the blog