From f46da5a73c07344c8a8b90bd50a82e9c6dbcfd8a Mon Sep 17 00:00:00 2001 From: LEE YOU BIN Date: Wed, 23 Oct 2024 05:07:58 +0900 Subject: [PATCH] [FEAT/#294] search quest scrap amplitude --- .../feature/search/searchprocess/SearchProcessRoute.kt | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/feature/src/main/java/com/terning/feature/search/searchprocess/SearchProcessRoute.kt b/feature/src/main/java/com/terning/feature/search/searchprocess/SearchProcessRoute.kt index 47cec953..2f87b1f0 100644 --- a/feature/src/main/java/com/terning/feature/search/searchprocess/SearchProcessRoute.kt +++ b/feature/src/main/java/com/terning/feature/search/searchprocess/SearchProcessRoute.kt @@ -33,6 +33,8 @@ import androidx.lifecycle.compose.LocalLifecycleOwner import androidx.lifecycle.compose.collectAsStateWithLifecycle import androidx.lifecycle.flowWithLifecycle import androidx.navigation.NavHostController +import com.terning.core.analytics.EventType +import com.terning.core.analytics.LocalTracker import com.terning.core.designsystem.component.bottomsheet.SortingBottomSheet import com.terning.core.designsystem.component.button.SortingButton import com.terning.core.designsystem.component.item.InternItemWithShadow @@ -168,6 +170,8 @@ fun SearchProcessScreen( val focusManager = LocalFocusManager.current val currentSortBy = remember { mutableIntStateOf(state.currentSortBy) } + val amplitudeTracker = LocalTracker.current + LaunchedEffect(Unit) { focusRequester.requestFocus() } @@ -267,7 +271,10 @@ fun SearchProcessScreen( intern = internSearchResultData[index], navigateToIntern = navigateToIntern, onScrapButtonClicked = { - + amplitudeTracker.track( + type = EventType.CLICK, + name = "quest_scrap" + ) with(internSearchResultData[index]) { onScrapButtonClicked(this) }