mirror of
https://github.com/fork-maintainers/iceraven-browser
synced 2024-11-03 23:15:31 +00:00
[fenix] For https://github.com/mozilla-mobile/fenix/issues/26551 - Add telemetry for MR Onboarding welcome and sync dialogs.
This commit is contained in:
parent
92729cce2b
commit
a33ab6b463
114
app/metrics.yaml
114
app/metrics.yaml
@ -668,6 +668,120 @@ onboarding:
|
|||||||
metadata:
|
metadata:
|
||||||
tags:
|
tags:
|
||||||
- Onboarding
|
- 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:
|
search_shortcuts:
|
||||||
selected:
|
selected:
|
||||||
|
@ -40,10 +40,12 @@ import androidx.compose.ui.tooling.preview.Preview
|
|||||||
import androidx.compose.ui.unit.dp
|
import androidx.compose.ui.unit.dp
|
||||||
import com.google.accompanist.insets.navigationBarsPadding
|
import com.google.accompanist.insets.navigationBarsPadding
|
||||||
import com.google.accompanist.insets.statusBarsPadding
|
import com.google.accompanist.insets.statusBarsPadding
|
||||||
|
import mozilla.telemetry.glean.private.NoExtras
|
||||||
import org.mozilla.fenix.R
|
import org.mozilla.fenix.R
|
||||||
import org.mozilla.fenix.compose.button.PrimaryButton
|
import org.mozilla.fenix.compose.button.PrimaryButton
|
||||||
import org.mozilla.fenix.compose.button.SecondaryButton
|
import org.mozilla.fenix.compose.button.SecondaryButton
|
||||||
import org.mozilla.fenix.theme.FirefoxTheme
|
import org.mozilla.fenix.theme.FirefoxTheme
|
||||||
|
import org.mozilla.fenix.GleanMetrics.Onboarding as OnboardingMetrics
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Enum that represents the onboarding screen that is displayed.
|
* Enum that represents the onboarding screen that is displayed.
|
||||||
@ -83,7 +85,16 @@ fun Onboarding(
|
|||||||
modifier = Modifier.fillMaxWidth(),
|
modifier = Modifier.fillMaxWidth(),
|
||||||
horizontalArrangement = Arrangement.End,
|
horizontalArrangement = Arrangement.End,
|
||||||
) {
|
) {
|
||||||
IconButton(onClick = onDismiss) {
|
IconButton(
|
||||||
|
onClick = {
|
||||||
|
if (onboardingState == OnboardingState.Welcome) {
|
||||||
|
OnboardingMetrics.welcomeCloseClicked.record(NoExtras())
|
||||||
|
} else {
|
||||||
|
OnboardingMetrics.syncCloseClicked.record(NoExtras())
|
||||||
|
}
|
||||||
|
onDismiss()
|
||||||
|
}
|
||||||
|
) {
|
||||||
Icon(
|
Icon(
|
||||||
painter = painterResource(id = R.drawable.mozac_ic_close),
|
painter = painterResource(id = R.drawable.mozac_ic_close),
|
||||||
contentDescription = null,
|
contentDescription = null,
|
||||||
@ -99,6 +110,7 @@ fun Onboarding(
|
|||||||
onboardingState = onboardingState,
|
onboardingState = onboardingState,
|
||||||
isSyncSignIn = isSyncSignIn,
|
isSyncSignIn = isSyncSignIn,
|
||||||
onGetStartedButtonClick = {
|
onGetStartedButtonClick = {
|
||||||
|
OnboardingMetrics.welcomeGetStartedClicked.record(NoExtras())
|
||||||
if (isSyncSignIn) {
|
if (isSyncSignIn) {
|
||||||
onDismiss()
|
onDismiss()
|
||||||
} else {
|
} else {
|
||||||
@ -106,14 +118,24 @@ fun Onboarding(
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
|
|
||||||
|
OnboardingMetrics.welcomeCardImpression.record(NoExtras())
|
||||||
} else if (onboardingState == OnboardingState.SyncSignIn) {
|
} else if (onboardingState == OnboardingState.SyncSignIn) {
|
||||||
OnboardingSyncSignInContent()
|
OnboardingSyncSignInContent()
|
||||||
|
|
||||||
OnboardingSyncSignInBottomContent(
|
OnboardingSyncSignInBottomContent(
|
||||||
onboardingState = onboardingState,
|
onboardingState = onboardingState,
|
||||||
onSignInButtonClick = onSignInButtonClick,
|
onSignInButtonClick = {
|
||||||
onSkipButtonClick = onDismiss,
|
OnboardingMetrics.syncSignInClicked.record(NoExtras())
|
||||||
|
onSignInButtonClick()
|
||||||
|
},
|
||||||
|
onSkipButtonClick = {
|
||||||
|
OnboardingMetrics.syncSkipClicked.record(NoExtras())
|
||||||
|
onDismiss()
|
||||||
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
OnboardingMetrics.syncCardImpression.record(NoExtras())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user