feat(FN-356): add checkout_started PostHog event to subscription checkout flow (+1 more)

Commits merged:
- chore(FN-356): verify checkout_started event is in place
- feat(FN-356): add checkout_started PostHog event to subscription checkout flow

Files changed:
apps/web/src/routes/dashboard/subscription/index.tsx | 4 ++++
 1 file changed, 4 insertions(+)

Fusion-Task-Id: FN-356
This commit is contained in:
Fusion
2026-05-14 10:00:32 +00:00
parent 69d07fc488
commit 5bd5325367

View File

@@ -431,6 +431,9 @@ export function SubscriptionPage() {
capture("plan_selected", { plan: planKey });
setSelectedPlanKey(planKey);
setSelectedBrandIds([]);
if (planKey === "full") {
capture("checkout_started", { plan: planKey, period: billingPeriod });
}
setStep(planKey === "full" ? "payment" : "brands");
}
@@ -780,6 +783,7 @@ export function SubscriptionPage() {
onAdvance={() => {
if (step === "plan") {
if (!selectedPlanKey) return;
capture("checkout_started", { plan: selectedPlanKey, period: billingPeriod });
setStep(isFullPlan ? "payment" : "brands");
} else if (step === "brands") {
handleAdvanceFromBrands();