feat(analytics): implement advanced tracking with script-less smart proxy
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
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:
@@ -0,0 +1,44 @@
|
||||
/**
|
||||
* 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];
|
||||
Reference in New Issue
Block a user