Skip to content

Commit

Permalink
[FEAT/#294] search quest search amplitude
Browse files Browse the repository at this point in the history
  • Loading branch information
leeeyubin committed Oct 22, 2024
1 parent f46da5a commit 10f0f1f
Showing 1 changed file with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ import androidx.hilt.navigation.compose.hiltViewModel
import androidx.lifecycle.compose.LocalLifecycleOwner
import androidx.lifecycle.compose.collectAsStateWithLifecycle
import androidx.lifecycle.flowWithLifecycle
import com.terning.core.analytics.EventType
import com.terning.core.analytics.LocalTracker
import com.terning.core.designsystem.component.image.TerningImage
import com.terning.core.designsystem.component.textfield.SearchTextField
import com.terning.core.designsystem.theme.Black
Expand Down Expand Up @@ -52,6 +54,8 @@ fun SearchRoute(
val viewState by viewModel.viewState.collectAsStateWithLifecycle(lifecycleOwner = lifecycleOwner)
val scrapState by viewModel.scrapState.collectAsStateWithLifecycle(lifecycleOwner = lifecycleOwner)

val amplitudeTracker = LocalTracker.current

LaunchedEffect(key1 = true) {
viewModel.getSearchViews()
viewModel.getSearchScraps()
Expand Down Expand Up @@ -82,7 +86,13 @@ fun SearchRoute(
modifier = modifier,
searchViewsList = searchViewsList,
searchScrapsList = searchScrapsList,
navigateToSearchProcess = navigateToSearchProcess,
navigateToSearchProcess = {
amplitudeTracker.track(
type = EventType.CLICK,
name = "quest_search"
)
navigateToSearchProcess()
},
navigateToIntern = navigateToIntern,
onAdvertisementClick = {
CustomTabsIntent.Builder().build().launchUrl(context, ADVERTISEMENT_URL.toUri())
Expand Down

0 comments on commit 10f0f1f

Please sign in to comment.