mirror of
https://github.com/ProtonMail/protoncore_android.git
synced 2026-05-15 09:50:41 +00:00
fix(auth, human-verification): Use proper measurement group for product metrics.
This commit is contained in:
+1
-1
@@ -42,7 +42,7 @@ import javax.inject.Inject
|
||||
|
||||
@AndroidEntryPoint
|
||||
@ProductMetrics(
|
||||
group = "account.android.signup",
|
||||
group = "account.any.signup",
|
||||
flow = "mobile_signup_full"
|
||||
)
|
||||
@ScreenDisplayed(event = "fe.add_account.displayed")
|
||||
|
||||
+3
-3
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* Copyright (c) 2021 Proton Technologies AG
|
||||
* This file is part of Proton Technologies AG and ProtonCore.
|
||||
* Copyright (c) 2023 Proton AG
|
||||
* This file is part of Proton AG and ProtonCore.
|
||||
*
|
||||
* ProtonCore is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -54,7 +54,7 @@ import me.proton.core.util.kotlin.exhaustive
|
||||
|
||||
@AndroidEntryPoint
|
||||
@ProductMetrics(
|
||||
group = "account.android.signup",
|
||||
group = "account.any.signup",
|
||||
flow = "mobile_signup_full"
|
||||
)
|
||||
@ViewClicked(
|
||||
|
||||
+1
-1
@@ -57,7 +57,7 @@ import me.proton.core.util.kotlin.exhaustive
|
||||
|
||||
@AndroidEntryPoint
|
||||
@ProductMetrics(
|
||||
group = "account.android.signup",
|
||||
group = "account.any.signup",
|
||||
flow = "mobile_signup_full"
|
||||
)
|
||||
@ViewClicked(
|
||||
|
||||
+3
-3
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* Copyright (c) 2021 Proton Technologies AG
|
||||
* This file is part of Proton Technologies AG and ProtonCore.
|
||||
* Copyright (c) 2023 Proton AG
|
||||
* This file is part of Proton AG and ProtonCore.
|
||||
*
|
||||
* ProtonCore is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -43,7 +43,7 @@ import me.proton.core.telemetry.presentation.annotation.ViewFocused
|
||||
|
||||
@AndroidEntryPoint
|
||||
@ProductMetrics(
|
||||
group = "account.android.signup",
|
||||
group = "account.any.signup",
|
||||
flow = "mobile_signup_full"
|
||||
)
|
||||
@ScreenDisplayed(event = "fe.signup_password.displayed")
|
||||
|
||||
+3
-3
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* Copyright (c) 2021 Proton Technologies AG
|
||||
* This file is part of Proton Technologies AG and ProtonCore.
|
||||
* Copyright (c) 2023 Proton AG
|
||||
* This file is part of Proton AG and ProtonCore.
|
||||
*
|
||||
* ProtonCore is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -25,7 +25,7 @@ import me.proton.core.telemetry.presentation.annotation.ProductMetrics
|
||||
import me.proton.core.telemetry.presentation.annotation.ScreenDisplayed
|
||||
|
||||
@ProductMetrics(
|
||||
group = "account.android.signup",
|
||||
group = "account.any.signup",
|
||||
flow = "mobile_signup_full"
|
||||
)
|
||||
@ScreenDisplayed(
|
||||
|
||||
+1
-1
@@ -34,7 +34,7 @@ import me.proton.core.presentation.utils.viewBinding
|
||||
import me.proton.core.telemetry.presentation.annotation.ProductMetrics
|
||||
import me.proton.core.telemetry.presentation.annotation.ViewFocused
|
||||
|
||||
@ProductMetrics(group = "account.android.signup", flow = "mobile_signup_full")
|
||||
@ProductMetrics(group = "account.any.signup", flow = "mobile_signup_full")
|
||||
@ViewFocused(
|
||||
"user.recovery_method.focused",
|
||||
viewIds = ["email"]
|
||||
|
||||
+1
-1
@@ -53,7 +53,7 @@ import me.proton.core.telemetry.presentation.annotation.ScreenDisplayed
|
||||
import me.proton.core.telemetry.presentation.annotation.ViewClicked
|
||||
import me.proton.core.util.kotlin.exhaustive
|
||||
|
||||
@ProductMetrics(group = "account.android.signup", flow = "mobile_signup_full")
|
||||
@ProductMetrics(group = "account.any.signup", flow = "mobile_signup_full")
|
||||
@ScreenDisplayed("fe.recovery_method.displayed")
|
||||
@ScreenClosed("user.recovery_method.closed")
|
||||
@ViewClicked(
|
||||
|
||||
+1
-1
@@ -41,7 +41,7 @@ import me.proton.core.telemetry.presentation.annotation.ProductMetrics
|
||||
import me.proton.core.telemetry.presentation.annotation.ViewClicked
|
||||
import me.proton.core.telemetry.presentation.annotation.ViewFocused
|
||||
|
||||
@ProductMetrics(group = "account.android.signup", flow = "mobile_signup_full")
|
||||
@ProductMetrics(group = "account.any.signup", flow = "mobile_signup_full")
|
||||
@ViewClicked(
|
||||
"user.recovery_method.clicked",
|
||||
viewIds = ["phone_country"]
|
||||
|
||||
+1
-1
@@ -70,7 +70,7 @@ internal class LoginViewModel @Inject constructor(
|
||||
override val telemetryManager: TelemetryManager
|
||||
) : ViewModel(), ProductMetricsDelegateAuth, ObservabilityContext, TelemetryContext {
|
||||
|
||||
override val productGroup: String = "account.android.signup"
|
||||
override val productGroup: String = "account.any.signup"
|
||||
override val productFlow: String = "mobile_signup_full"
|
||||
override var userId: UserId?
|
||||
get() = savedStateHandle.get<String>(STATE_USER_ID)?.let { UserId(it) }
|
||||
|
||||
+1
-1
@@ -46,7 +46,7 @@ internal class RecoveryMethodViewModel @Inject constructor(
|
||||
override val telemetryManager: TelemetryManager
|
||||
) : ProtonViewModel(), TelemetryContext, ProductMetricsDelegateAuth {
|
||||
|
||||
override val productGroup: String = "account.android.signup"
|
||||
override val productGroup: String = "account.any.signup"
|
||||
override val productFlow: String = "mobile_signup_full"
|
||||
|
||||
private val _recoveryMethodUpdate = MutableStateFlow(RecoveryMethodType.EMAIL)
|
||||
|
||||
+1
-1
@@ -89,7 +89,7 @@ internal class SignupViewModel @Inject constructor(
|
||||
private val savedStateHandle: SavedStateHandle
|
||||
) : ViewModel(), ObservabilityContext, ProductMetricsDelegateAuth, TelemetryContext {
|
||||
|
||||
override val productGroup: String = "account.android.signup"
|
||||
override val productGroup: String = "account.any.signup"
|
||||
override val productFlow: String = "mobile_signup_full"
|
||||
override var userId: UserId?
|
||||
get() = savedStateHandle.get<String>(LoginViewModel.STATE_USER_ID)?.let { UserId(it) }
|
||||
|
||||
+2
-2
@@ -485,7 +485,7 @@ class LoginViewModelTest : ArchTest by ArchTest(), CoroutinesTest by CoroutinesT
|
||||
verify { telemetryManager.enqueue(null, capture(telemetryEventSlot)) }
|
||||
val telemetryEvent = telemetryEventSlot.captured
|
||||
assertEquals("be.signin.auth", telemetryEvent.name)
|
||||
assertEquals("account.android.signup", telemetryEvent.group)
|
||||
assertEquals("account.any.signup", telemetryEvent.group)
|
||||
assertEquals(
|
||||
mapOf("account_type" to "internal", "flow" to "mobile_signup_full", "result" to "success"),
|
||||
telemetryEvent.dimensions
|
||||
@@ -539,7 +539,7 @@ class LoginViewModelTest : ArchTest by ArchTest(), CoroutinesTest by CoroutinesT
|
||||
verify { telemetryManager.enqueue(null, capture(telemetryEventSlot)) }
|
||||
val telemetryEvent = telemetryEventSlot.captured
|
||||
assertEquals("be.signin.auth", telemetryEvent.name)
|
||||
assertEquals("account.android.signup", telemetryEvent.group)
|
||||
assertEquals("account.any.signup", telemetryEvent.group)
|
||||
assertEquals(
|
||||
mapOf("account_type" to "internal", "flow" to "mobile_signup_full", "result" to "failure"),
|
||||
telemetryEvent.dimensions
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2022 Proton Technologies AG
|
||||
* Copyright (c) 2023 Proton AG
|
||||
* This file is part of Proton AG and ProtonCore.
|
||||
*
|
||||
* ProtonCore is free software: you can redistribute it and/or modify
|
||||
@@ -37,7 +37,7 @@ import javax.inject.Inject
|
||||
|
||||
@AndroidEntryPoint
|
||||
@ProductMetrics(
|
||||
group = "account.android.signup",
|
||||
group = "account.any.signup",
|
||||
flow = "mobile_signup_full"
|
||||
)
|
||||
@ScreenDisplayed(event = "fe.hv.displayed")
|
||||
|
||||
+1
-1
@@ -53,7 +53,7 @@ class HV3ViewModel @Inject constructor(
|
||||
override val telemetryManager: TelemetryManager
|
||||
) : ProtonViewModel(), ProductMetricsDelegateHv {
|
||||
|
||||
override val productGroup: String = "account.android.signup"
|
||||
override val productGroup: String = "account.any.signup"
|
||||
override val productFlow: String = "mobile_signup_full"
|
||||
|
||||
private val backgroundContext = Dispatchers.IO + viewModelScope.coroutineContext
|
||||
|
||||
Reference in New Issue
Block a user