Full funnel visibility: editor, redirect-payments, per-product CTR
Up to now the conversion funnel had two big blind spots: the editor step between upload and checkout (we knew people uploaded PDFs but had no idea what they did before paying), and Stripe-hosted Checkout-Session redirects (Pro subscriptions and sublease document payments fired no payment_succeeded events at all, so the dashboard showed real money coming in but no funnel attribution). This release wires both up. Five new editor events (editor_opened → document_added → field_placed → editor_continue_clicked → contract_finalized) make every step between upload and payment visible, and three new redirect-flow events (checkout_opened → checkout_redirected → payment_succeeded on the success page) close the gap for subscription and sublease purchases. The funnel-snapshot script now produces per-product CTR for credit-pack, pro-subscription, and sublease-document so we can see which entry point converts best.
Editor funnel events — see drop-off between upload and checkout
Neweditor_opened (with template/draft/from-landing breakdown), document_added, field_placed, editor_continue_clicked (with docCount and types), contract_finalized, and editor_continue_failed for backend errors. Each fires once per editor session so counts are comparable to upload and payment events.
Redirect-payment tracking for Pro Subscription and Sublease
NewPro Subscription (CTA on landing → Stripe-hosted Checkout) and Sublease Document Payment (sublease form → Stripe-hosted Checkout) now fire checkout_opened before redirecting and payment_succeeded on their success pages. Real Stripe charges that previously didn't appear in the funnel are now attributed to a product.
All payment events tagged with product slug
ImprovementInline credit-pack purchases (checkout-form.tsx) now include product, packId, and flow on every event. Funnel-snapshot script splits per-product CTR (credit-pack vs. pro-subscription vs. sublease-document) so we can see which path converts best at every step.
checkout_failed — catches backend errors before Stripe loads
NewWhen the create-checkout API call fails (network error, 500 response, missing URL), checkout_failed fires with the error type. We see hangs at 'opened but no Stripe' before users do.
Funnel-snapshot script: full 11-step session funnel
Infrascripts/funnel-snapshot.ts now reports the complete page_view → upload_completed → editor_opened → document_added → field_placed → editor_continue_clicked → contract_finalized → checkout_opened → payment_submitted → payment_succeeded order with drop-off rates, plus per-product breakdown and per-flow split (inline vs. redirect).