/** * Analytics choke-point — all product analytics must go through these helpers. * New third-party scripts in app/ must check hasAnalyticsConsent() before loading. */ import { hasAnalyticsConsent } from '@/lib/consent/cookie-consent' export type AnalyticsEventProperties = Record export function trackClientEvent(_event: string, _properties?: AnalyticsEventProperties): void { if (!hasAnalyticsConsent()) return // Future: PostHog/Umami client capture (see saas-deployment-prep.md §D) } export function trackServerEvent(_event: string, _properties?: AnalyticsEventProperties): void { if (!hasAnalyticsConsent()) return // Future: server-side analytics capture }