Skip to content

Commit

Permalink
[FEAT] NickNameFragment ExposureLogging (#156)
Browse files Browse the repository at this point in the history
  • Loading branch information
KxxHyoRim committed Nov 13, 2023
1 parent c16f1b4 commit ae0f138
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class SwmCommonLoggingScheme(
private lateinit var eventLogName: String
private lateinit var screenName: String
private var logVersion: String = "1"
private var map = mutableMapOf<String, Any>()
private var map = mapOf<String, Any>()

fun setEventLogName(eventLogName: String): Builder {
this.eventLogName = eventLogName
Expand All @@ -43,7 +43,7 @@ class SwmCommonLoggingScheme(


fun setLogData(map: Map<String, Any>): Builder {
this.map = map.toMutableMap()
this.map = map
return this
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import com.lgtm.android.auth.R
import com.lgtm.android.auth.databinding.ActivitySignUpBinding
import com.lgtm.android.auth.ui.SignInActivity.Companion.MEMBER_DATA
import com.lgtm.android.common_ui.base.BaseActivity
import com.lgtm.domain.logging.SwmCommonLoggingScheme
import dagger.hilt.android.AndroidEntryPoint

@AndroidEntryPoint
Expand All @@ -15,7 +14,6 @@ class SignUpActivity : BaseActivity<ActivitySignUpBinding>(R.layout.activity_sig
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
getExtraData()
shotSignUpExposureLogging()
}

override fun initializeViewModel() {
Expand All @@ -26,12 +24,4 @@ class SignUpActivity : BaseActivity<ActivitySignUpBinding>(R.layout.activity_sig
val memberDataJson = intent.getStringExtra(MEMBER_DATA) ?: return
signUpViewModel.parseAndSetMemberDataJson(memberDataJson)
}

private fun shotSignUpExposureLogging() {
val scheme = SwmCommonLoggingScheme.Builder()
.setEventLogName("signUpExposure")
.setScreenName(this.javaClass)
.build()
viewModel?.shotSwmLogging(scheme)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import com.lgtm.android.auth.databinding.FragmentNicknameBinding
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


Expand All @@ -24,6 +25,16 @@ class NicknameFragment : BaseFragment<FragmentNicknameBinding>(R.layout.fragment
setupEditText()
onNicknameChanged()
setupNextButtonListener()
shotNickNameExposureLogging()
}

private fun shotNickNameExposureLogging() {
val scheme = SwmCommonLoggingScheme.Builder()
.setEventLogName("nicknameExposure")
.setScreenName(this.javaClass)
.setLogData(mapOf("signUpStep" to 2))
.build()
viewModel.shotSwmLogging(scheme)
}

private fun setupViewModel() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,15 +58,15 @@ class TermsFragment : BaseFragment<FragmentTermsBinding>(R.layout.fragment_terms

private fun shotTermsServiceClickLogging() {
val scheme = SwmCommonLoggingScheme.Builder()
.setEventLogName("TermsServiceClick")
.setEventLogName("termsServiceClick")
.setScreenName(this.javaClass)
.build()
viewModel.shotSwmLogging(scheme)
}

private fun shotTermsPrivacyClickLogging() {
val scheme = SwmCommonLoggingScheme.Builder()
.setEventLogName("TermsPrivacyClick")
.setEventLogName("termsPrivacyClick")
.setScreenName(this.javaClass)
.build()
viewModel.shotSwmLogging(scheme)
Expand Down Expand Up @@ -131,7 +131,7 @@ class TermsFragment : BaseFragment<FragmentTermsBinding>(R.layout.fragment_terms

private fun shotTermsExposureLogging() {
val scheme = SwmCommonLoggingScheme.Builder()
.setEventLogName("TermsExposure")
.setEventLogName("termsExposure")
.setScreenName(this.javaClass)
.setLogData(mapOf("signUpStep" to 1))
.build()
Expand Down

0 comments on commit ae0f138

Please sign in to comment.