For #26551 - Add telemetry for MR Onboarding welcome and sync dialogs.
This commit is contained in:
parent
6ad87373ff
commit
22b8b873e1
114
app/metrics.yaml
114
app/metrics.yaml
|
@ -668,6 +668,120 @@ onboarding:
|
|||
metadata:
|
||||
tags:
|
||||
- Onboarding
|
||||
welcome_card_impression:
|
||||
type: event
|
||||
description:
|
||||
The welcome onboarding card was displayed to the user.
|
||||
bugs:
|
||||
- https://github.com/mozilla-mobile/fenix/issues/26551
|
||||
data_reviews:
|
||||
- https://github.com/mozilla-mobile/fenix/pull/26596
|
||||
data_sensitivity:
|
||||
- interaction
|
||||
notification_emails:
|
||||
- android-probes@mozilla.com
|
||||
expires: 119
|
||||
metadata:
|
||||
tags:
|
||||
- Onboarding
|
||||
welcome_close_clicked:
|
||||
type: event
|
||||
description:
|
||||
The user clicked the `X` button from the welcome onboarding card.
|
||||
bugs:
|
||||
- https://github.com/mozilla-mobile/fenix/issues/26551
|
||||
data_reviews:
|
||||
- https://github.com/mozilla-mobile/fenix/pull/26596
|
||||
data_sensitivity:
|
||||
- interaction
|
||||
notification_emails:
|
||||
- android-probes@mozilla.com
|
||||
expires: 119
|
||||
metadata:
|
||||
tags:
|
||||
- Onboarding
|
||||
welcome_get_started_clicked:
|
||||
type: event
|
||||
description:
|
||||
The user clicked the `Get started` button from the welcome onboarding
|
||||
card.
|
||||
bugs:
|
||||
- https://github.com/mozilla-mobile/fenix/issues/26551
|
||||
data_reviews:
|
||||
- https://github.com/mozilla-mobile/fenix/pull/26596
|
||||
data_sensitivity:
|
||||
- interaction
|
||||
notification_emails:
|
||||
- android-probes@mozilla.com
|
||||
expires: 119
|
||||
metadata:
|
||||
tags:
|
||||
- Onboarding
|
||||
sync_card_impression:
|
||||
type: event
|
||||
description:
|
||||
The sync sign in onboarding card was displayed to the user.
|
||||
bugs:
|
||||
- https://github.com/mozilla-mobile/fenix/issues/26551
|
||||
data_reviews:
|
||||
- https://github.com/mozilla-mobile/fenix/pull/26596
|
||||
data_sensitivity:
|
||||
- interaction
|
||||
notification_emails:
|
||||
- android-probes@mozilla.com
|
||||
expires: 119
|
||||
metadata:
|
||||
tags:
|
||||
- Onboarding
|
||||
sync_close_clicked:
|
||||
type: event
|
||||
description:
|
||||
The user clicked the `X` button from the sync sign in onboarding card.
|
||||
bugs:
|
||||
- https://github.com/mozilla-mobile/fenix/issues/26551
|
||||
data_reviews:
|
||||
- https://github.com/mozilla-mobile/fenix/pull/26596
|
||||
data_sensitivity:
|
||||
- interaction
|
||||
notification_emails:
|
||||
- android-probes@mozilla.com
|
||||
expires: 119
|
||||
metadata:
|
||||
tags:
|
||||
- Onboarding
|
||||
sync_sign_in_clicked:
|
||||
type: event
|
||||
description:
|
||||
The user clicked the `Sign in` button from the sync sign in
|
||||
onboarding card.
|
||||
bugs:
|
||||
- https://github.com/mozilla-mobile/fenix/issues/26551
|
||||
data_reviews:
|
||||
- https://github.com/mozilla-mobile/fenix/pull/26596
|
||||
data_sensitivity:
|
||||
- interaction
|
||||
notification_emails:
|
||||
- android-probes@mozilla.com
|
||||
expires: 119
|
||||
metadata:
|
||||
tags:
|
||||
- Onboarding
|
||||
sync_skip_clicked:
|
||||
type: event
|
||||
description:
|
||||
The user clicked the `Skip` button from the sign in onboarding card.
|
||||
bugs:
|
||||
- https://github.com/mozilla-mobile/fenix/issues/26551
|
||||
data_reviews:
|
||||
- https://github.com/mozilla-mobile/fenix/pull/26596
|
||||
data_sensitivity:
|
||||
- interaction
|
||||
notification_emails:
|
||||
- android-probes@mozilla.com
|
||||
expires: 119
|
||||
metadata:
|
||||
tags:
|
||||
- Onboarding
|
||||
|
||||
search_shortcuts:
|
||||
selected:
|
||||
|
|
|
@ -40,10 +40,12 @@ import androidx.compose.ui.tooling.preview.Preview
|
|||
import androidx.compose.ui.unit.dp
|
||||
import com.google.accompanist.insets.navigationBarsPadding
|
||||
import com.google.accompanist.insets.statusBarsPadding
|
||||
import mozilla.telemetry.glean.private.NoExtras
|
||||
import org.mozilla.fenix.R
|
||||
import org.mozilla.fenix.compose.button.PrimaryButton
|
||||
import org.mozilla.fenix.compose.button.SecondaryButton
|
||||
import org.mozilla.fenix.theme.FirefoxTheme
|
||||
import org.mozilla.fenix.GleanMetrics.Onboarding as OnboardingMetrics
|
||||
|
||||
/**
|
||||
* Enum that represents the onboarding screen that is displayed.
|
||||
|
@ -83,7 +85,16 @@ fun Onboarding(
|
|||
modifier = Modifier.fillMaxWidth(),
|
||||
horizontalArrangement = Arrangement.End,
|
||||
) {
|
||||
IconButton(onClick = onDismiss) {
|
||||
IconButton(
|
||||
onClick = {
|
||||
if (onboardingState == OnboardingState.Welcome) {
|
||||
OnboardingMetrics.welcomeCloseClicked.record(NoExtras())
|
||||
} else {
|
||||
OnboardingMetrics.syncCloseClicked.record(NoExtras())
|
||||
}
|
||||
onDismiss()
|
||||
}
|
||||
) {
|
||||
Icon(
|
||||
painter = painterResource(id = R.drawable.mozac_ic_close),
|
||||
contentDescription = null,
|
||||
|
@ -99,6 +110,7 @@ fun Onboarding(
|
|||
onboardingState = onboardingState,
|
||||
isSyncSignIn = isSyncSignIn,
|
||||
onGetStartedButtonClick = {
|
||||
OnboardingMetrics.welcomeGetStartedClicked.record(NoExtras())
|
||||
if (isSyncSignIn) {
|
||||
onDismiss()
|
||||
} else {
|
||||
|
@ -106,14 +118,24 @@ fun Onboarding(
|
|||
}
|
||||
},
|
||||
)
|
||||
|
||||
OnboardingMetrics.welcomeCardImpression.record(NoExtras())
|
||||
} else if (onboardingState == OnboardingState.SyncSignIn) {
|
||||
OnboardingSyncSignInContent()
|
||||
|
||||
OnboardingSyncSignInBottomContent(
|
||||
onboardingState = onboardingState,
|
||||
onSignInButtonClick = onSignInButtonClick,
|
||||
onSkipButtonClick = onDismiss,
|
||||
onSignInButtonClick = {
|
||||
OnboardingMetrics.syncSignInClicked.record(NoExtras())
|
||||
onSignInButtonClick()
|
||||
},
|
||||
onSkipButtonClick = {
|
||||
OnboardingMetrics.syncSkipClicked.record(NoExtras())
|
||||
onDismiss()
|
||||
}
|
||||
)
|
||||
|
||||
OnboardingMetrics.syncCardImpression.record(NoExtras())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue