diff --git a/focus-ios/Blockzilla/AppDelegate.swift b/focus-ios/Blockzilla/AppDelegate.swift index 1f1ba5ff7970..8e44194a3212 100644 --- a/focus-ios/Blockzilla/AppDelegate.swift +++ b/focus-ios/Blockzilla/AppDelegate.swift @@ -358,6 +358,8 @@ extension AppDelegate { } } + GleanMetrics.Pings.shared.usageDeletionRequest.setEnabled(enabled: true) + if TelemetryManager.shared.isGleanEnabled { UsageProfileManager.checkAndSetUsageProfileId() } else { @@ -371,6 +373,7 @@ extension AppDelegate { channel: channel, pingSchedule: ["baseline": ["usage-reporting"]] ) + Glean.shared.initialize( uploadEnabled: TelemetryManager.shared.isGleanEnabled, configuration: configuration, diff --git a/focus-ios/Blockzilla/Settings/Controller/SettingsViewController.swift b/focus-ios/Blockzilla/Settings/Controller/SettingsViewController.swift index c105aedcf1b7..c7a045ae5bdf 100644 --- a/focus-ios/Blockzilla/Settings/Controller/SettingsViewController.swift +++ b/focus-ios/Blockzilla/Settings/Controller/SettingsViewController.swift @@ -656,7 +656,9 @@ class SettingsViewController: UIViewController, UITableViewDataSource, UITableVi } else if toggle.setting == .biometricLogin { TipManager.biometricTip = false } else if toggle.setting == .dailyUsagePing { - // TODO: FXIOS-10904 Focus iOS: Send data deletion request when DAU ping is toggled off + if !sender.isOn { + GleanMetrics.Pings.shared.usageDeletionRequest.submit() + } } switch toggle.setting { diff --git a/focus-ios/Blockzilla/pings.yaml b/focus-ios/Blockzilla/pings.yaml index 7e7ada19f2a9..dd6a79c2ad09 100644 --- a/focus-ios/Blockzilla/pings.yaml +++ b/focus-ios/Blockzilla/pings.yaml @@ -51,3 +51,26 @@ usage-reporting: include_info_sections: false ping_schedule: - baseline + +usage-deletion-request: + description: | + This ping is submitted when a user opts out of sending usage + frequency of Firefox to Mozilla. + Sent in response to user action. + include_client_id: false + send_if_empty: true + bugs: + - https://mozilla-hub.atlassian.net/browse/FXIOS-10904 + data_reviews: + - https://github.com/mozilla-mobile/firefox-ios/pull/24339 + notification_emails: + - glean-team@mozilla.com + - jrediger@mozilla.com + - loines@mozilla.com + metadata: + follows_collection_enabled: false + include_info_sections: false + reasons: + set_upload_enabled: | + The ping was submitted due to the usage-reporting data preference changing from + enabled to disabled.