avoiding tracking the use case until account creation, also means we no longer need to reset the tracking value

This commit is contained in:
Adam Brown 2022-02-03 09:59:40 +00:00
parent 48b339075b
commit 227c93b014

View file

@ -465,13 +465,11 @@ class OnboardingViewModel @AssistedInject constructor(
private fun handleUpdateUseCase(action: OnboardingAction.UpdateUseCase) { private fun handleUpdateUseCase(action: OnboardingAction.UpdateUseCase) {
setState { copy(useCase = action.useCase) } setState { copy(useCase = action.useCase) }
analyticsTracker.updateUserProperties(Identity(ftueUseCaseSelection = action.useCase.toTrackingValue()))
_viewEvents.post(OnboardingViewEvents.OpenServerSelection) _viewEvents.post(OnboardingViewEvents.OpenServerSelection)
} }
private fun resetUseCase() { private fun resetUseCase() {
setState { copy(useCase = null) } setState { copy(useCase = null) }
analyticsTracker.updateUserProperties(Identity(ftueUseCaseSelection = null))
} }
private fun handleUpdateServerType(action: OnboardingAction.UpdateServerType) { private fun handleUpdateServerType(action: OnboardingAction.UpdateServerType) {
@ -754,6 +752,7 @@ class OnboardingViewModel @AssistedInject constructor(
private suspend fun onSessionCreated(session: Session) { private suspend fun onSessionCreated(session: Session) {
awaitState().useCase?.let { useCase -> awaitState().useCase?.let { useCase ->
session.vectorStore(applicationContext).setUseCase(useCase) session.vectorStore(applicationContext).setUseCase(useCase)
analyticsTracker.updateUserProperties(Identity(ftueUseCaseSelection = useCase.toTrackingValue()))
} }
activeSessionHolder.setActiveSession(session) activeSessionHolder.setActiveSession(session)