refactor(analytics): abstract analytics into provider pattern
Build and Deploy / build (push) Has been cancelled
Build and Deploy / build (push) Has been cancelled
- Add type-safe AnalyticsEvent union types - Create AnalyticsProvider interface for pluggable analytics backends - Implement OpenPanelProvider and RybbitProvider adapters - Create AnalyticsTracker that fans out events to all providers - Simplifies adding new analytics platforms in the future
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
export { AnalyticsTracker, getTracker } from "./core/AnalyticsTracker";
|
||||
export type { AnalyticsEvent, AnalyticsProvider, ProductData, CartData, OrderData, UserData } from "./core/types";
|
||||
export { OpenPanelProvider } from "./providers/OpenPanelProvider";
|
||||
export { RybbitProvider } from "./providers/RybbitProvider";
|
||||
export { useAnalytics } from "./hooks/useAnalytics";
|
||||
Reference in New Issue
Block a user