Updated on 2026-08-14
This commit is contained in:
parent
9aecc175bf
commit
e01a65011b
26 changed files with 159 additions and 17 deletions
|
|
@ -18,22 +18,50 @@ sealed class CommonSendAnalyticEvents(
|
|||
/** Recipient address screen opened */
|
||||
data class AddressScreenOpened(
|
||||
val categoryName: String,
|
||||
) : CommonSendAnalyticEvents(category = categoryName, event = "Address Screen Opened")
|
||||
val source: CommonSendSource,
|
||||
) : CommonSendAnalyticEvents(
|
||||
category = categoryName,
|
||||
event = "Address Screen Opened",
|
||||
params = mapOf(
|
||||
SOURCE to source.analyticsName,
|
||||
),
|
||||
)
|
||||
|
||||
/** Amount screen opened */
|
||||
data class AmountScreenOpened(
|
||||
val categoryName: String,
|
||||
) : CommonSendAnalyticEvents(category = categoryName, event = "Amount Screen Opened")
|
||||
val source: CommonSendSource,
|
||||
) : CommonSendAnalyticEvents(
|
||||
category = categoryName,
|
||||
event = "Amount Screen Opened",
|
||||
params = mapOf(
|
||||
SOURCE to source.analyticsName,
|
||||
),
|
||||
)
|
||||
|
||||
/** Fee screen opened */
|
||||
data class FeeScreenOpened(
|
||||
val categoryName: String,
|
||||
) : CommonSendAnalyticEvents(category = categoryName, event = "Fee Screen Opened")
|
||||
val source: CommonSendSource,
|
||||
) : CommonSendAnalyticEvents(
|
||||
category = categoryName,
|
||||
event = "Fee Screen Opened",
|
||||
params = mapOf(
|
||||
SOURCE to source.analyticsName,
|
||||
),
|
||||
)
|
||||
|
||||
/** Confirmation screen opened */
|
||||
data class ConfirmationScreenOpened(
|
||||
val categoryName: String,
|
||||
) : CommonSendAnalyticEvents(category = categoryName, event = "Confirm Screen Opened")
|
||||
val source: CommonSendSource,
|
||||
) : CommonSendAnalyticEvents(
|
||||
category = categoryName,
|
||||
event = "Confirm Screen Opened",
|
||||
params = mapOf(
|
||||
SOURCE to source.analyticsName,
|
||||
),
|
||||
)
|
||||
|
||||
/** If transaction delays notification is present */
|
||||
data class NoticeTransactionDelays(
|
||||
|
|
@ -142,4 +170,11 @@ sealed class CommonSendAnalyticEvents(
|
|||
Fee,
|
||||
Confirm,
|
||||
}
|
||||
|
||||
enum class CommonSendSource(val analyticsName: String) {
|
||||
Send("Send"),
|
||||
SendWithSwap("Send&Swap"),
|
||||
WalletConnect("WalletConnect"),
|
||||
NFT("NFT"),
|
||||
}
|
||||
}
|
||||
|
|
@ -6,6 +6,7 @@ import com.tangem.blockchain.common.transaction.TransactionFee
|
|||
import com.tangem.core.ui.extensions.TextReference
|
||||
import com.tangem.domain.models.currency.CryptoCurrencyStatus
|
||||
import com.tangem.domain.transaction.error.GetFeeError
|
||||
import com.tangem.features.send.v2.api.analytics.CommonSendAnalyticEvents
|
||||
import com.tangem.features.send.v2.api.callbacks.FeeSelectorModelCallback
|
||||
import com.tangem.features.send.v2.api.entity.FeeSelectorUM
|
||||
|
||||
|
|
@ -17,6 +18,7 @@ sealed class FeeSelectorParams {
|
|||
abstract val feeStateConfiguration: FeeStateConfiguration
|
||||
abstract val feeDisplaySource: FeeDisplaySource
|
||||
abstract val analyticsCategoryName: String
|
||||
abstract val analyticsSendSource: CommonSendAnalyticEvents.CommonSendSource
|
||||
|
||||
data class FeeSelectorBlockParams(
|
||||
override val state: FeeSelectorUM,
|
||||
|
|
@ -26,6 +28,7 @@ sealed class FeeSelectorParams {
|
|||
override val feeStateConfiguration: FeeStateConfiguration,
|
||||
override val feeDisplaySource: FeeDisplaySource,
|
||||
override val analyticsCategoryName: String,
|
||||
override val analyticsSendSource: CommonSendAnalyticEvents.CommonSendSource,
|
||||
) : FeeSelectorParams()
|
||||
|
||||
data class FeeSelectorDetailsParams(
|
||||
|
|
@ -36,6 +39,7 @@ sealed class FeeSelectorParams {
|
|||
override val feeStateConfiguration: FeeStateConfiguration,
|
||||
override val feeDisplaySource: FeeDisplaySource,
|
||||
override val analyticsCategoryName: String,
|
||||
override val analyticsSendSource: CommonSendAnalyticEvents.CommonSendSource,
|
||||
val callback: FeeSelectorModelCallback,
|
||||
) : FeeSelectorParams()
|
||||
|
||||
|
|
|
|||
|
|
@ -2,8 +2,10 @@ package com.tangem.features.send.v2.api.subcomponents.amount.analytics
|
|||
|
||||
import com.tangem.core.analytics.models.AnalyticsEvent
|
||||
import com.tangem.core.analytics.models.AnalyticsParam.Key.BLOCKCHAIN
|
||||
import com.tangem.core.analytics.models.AnalyticsParam.Key.SOURCE
|
||||
import com.tangem.core.analytics.models.AnalyticsParam.Key.TOKEN_PARAM
|
||||
import com.tangem.core.analytics.models.AnalyticsParam.Key.TYPE
|
||||
import com.tangem.features.send.v2.api.analytics.CommonSendAnalyticEvents
|
||||
|
||||
sealed class CommonSendAmountAnalyticEvents(
|
||||
category: String,
|
||||
|
|
@ -26,12 +28,14 @@ sealed class CommonSendAmountAnalyticEvents(
|
|||
val categoryName: String,
|
||||
val token: String,
|
||||
val blockchain: String,
|
||||
val source: CommonSendAnalyticEvents.CommonSendSource,
|
||||
) : CommonSendAmountAnalyticEvents(
|
||||
category = categoryName,
|
||||
event = "Max Amount Taped",
|
||||
params = mapOf(
|
||||
TOKEN_PARAM to token,
|
||||
BLOCKCHAIN to blockchain,
|
||||
SOURCE to source.analyticsName,
|
||||
),
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ package com.tangem.features.send.v2.api.subcomponents.destination
|
|||
import com.tangem.core.ui.extensions.TextReference
|
||||
import com.tangem.domain.models.currency.CryptoCurrency
|
||||
import com.tangem.domain.models.wallet.UserWalletId
|
||||
import com.tangem.features.send.v2.api.analytics.CommonSendAnalyticEvents
|
||||
import com.tangem.features.send.v2.api.entity.PredefinedValues
|
||||
import com.tangem.features.send.v2.api.subcomponents.destination.entity.DestinationUM
|
||||
import kotlinx.coroutines.flow.Flow
|
||||
|
|
@ -12,12 +13,14 @@ sealed class SendDestinationComponentParams {
|
|||
|
||||
abstract val state: DestinationUM
|
||||
abstract val analyticsCategoryName: String
|
||||
abstract val analyticsSendSource: CommonSendAnalyticEvents.CommonSendSource
|
||||
abstract val userWalletId: UserWalletId
|
||||
abstract val cryptoCurrency: CryptoCurrency
|
||||
|
||||
data class DestinationParams(
|
||||
override val state: DestinationUM,
|
||||
override val analyticsCategoryName: String,
|
||||
override val analyticsSendSource: CommonSendAnalyticEvents.CommonSendSource,
|
||||
override val cryptoCurrency: CryptoCurrency,
|
||||
override val userWalletId: UserWalletId,
|
||||
val title: TextReference,
|
||||
|
|
@ -29,6 +32,7 @@ sealed class SendDestinationComponentParams {
|
|||
data class DestinationBlockParams(
|
||||
override val state: DestinationUM,
|
||||
override val analyticsCategoryName: String,
|
||||
override val analyticsSendSource: CommonSendAnalyticEvents.CommonSendSource,
|
||||
override val userWalletId: UserWalletId,
|
||||
override val cryptoCurrency: CryptoCurrency,
|
||||
val blockClickEnableFlow: StateFlow<Boolean>,
|
||||
|
|
|
|||
|
|
@ -2,6 +2,9 @@ package com.tangem.features.send.v2.api.subcomponents.feeSelector.analytics
|
|||
|
||||
import com.tangem.core.analytics.models.AnalyticsEvent
|
||||
import com.tangem.core.analytics.models.AnalyticsParam
|
||||
import com.tangem.core.analytics.models.AnalyticsParam.Key.FEE_TYPE
|
||||
import com.tangem.core.analytics.models.AnalyticsParam.Key.SOURCE
|
||||
import com.tangem.features.send.v2.api.analytics.CommonSendAnalyticEvents.CommonSendSource
|
||||
|
||||
sealed class CommonSendFeeAnalyticEvents(
|
||||
category: String,
|
||||
|
|
@ -15,10 +18,14 @@ sealed class CommonSendFeeAnalyticEvents(
|
|||
data class SelectedFee(
|
||||
override val categoryName: String,
|
||||
val feeType: AnalyticsParam.FeeType,
|
||||
val source: CommonSendSource,
|
||||
) : CommonSendFeeAnalyticEvents(
|
||||
category = categoryName,
|
||||
event = "Fee Selected",
|
||||
params = mapOf("Fee Type" to feeType.value),
|
||||
params = mapOf(
|
||||
FEE_TYPE to feeType.value,
|
||||
SOURCE to source.analyticsName,
|
||||
),
|
||||
)
|
||||
|
||||
/** Custom fee selected */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue