about summary refs log tree commit diff
path: root/src/lib/analytics/types.ts
diff options
context:
space:
mode:
authordan <dan.abramov@gmail.com>2023-12-06 21:06:54 +0000
committerGitHub <noreply@github.com>2023-12-06 13:06:54 -0800
commit07fe0585775f1c9d89399b00dc1849a6d0c5d71f (patch)
tree1ef0968dbfbc9dffe25176ddb1ab666f74ebe898 /src/lib/analytics/types.ts
parenta924df4dcd87b9963699643d04475dc89c926633 (diff)
downloadvoidsky-07fe0585775f1c9d89399b00dc1849a6d0c5d71f.tar.zst
Move analytics out of critical path (#2117)
* Remove analytics provider, simplify hook

* Fix wrong import being used by feed

* Remove early bind

* Create client lazy on first use
Diffstat (limited to 'src/lib/analytics/types.ts')
-rw-r--r--src/lib/analytics/types.ts6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/lib/analytics/types.ts b/src/lib/analytics/types.ts
index d677f3217..9883cc36e 100644
--- a/src/lib/analytics/types.ts
+++ b/src/lib/analytics/types.ts
@@ -7,6 +7,7 @@ export type ScreenEvent = (
   name: keyof ScreenPropertiesMap,
   properties?: ScreenPropertiesMap[keyof ScreenPropertiesMap],
 ) => Promise<void>
+
 interface TrackPropertiesMap {
   // LOGIN / SIGN UP events
   'Sign In': {resumedSession: boolean} // CAN BE SERVER
@@ -150,3 +151,8 @@ interface ScreenPropertiesMap {
   MutedAccounts: {}
   SavedFeeds: {}
 }
+
+export type AnalyticsMethods = {
+  screen: ScreenEvent
+  track: TrackEvent
+}