commit e6aa033870cda6fe42fd103014bb276e8557ebf3
parent e5e1af578431e4047d561a7cd1377d0c2d772dc8
Author: t-p-white <towhite@mozilla.com>
Date: Fri, 31 Oct 2025 08:57:42 +0000
Bug 1997279 - Add implementation calls for ToU prompt telemetry events learn_more_click, privacy_notice_click and terms_of_use_click events r=android-reviewers,marcin
Differential Revision: https://phabricator.services.mozilla.com/D270648
Diffstat:
2 files changed, 12 insertions(+), 1 deletion(-)
diff --git a/mobile/android/fenix/app/metrics.yaml b/mobile/android/fenix/app/metrics.yaml
@@ -2223,7 +2223,9 @@ terms_of_use:
dismiss:
type: event
- description: The user dismissed the Terms of Use prompt.
+ description: >
+ The user dismissed the Terms of Use prompt by swiping, hitting back, or tapping
+ the background scrim.
extra_keys:
tou_version:
type: quantity
diff --git a/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/termsofuse/ui/TermsOfUseBottomSheetFragment.kt b/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/termsofuse/ui/TermsOfUseBottomSheetFragment.kt
@@ -79,18 +79,27 @@ class TermsOfUseBottomSheetFragment : BottomSheetDialogFragment() {
)
},
onTermsOfUseClicked = {
+ termsOfUsePromptStore.dispatch(
+ TermsOfUsePromptAction.OnTermsOfUseClicked(args.surface),
+ )
SupportUtils.launchSandboxCustomTab(
context,
SupportUtils.getMozillaPageUrl(SupportUtils.MozillaPage.TERMS_OF_SERVICE),
)
},
onPrivacyNoticeClicked = {
+ termsOfUsePromptStore.dispatch(
+ TermsOfUsePromptAction.OnPrivacyNoticeClicked(args.surface),
+ )
SupportUtils.launchSandboxCustomTab(
context,
SupportUtils.getMozillaPageUrl(SupportUtils.MozillaPage.PRIVATE_NOTICE),
)
},
onLearnMoreClicked = {
+ termsOfUsePromptStore.dispatch(
+ TermsOfUsePromptAction.OnLearnMoreClicked(args.surface),
+ )
SupportUtils.launchSandboxCustomTab(
context,
SupportUtils.getSumoURLForTopic(