declare global { interface Window { fathom?: { trackEvent: (name: string) => void }; } } /** * Sends an arbitrary event to Fathom Analytics. Will log a warning if Fathom * is not installed. */ export function trackEvent(event: string) { if (window.fathom) { window.fathom.trackEvent(event); } else { console.warn( `Attempting to track event ${event}, but Fathom is not installed.`, ); } }