Files
hidden11/lib/analytics-events.ts
alexandrev-tibco bee80c7776
Build and push image / build (push) Successful in 1m15s
Add onboarding and viral share loop
2026-05-05 19:26:26 +02:00

16 lines
371 B
TypeScript

type EventProperties = Record<string, string | number | boolean | null | undefined>;
declare global {
interface Window {
gtag?: (...args: unknown[]) => void;
}
}
export function trackEvent(name: string, properties: EventProperties = {}): void {
if (typeof window === "undefined" || !window.gtag) {
return;
}
window.gtag("event", name, properties);
}