Archived
Add registration funnel stats
First-party, consent-based funnel tracking: a cookie notice asks once, and only visitors who allow it get an anonymous visit id. Event page views and registration starts are tracked from the browser; submit and paid come from the registration. Adds the Registration funnel report (conversion per stage, daily trend, by source/device/ticket option), a conversion tile on the supervisor/admin dashboards, short-link source tagging, and a daily rollup of raw rows older than 90 days. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CP62L9JxHomA36aYP1ekCe
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
"use client";
|
||||
|
||||
import { useEffect } from "react";
|
||||
import { CONSENT_EVENT, trackFunnel } from "@/lib/analytics";
|
||||
|
||||
/** Records a funnel step for this page (once consent is given, even if given later). */
|
||||
export function FunnelTracker({ eventId, stage }: { eventId: string; stage: "view" | "start" }) {
|
||||
useEffect(() => {
|
||||
trackFunnel(eventId, stage);
|
||||
const onConsent = () => trackFunnel(eventId, stage);
|
||||
window.addEventListener(CONSENT_EVENT, onConsent);
|
||||
return () => window.removeEventListener(CONSENT_EVENT, onConsent);
|
||||
}, [eventId, stage]);
|
||||
return null;
|
||||
}
|
||||
Reference in New Issue
Block a user