Updated on 2026-08-14

This commit is contained in:
Tangem 2026-05-14 13:45:16 +05:00
parent 556fe97fe4
commit a2480ff021
3 changed files with 15 additions and 2 deletions

View file

@ -297,6 +297,7 @@ sealed class AnalyticsParam {
const val REFERRAL_ID = "Referral_ID" const val REFERRAL_ID = "Referral_ID"
const val SEARCHED = "Searched" const val SEARCHED = "Searched"
const val RATE_TYPE = "Rate Type" const val RATE_TYPE = "Rate Type"
const val SCREEN_TYPE = "Screen Type"
} }
} }

View file

@ -15,20 +15,27 @@ sealed class IntroductionProcess(
class ButtonScanCardLegacy : IntroductionProcess("Button - Scan Card") class ButtonScanCardLegacy : IntroductionProcess("Button - Scan Card")
class CreateWalletIntroScreenOpened( class CreateWalletIntroScreenOpened(
screenType: ScreenType,
referralId: String?, referralId: String?,
) : IntroductionProcess( ) : IntroductionProcess(
event = "Create Wallet Intro Screen Opened", event = "Create Wallet Intro Screen Opened",
params = buildMap { params = buildMap {
put(AnalyticsParam.SCREEN_TYPE, screenType.value)
putAll(getReferralParams(referralId)) putAll(getReferralParams(referralId))
}, },
) ) {
enum class ScreenType(val value: String) {
Cold("Cold Wallet"),
Hot("Mobile Wallet"),
}
}
class ButtonScanCard( class ButtonScanCard(
val source: AnalyticsParam.ScreensSources, val source: AnalyticsParam.ScreensSources,
) : IntroductionProcess( ) : IntroductionProcess(
event = "Button - Scan Card", event = "Button - Scan Card",
params = mapOf( params = mapOf(
AnalyticsParam.Key.SOURCE to source.value, AnalyticsParam.SOURCE to source.value,
), ),
) )
} }

View file

@ -23,6 +23,7 @@ import com.tangem.core.ui.message.dialog.Dialogs.hotWalletCreationNotSupportedDi
import com.tangem.datasource.local.appsflyer.AppsFlyerStore import com.tangem.datasource.local.appsflyer.AppsFlyerStore
import com.tangem.domain.card.ScanCardProcessor import com.tangem.domain.card.ScanCardProcessor
import com.tangem.domain.card.analytics.IntroductionProcess import com.tangem.domain.card.analytics.IntroductionProcess
import com.tangem.domain.card.analytics.IntroductionProcess.CreateWalletIntroScreenOpened.ScreenType
import com.tangem.domain.card.repository.CardSdkConfigRepository import com.tangem.domain.card.repository.CardSdkConfigRepository
import com.tangem.domain.common.wallets.UserWalletsListRepository import com.tangem.domain.common.wallets.UserWalletsListRepository
import com.tangem.domain.common.wallets.error.SaveWalletError import com.tangem.domain.common.wallets.error.SaveWalletError
@ -137,6 +138,10 @@ internal class CreateWalletStartModel @Inject constructor(
modelScope.launch { modelScope.launch {
analyticsEventHandler.send( analyticsEventHandler.send(
event = IntroductionProcess.CreateWalletIntroScreenOpened( event = IntroductionProcess.CreateWalletIntroScreenOpened(
screenType = when (params.mode) {
CreateWalletStartComponent.Mode.ColdWallet -> ScreenType.Cold
CreateWalletStartComponent.Mode.HotWallet -> ScreenType.Hot
},
referralId = appsFlyerStore.get()?.refcode, referralId = appsFlyerStore.get()?.refcode,
), ),
) )