/** * Analytics Events Utility * * Centralized definitions for common analytics events and their properties. */ export const AnalyticsEvents = { // Page & Navigation Events PAGE_VIEW: "pageview", PAGE_SCROLL: "page_scroll", PAGE_EXIT: "page_exit", SCROLL_DEPTH: "scroll_depth", // User Interaction Events BUTTON_CLICK: "button_click", LINK_CLICK: "link_click", FORM_SUBMIT: "form_submit", FORM_START: "form_start", FORM_ERROR: "form_error", FORM_FIELD_FOCUS: "form_field_focus", // UI Interaction Events MODAL_OPEN: "modal_open", MODAL_CLOSE: "modal_close", TOGGLE_SWITCH: "toggle_switch", ACCORDION_TOGGLE: "accordion_toggle", TAB_SWITCH: "tab_switch", // Error & Performance Events ERROR: "error", PERFORMANCE: "performance", API_ERROR: "api_error", API_SUCCESS: "api_success", // Custom Business Events CONTACT_FORM_SUBMIT: "contact_form_submit", NEWSLETTER_SUBSCRIBE: "newsletter_subscribe", } as const; /** * Type-safe event properties for common events */ export type AnalyticsEventName = (typeof AnalyticsEvents)[keyof typeof AnalyticsEvents];