From a8bbaa06c7266c73f6a71b5e9223c11c96995947 Mon Sep 17 00:00:00 2001
From: Ansh <anshnanda10@gmail.com>
Date: Tue, 27 Jun 2023 08:11:05 -0700
Subject: [APP-705] Metrics revamp pt2 (#896)

* export track function from analytics.tsx

* fix create account tracking

* fix tracking sign in

* add custom feed events

* fix type errors

* refactor create post event

* add profile follow & unfollow events

* refactor PostsFeedSliceModel into its own file

* refactor PostThreadItemModel into its own file

* reorganize code a lil bit

* refactor post-thread-item to use post-feed-item model under the hood

* add post events

* add post reply tracking

* track custom feed load more

* track list subscribe and unsubscribe
---
 src/lib/analytics/analytics.tsx | 2 ++
 1 file changed, 2 insertions(+)

(limited to 'src/lib/analytics/analytics.tsx')

diff --git a/src/lib/analytics/analytics.tsx b/src/lib/analytics/analytics.tsx
index d9d53e6a9..ab04bb88f 100644
--- a/src/lib/analytics/analytics.tsx
+++ b/src/lib/analytics/analytics.tsx
@@ -16,6 +16,8 @@ const segmentClient = createClient({
   trackAppLifecycleEvents: false,
 })
 
+export const track = segmentClient?.track?.bind?.(segmentClient) as TrackEvent
+
 export function useAnalytics() {
   const store = useStores()
   const methods: ClientMethods = useAnalyticsOrig()
-- 
cgit 1.4.1

