Skip to content

Commit

Permalink
Add FXIOS-10666 Implement iOS "onboarding-opt-out" ping (#24101)
Browse files Browse the repository at this point in the history
* Add FXIOS-10902 Firefox iOS: Send data deletion request when DAU ping is toggled off

* Update data review link

* Fix PR comments
  • Loading branch information
razvanlitianu authored and clarmso committed Jan 22, 2025
1 parent 1f0779a commit 42dd48f
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 0 deletions.
4 changes: 4 additions & 0 deletions firefox-ios/Client.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -1137,6 +1137,7 @@
8CC6170B2C358BAC001C7688 /* ActionToast.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8CC6170A2C358BAC001C7688 /* ActionToast.swift */; };
8CCCB08B2AE26B5C0073ADB9 /* ReportResponse.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8CCCB08A2AE26B5C0073ADB9 /* ReportResponse.swift */; };
8CCD74732B90A945008F919B /* LoginListViewModelTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8CCD74722B90A945008F919B /* LoginListViewModelTests.swift */; };
8CDA04872D351783004C333C /* pings.yaml in Resources */ = {isa = PBXBuildFile; fileRef = 8CDA04862D351783004C333C /* pings.yaml */; };
8CE1E4322B8C76AE0026530B /* LoginStorage.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8CE1E4312B8C76AE0026530B /* LoginStorage.swift */; };
8CE1E4372B8C76C80026530B /* LoginAutofillView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8CE1E4332B8C76C80026530B /* LoginAutofillView.swift */; };
8CE1E4382B8C76C80026530B /* LoginListViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8CE1E4342B8C76C80026530B /* LoginListViewModel.swift */; };
Expand Down Expand Up @@ -7979,6 +7980,7 @@
8CCCB08A2AE26B5C0073ADB9 /* ReportResponse.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ReportResponse.swift; sourceTree = "<group>"; };
8CCD74722B90A945008F919B /* LoginListViewModelTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoginListViewModelTests.swift; sourceTree = "<group>"; };
8CD04F1485CE61A3B3237248 /* hu */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = hu; path = hu.lproj/3DTouchActions.strings; sourceTree = "<group>"; };
8CDA04862D351783004C333C /* pings.yaml */ = {isa = PBXFileReference; lastKnownFileType = text.yaml; path = pings.yaml; sourceTree = "<group>"; };
8CE041B18298F668144B225A /* es */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = es; path = es.lproj/Menu.strings; sourceTree = "<group>"; };
8CE1E4312B8C76AE0026530B /* LoginStorage.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoginStorage.swift; sourceTree = "<group>"; };
8CE1E4332B8C76C80026530B /* LoginAutofillView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = LoginAutofillView.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -14359,6 +14361,7 @@
7B2142FC1E5E055000CDD3FC /* InfoPlist.strings */,
74821FFD1DB6D3AC00EEEA72 /* MailSchemes.plist */,
ACD605D124B35EEE00EE4454 /* metrics.yaml */,
8CDA04862D351783004C333C /* pings.yaml */,
C87D8B7E2818331900A6307D /* Nimbus */,
DFACDFAD274D4D4B00A94EEC /* Protocols */,
216A0D6F2A40D0E4008077BA /* Redux */,
Expand Down Expand Up @@ -15653,6 +15656,7 @@
43175DB626B8774D00C41C31 /* Ads.js in Resources */,
D0FCF8081FE4772D004A7995 /* MainFrameAtDocumentStart.js in Resources */,
D30684F11C84F12A002D8D82 /* SearchPlugins in Resources */,
8CDA04872D351783004C333C /* pings.yaml in Resources */,
8A5CDEED27E510F500CC60FF /* pocketglobalfeed.json in Resources */,
8A1A93582B757C7C0069C190 /* gradient.json in Resources */,
74821FFE1DB6D3AC00EEEA72 /* MailSchemes.plist in Resources */,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import UIKit
import Common
import ComponentLibrary
import Shared
import Glean

final class PrivacyPreferencesViewController: UIViewController,
Themeable,
Expand Down Expand Up @@ -168,6 +169,9 @@ final class PrivacyPreferencesViewController: UIViewController,

technicalDataSwitch.switchCallback = { [weak self] value in
self?.profile.prefs.setBool(value, forKey: AppConstants.prefSendUsageData)
if !value {
GleanMetrics.Pings.shared.onboardingOptOut.submit()
}
TermsOfServiceTelemetry().technicalInteractionDataSwitched(to: value)
}

Expand Down
23 changes: 23 additions & 0 deletions firefox-ios/Client/pings.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -91,3 +91,26 @@ usage-reporting:
include_info_sections: false
ping_schedule:
- baseline

onboarding-opt-out:
description: |
This ping is submitted when a user opts out of
usage-reporting during the onboarding process.
It is sent immediately upon opting out of Telemetry/Usage Tracking (T/UT)
at ToS consent. This ping will only ever be sent during the
initial onboarding flow.
If the global telemetry preference is disabled, this ping
includes specific settings to ensure it can still be submitted.
include_client_id: false
send_if_empty: true
bugs:
- https://mozilla-hub.atlassian.net/browse/FXIOS-10902
data_reviews:
- https://github.com/mozilla-mobile/firefox-ios/pull/24101
notification_emails:
- [email protected]
- [email protected]
- [email protected]
metadata:
follows_collection_enabled: false
include_info_sections: false

0 comments on commit 42dd48f

Please sign in to comment.