File tree Expand file tree Collapse file tree
Projects/App/Sources/MainTab Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -24,6 +24,9 @@ public struct MainTabFeature {
2424 private var categoryClient
2525 @Dependency ( UserDefaultsClient . self)
2626 private var userDefaults
27+ @Dependency ( \. amplitude)
28+ private var amplitude
29+
2730 /// - State
2831 @ObservableState
2932 public struct State : Equatable {
@@ -103,6 +106,14 @@ public struct MainTabFeature {
103106 guard state. linkPopup == nil else { return . none }
104107 state. categoryOfSavedContent = nil
105108 return . none
109+ case . binding( \. selectedTab) :
110+ switch state. selectedTab {
111+ case . pokit:
112+ amplitude. track ( . view_home_pokit( entryPoint: " pokit " ) )
113+ case . recommend:
114+ amplitude. track ( . view_home_recommend( entryPoint: " recommend " ) )
115+ }
116+ return . none
106117 case . binding:
107118 return . none
108119 case let . pushAlertTapped( isTapped) :
@@ -197,6 +208,13 @@ private extension MainTabFeature {
197208 let categoryIdString = queryItems. first ( where: { $0. name == " categoryId " } ) ? . value,
198209 let categoryId = Int ( categoryIdString)
199210 else { return . none }
211+
212+ switch state. selectedTab {
213+ case . pokit:
214+ amplitude. track ( . view_home_pokit( entryPoint: " deeplink " ) )
215+ case . recommend:
216+ amplitude. track ( . view_home_recommend( entryPoint: " deeplink " ) )
217+ }
200218
201219 return . send( . async( . 공유받은_카테고리_조회( categoryId: categoryId) ) )
202220 case . 경고_확인버튼_클릭:
You can’t perform that action at this time.
0 commit comments