chore: move analytics to platform (#2960)

This commit is contained in:
Akash K
2023-04-04 02:15:20 +05:30
committed by GitHub
parent defece95fc
commit 37a3b72025
19 changed files with 140 additions and 198 deletions

View File

@@ -0,0 +1,12 @@
export type HoppRequestEvent =
| {
platform: "rest" | "graphql-query" | "graphql-schema"
strategy: "normal" | "proxy" | "extension"
}
| { platform: "wss" | "sse" | "socketio" | "mqtt" }
export type AnalyticsPlatformDef = {
initAnalytics: () => void
logHoppRequestRunToAnalytics: (ev: HoppRequestEvent) => void
logPageView: (pagePath: string) => void
}