From c16f1b4925900abcd7675a70b83980827d24fa22 Mon Sep 17 00:00:00 2001 From: kxxhyorim Date: Tue, 14 Nov 2023 03:51:10 +0900 Subject: [PATCH] =?UTF-8?q?[FEAT]=20TermsFragment=20-=20=EC=9D=B4=EC=9A=A9?= =?UTF-8?q?=EC=95=BD=EA=B4=80,=20=EA=B0=9C=EC=9D=B8=EC=A0=95=EB=B3=B4=20?= =?UTF-8?q?=EC=B2=98=EB=A6=AC=EB=B0=A9=EC=B9=A8=20=ED=81=B4=EB=A6=AD=20?= =?UTF-8?q?=EB=A1=9C=EA=B9=85=20(#156)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../auth/ui/signup/common/TermsFragment.kt | 38 +++++++++++++++++-- 1 file changed, 34 insertions(+), 4 deletions(-) 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" } }