diff --git a/feature/auth/src/main/java/com/lgtm/android/auth/ui/signup/common/TermsFragment.kt b/feature/auth/src/main/java/com/lgtm/android/auth/ui/signup/common/TermsFragment.kt index 37a5ec71..a339441e 100644 --- a/feature/auth/src/main/java/com/lgtm/android/auth/ui/signup/common/TermsFragment.kt +++ b/feature/auth/src/main/java/com/lgtm/android/auth/ui/signup/common/TermsFragment.kt @@ -11,6 +11,7 @@ import com.lgtm.android.auth.databinding.FragmentTermsBinding import com.lgtm.android.auth.ui.signup.SignUpViewModel import com.lgtm.android.common_ui.base.BaseFragment import com.lgtm.android.common_ui.util.setOnThrottleClickListener +import com.lgtm.domain.logging.SwmCommonLoggingScheme import dagger.hilt.android.AndroidEntryPoint @AndroidEntryPoint @@ -25,6 +26,7 @@ class TermsFragment : BaseFragment(R.layout.fragment_terms setUpCheckBoxListeners() setUpTextViewListener() setupNextButtonListener() + shotTermsExposureLogging() } private fun setupNextButtonListener() { @@ -45,13 +47,31 @@ class TermsFragment : BaseFragment(R.layout.fragment_terms private fun setUpTextViewListener() { binding.tvTermsService.setOnThrottleClickListener { + shotTermsServiceClickLogging() openUrlInBrowser(TERMS_SERVICE_URL) } binding.tvTermsPrivacy.setOnThrottleClickListener { + shotTermsPrivacyClickLogging() openUrlInBrowser(TERMS_PRIVACY_URL) } } + private fun shotTermsServiceClickLogging() { + val scheme = SwmCommonLoggingScheme.Builder() + .setEventLogName("TermsServiceClick") + .setScreenName(this.javaClass) + .build() + viewModel.shotSwmLogging(scheme) + } + + private fun shotTermsPrivacyClickLogging() { + val scheme = SwmCommonLoggingScheme.Builder() + .setEventLogName("TermsPrivacyClick") + .setScreenName(this.javaClass) + .build() + viewModel.shotSwmLogging(scheme) + } + private fun openUrlInBrowser(url: String) { val intent = Intent(Intent.ACTION_VIEW).apply { data = Uri.parse(url) @@ -88,7 +108,7 @@ class TermsFragment : BaseFragment(R.layout.fragment_terms } } - private fun toggleTermsAll(){ + private fun toggleTermsAll() { binding.cbTermsAll.isChecked = !binding.cbTermsAll.isChecked } @@ -109,12 +129,22 @@ class TermsFragment : BaseFragment(R.layout.fragment_terms signUpViewModel.setIsAgreeWithTerms(isAgreeWithTerms) } + private fun shotTermsExposureLogging() { + val scheme = SwmCommonLoggingScheme.Builder() + .setEventLogName("TermsExposure") + .setScreenName(this.javaClass) + .setLogData(mapOf("signUpStep" to 1)) + .build() + viewModel.shotSwmLogging(scheme) + } + companion object { - // todo : url 수정 // 약관 및 정책 - const val TERMS_SERVICE_URL = "https://www.naver.com" + const val TERMS_SERVICE_URL = + "https://www.notion.so/team-hkcc/c4f56b4e6e1b46e89c494e5b3919ed8c?pvs=4" // 개인정보 처리 방침 - const val TERMS_PRIVACY_URL = "https://www.google.com" + const val TERMS_PRIVACY_URL = + "https://www.notion.so/team-hkcc/31a6b7a98d1f4d148bb05cc826d0c9aa?pvs=4" } }