Updated on 2026-08-14
This commit is contained in:
parent
b4e9c23f6d
commit
4fb12ce1ff
23 changed files with 415 additions and 84 deletions
|
|
@ -14,6 +14,7 @@ import com.tangem.tap.common.extensions.setContext
|
|||
import com.tangem.tap.common.extensions.setHotWalletContext
|
||||
import com.tangem.common.extensions.calculateSha256
|
||||
import com.tangem.common.extensions.toHexString
|
||||
import com.tangem.core.analytics.models.AnalyticsParam
|
||||
import com.tangem.domain.models.wallet.UserWalletId
|
||||
|
||||
/**
|
||||
|
|
@ -91,7 +92,7 @@ internal class DefaultTrackingContextProxy(private val abTestsManager: ABTestsMa
|
|||
abTestsManager.setUserProperties(
|
||||
userId = calculateUserIdHash(userWallet.walletId),
|
||||
batch = null,
|
||||
productType = "Mobile Wallet",
|
||||
productType = AnalyticsParam.ProductType.MobileWallet.value,
|
||||
firmware = null,
|
||||
)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,13 +2,13 @@ package com.tangem.tap.common.analytics.paramsInterceptor
|
|||
|
||||
import com.tangem.core.analytics.api.ParamsInterceptor
|
||||
import com.tangem.core.analytics.models.AnalyticsEvent
|
||||
import com.tangem.core.analytics.models.AnalyticsParam
|
||||
import com.tangem.domain.card.analytics.IntroductionProcess
|
||||
import com.tangem.domain.card.analytics.ParamCardCurrencyConverter
|
||||
import com.tangem.domain.card.common.util.cardTypesResolver
|
||||
import com.tangem.domain.models.scan.ProductType
|
||||
import com.tangem.domain.models.scan.ScanResponse
|
||||
import com.tangem.domain.wallets.builder.UserWalletIdBuilder
|
||||
import com.tangem.tap.common.analytics.events.AnalyticsParam
|
||||
import com.tangem.tap.common.extensions.inject
|
||||
import com.tangem.tap.features.demo.DemoHelper
|
||||
import com.tangem.tap.proxy.redux.DaggerGraphState
|
||||
|
|
@ -50,17 +50,17 @@ class CardContextInterceptor(
|
|||
if (scanResponse.productType != ProductType.Ring && userWalletId != null) {
|
||||
val isWalletWithRing = runBlocking { walletsRepository.isWalletWithRing(userWalletId) }
|
||||
|
||||
if (isWalletWithRing) return "Ring"
|
||||
if (isWalletWithRing) return AnalyticsParam.ProductType.Ring.value
|
||||
}
|
||||
|
||||
return when (scanResponse.productType) {
|
||||
ProductType.Note -> "Note"
|
||||
ProductType.Twins -> "Twin"
|
||||
ProductType.Wallet -> "Wallet"
|
||||
ProductType.Wallet2 -> "Wallet 2.0"
|
||||
ProductType.Ring -> "Ring"
|
||||
ProductType.Start2Coin -> "Start2Coin"
|
||||
ProductType.Visa -> "VISA"
|
||||
ProductType.Note -> AnalyticsParam.ProductType.Note.value
|
||||
ProductType.Twins -> AnalyticsParam.ProductType.Twins.value
|
||||
ProductType.Wallet -> AnalyticsParam.ProductType.Wallet.value
|
||||
ProductType.Wallet2 -> AnalyticsParam.ProductType.Wallet2.value
|
||||
ProductType.Ring -> AnalyticsParam.ProductType.Ring.value
|
||||
ProductType.Start2Coin -> AnalyticsParam.ProductType.Start2Coin.value
|
||||
ProductType.Visa -> AnalyticsParam.ProductType.Visa.value
|
||||
else -> if (DemoHelper.isDemoCard(scanResponse)) getDemoCardProductType() else "Other"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ class HotWalletContextInterceptor(
|
|||
override fun canBeAppliedTo(event: AnalyticsEvent): Boolean = true
|
||||
|
||||
override fun intercept(params: MutableMap<String, String>) {
|
||||
params[AnalyticsParam.PRODUCT_TYPE] = "Mobile Wallet"
|
||||
params[AnalyticsParam.PRODUCT_TYPE] = AnalyticsParam.ProductType.MobileWallet.value
|
||||
}
|
||||
|
||||
companion object {
|
||||
|
|
|
|||
|
|
@ -563,6 +563,8 @@ internal class ChildFactory @Inject constructor(
|
|||
userWalletId = route.userWalletId,
|
||||
isUpgradeFlow = route.isUpgradeFlow,
|
||||
shouldSetAccessCode = route.setAccessCode,
|
||||
analyticsSource = route.analyticsSource,
|
||||
analyticsAction = route.analyticsAction,
|
||||
),
|
||||
componentFactory = createWalletBackupComponentFactory,
|
||||
)
|
||||
|
|
@ -572,6 +574,7 @@ internal class ChildFactory @Inject constructor(
|
|||
context = context,
|
||||
params = UpdateAccessCodeComponent.Params(
|
||||
userWalletId = route.userWalletId,
|
||||
source = route.source,
|
||||
),
|
||||
componentFactory = updateAccessCodeComponentFactory,
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue