feat(analytics): implement advanced tracking with script-less smart proxy
Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 9s
Build & Deploy / 🧪 QA (push) Failing after 1m18s
Build & Deploy / 🏗️ Build (push) Failing after 2m58s
Build & Deploy / 🚀 Deploy (push) Has been skipped
Build & Deploy / 🩺 Health Check (push) Has been skipped
Build & Deploy / 🔔 Notify (push) Successful in 2s

- Added Umami Smart Proxy route handler
- Refactored Umami adapter to use proxy-based fetch
- Implemented TrackedButton, TrackedLink, and ScrollDepthTracker
- Integrated event tracking into ContactForm
- Enhanced Analytics component with manual pageview and performance tracking
This commit is contained in:
2026-02-16 23:03:42 +01:00
parent 7fd0c447bc
commit 2038b8fe47
13 changed files with 485 additions and 65 deletions

View File

@@ -13,6 +13,9 @@ import {
AlertCircle,
} from "lucide-react";
import { useAnalytics } from "./analytics/useAnalytics";
import { AnalyticsEvents } from "./analytics/analytics-events";
import { FormState } from "./ContactForm/types";
import {
PRICING,
@@ -69,6 +72,8 @@ export function ContactForm({
const [isSubmitting, setIsSubmitting] = useState(false);
const [error, setError] = useState<string | null>(null);
const { trackEvent } = useAnalytics();
const containerRef = useRef<HTMLDivElement>(null);
// Scroll to top on flow or step change
@@ -131,6 +136,10 @@ export function ContactForm({
if (result.success) {
setIsSubmitted(true);
trackEvent(AnalyticsEvents.CONTACT_FORM_SUBMIT, {
flow,
config: flow === "configurator" ? state : undefined,
});
// Celebration
const duration = 3 * 1000;
const animationEnd = Date.now() + duration;