diff --git a/app/src/main/java/com/el/yello/presentation/onboarding/OnBoardingViewModel.kt b/app/src/main/java/com/el/yello/presentation/onboarding/OnBoardingViewModel.kt index 95317c17..5b84f121 100644 --- a/app/src/main/java/com/el/yello/presentation/onboarding/OnBoardingViewModel.kt +++ b/app/src/main/java/com/el/yello/presentation/onboarding/OnBoardingViewModel.kt @@ -391,6 +391,12 @@ class OnBoardingViewModel @Inject constructor( } AmplitudeManager.updateUserProperties(PROPERTY_USER_SEX, gender) AmplitudeManager.updateUserProperties(PROPERTY_USER_NAME, nameText.value.toString()) + + when { + highSchool.contains("중학교") -> AmplitudeManager.updateUserProperties(EVENT_STUDENT_TYPE, VALUE_MIDDLE_SCHOOL,) + highSchool.contains("고등학교") -> AmplitudeManager.updateUserProperties(EVENT_STUDENT_TYPE, VALUE_HIGH_SCHOOL,) + else -> AmplitudeManager.updateUserProperties(EVENT_STUDENT_TYPE, VALUE_UNIVERSITY) + } } companion object { @@ -398,5 +404,9 @@ class OnBoardingViewModel @Inject constructor( private const val REGEX_NAME_PATTERN = "^([가-힣]*)\$" private const val PROPERTY_USER_SEX = "user_sex" private const val PROPERTY_USER_NAME = "user_name" + private const val EVENT_STUDENT_TYPE = "user_student_type" + private const val VALUE_UNIVERSITY = "university" + private const val VALUE_MIDDLE_SCHOOL = "middleschool" + private const val VALUE_HIGH_SCHOOL = "highschool" } } diff --git a/app/src/main/java/com/el/yello/presentation/onboarding/fragment/studenttype/SelectStudentFragment.kt b/app/src/main/java/com/el/yello/presentation/onboarding/fragment/studenttype/SelectStudentFragment.kt index f0b7581c..d1f4a804 100644 --- a/app/src/main/java/com/el/yello/presentation/onboarding/fragment/studenttype/SelectStudentFragment.kt +++ b/app/src/main/java/com/el/yello/presentation/onboarding/fragment/studenttype/SelectStudentFragment.kt @@ -58,7 +58,6 @@ class SelectStudentFragment : binding.btnSelectTypeNext.setOnSingleClickListener { findNavController().navigate(R.id.action_selectStudentFragment_to_universityInfoFragment) amplitudeSelectStudent() - AmplitudeManager.updateUserProperties(EVENT_STUDENT_TYPE, VALUE_UNIVERSITY) val activity = requireActivity() as OnBoardingActivity activity.progressBarPlus() }