Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add FXIOS-10902 Firefox iOS send data deletion request when dau ping is toggled off #24263

Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import Common
import UIKit
import Shared
import Glean

// MARK: - Settings Flow Delegate Protocol

Expand Down Expand Up @@ -236,6 +237,7 @@ class AppSettingsTableViewController: SettingsTableViewController,
if value {
self?.gleanLifecycleObserver.startObserving()
} else {
GleanMetrics.Pings.shared.usageDeletionRequest.submit()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a follows_collection_enabled=false ping, thus it needs to be specifically enabled, otherwise it won't ever be submitted.
Because it also should carry the usage_profile_id it needs to be enabled before that metric is set so that we actually store that ID for it.

self?.gleanLifecycleObserver.stopObserving()
}
}
Expand Down
1 change: 1 addition & 0 deletions firefox-ios/Client/metrics.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -752,6 +752,7 @@ usage:
expires: never
send_in_pings:
- usage-reporting
- usage-deletion-request

duration:
type: timing_distribution
Expand Down
24 changes: 24 additions & 0 deletions firefox-ios/Client/pings.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -114,3 +114,27 @@ onboarding-opt-out:
metadata:
follows_collection_enabled: false
include_info_sections: false

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-10902
data_reviews:
- https://github.com/mozilla-mobile/firefox-ios/pull/24263
notification_emails:
- [email protected]
- [email protected]
- [email protected]
metadata:
follows_collection_enabled: false
include_info_sections: false
reasons:
set_upload_enabled: |
The ping was submitted between Glean init and Glean shutdown.
After init but before shutdown the upload of usage reporting data changed
from enabled to disabled.
Comment on lines +138 to +140
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The ping was submitted between Glean init and Glean shutdown.
After init but before shutdown the upload of usage reporting data changed
from enabled to disabled.
The ping was submitted due to the usage-reporting data preference changing from
enabled to disabled.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I said that before on, I think, the desktop implementation: due to this being a include_info_sections=false ping we won't see any reasons anyway. They are stripped from the final payload.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that desktop did land with the reason defined. So for documentation reasons we can probably keep it here too (it's not set in the above submit call anyway)