[Uplift] Backport telemetry updates to releases_v92.0.0 (#21097)

* Renew probes set to expire in October

* Renew probes set to expire in September

* Remove master password telemetry.

* Remove download notification telemetry.

* Remove downloads misc telemetry.

* Remove downloads management telemetry

* Remove about page telemetry

* Remove total uri count telemetry

* Remove find in page telemetry

* Remove open links in private tab telemetry

* Remove enable private search suggestions telemetry

* Remove tip telemetry

* Remove private browsing mode telemetry

* Fix data-review listed for default_browser_changed, toolbar_menu_visible, and toolbar_menu_clicked

* Remove private browsing shortcut telemetry

* Remove user specified search engine telemetry

* Remove search suggestions in private telemetry

* Remove banner open in app telemetry

* Include data review for renewed metrics
pull/393/head
Elise Richards 3 years ago committed by GitHub
parent 0c6bb72948
commit ce854cf3c9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -142,13 +142,14 @@ events:
bugs:
- https://github.com/mozilla-mobile/fenix/issues/18857
data_reviews:
- https://github.com/mozilla-mobile/fenix/pull/18895
- https://github.com/mozilla-mobile/fenix/pull/18982#pullrequestreview-635098629
- https://github.com/mozilla-mobile/fenix/pull/19924#issuecomment-861423789
- https://github.com/mozilla-mobile/fenix/pull/21076#issuecomment-909237275
data_sensitivity:
- interaction
notification_emails:
- android-probes@mozilla.com
expires: "2021-10-01"
expires: "2022-04-01"
default_browser_notif_tapped:
type: event
description: |
@ -169,36 +170,14 @@ events:
bugs:
- https://github.com/mozilla-mobile/fenix/issues/18855
data_reviews:
- https://github.com/mozilla-mobile/fenix/pull/18895
- https://github.com/mozilla-mobile/fenix/pull/19924#issuecomment-861423789
data_sensitivity:
- interaction
notification_emails:
- android-probes@mozilla.com
expires: "2021-10-01"
total_uri_count:
type: counter
description: |
A counter of URIs visited by the user in the current session, including
page reloads. This does not include background page requests and URIs from
embedded pages or private browsing but may be incremented without user
interaction by website scripts that programmatically redirect to a new
location.
send_in_pings:
- metrics
bugs:
- https://github.com/mozilla-mobile/fenix/issues/1301
- https://github.com/mozilla-mobile/fenix/issues/4456
data_reviews:
- https://github.com/mozilla-mobile/fenix/pull/1785
- https://github.com/mozilla-mobile/fenix/pull/8314
- https://github.com/mozilla-mobile/fenix/pull/15713#issuecomment-703972068
- https://github.com/mozilla-mobile/fenix/pull/18982#pullrequestreview-635098629
- https://github.com/mozilla-mobile/fenix/pull/19924#issuecomment-861423789
- https://github.com/mozilla-mobile/fenix/pull/21076#issuecomment-909237275
data_sensitivity:
- interaction
notification_emails:
- android-probes@mozilla.com
expires: "2021-08-01"
expires: "2022-04-01"
normal_and_private_uri_count:
type: counter
description: |
@ -591,13 +570,14 @@ experiments_default_browser:
bugs:
- https://github.com/mozilla-mobile/fenix/issues/18851
data_reviews:
- https://github.com/mozilla-mobile/fenix/pull/18895
- https://github.com/mozilla-mobile/fenix/pull/18982#pullrequestreview-635098629
- https://github.com/mozilla-mobile/fenix/pull/19924#issuecomment-861423789
- https://github.com/mozilla-mobile/fenix/pull/21076#issuecomment-909237275
data_sensitivity:
- interaction
notification_emails:
- android-probes@mozilla.com
expires: "2021-10-01"
expires: "2022-04-01"
toolbar_settings:
changed_position:
type: event
@ -753,53 +733,6 @@ login_dialog:
- android-probes@mozilla.com
expires: "2022-02-01"
find_in_page:
opened:
type: event
description: |
A user opened the find in page UI
bugs:
- https://github.com/mozilla-mobile/fenix/issues/1036
data_reviews:
- https://github.com/mozilla-mobile/fenix/pull/1344#issuecomment-479285010
- https://github.com/mozilla-mobile/fenix/pull/15713#issuecomment-703972068
- https://github.com/mozilla-mobile/fenix/pull/19924#issuecomment-861423789
data_sensitivity:
- interaction
notification_emails:
- android-probes@mozilla.com
expires: "2021-08-01"
closed:
type: event
description: |
A user closed the find in page UI
bugs:
- https://github.com/mozilla-mobile/fenix/issues/1036
data_reviews:
- https://github.com/mozilla-mobile/fenix/pull/1344#issuecomment-479285010
- https://github.com/mozilla-mobile/fenix/pull/15713#issuecomment-703972068
- https://github.com/mozilla-mobile/fenix/pull/19924#issuecomment-861423789
data_sensitivity:
- interaction
notification_emails:
- android-probes@mozilla.com
expires: "2021-08-01"
searched_page:
type: event
description: |
A user searched the page
bugs:
- https://github.com/mozilla-mobile/fenix/issues/1036
data_reviews:
- https://github.com/mozilla-mobile/fenix/pull/1344#issuecomment-479285010
- https://github.com/mozilla-mobile/fenix/pull/15713#issuecomment-703972068
- https://github.com/mozilla-mobile/fenix/pull/19924#issuecomment-861423789
data_sensitivity:
- interaction
notification_emails:
- android-probes@mozilla.com
expires: "2021-08-01"
metrics:
default_browser:
type: boolean
@ -1487,24 +1420,6 @@ preferences:
notification_emails:
- android-probes@mozilla.com
expires: "2022-02-01"
open_links_in_private:
type: boolean
description: >
Whether or not the user has enabled open links in a private tab.
default: false
send_in_pings:
- metrics
bugs:
- https://github.com/mozilla-mobile/fenix/issues/11118
data_reviews:
- https://github.com/mozilla-mobile/fenix/pull/11211
- https://github.com/mozilla-mobile/fenix/pull/15713#issuecomment-703972068
- https://github.com/mozilla-mobile/fenix/pull/19924#issuecomment-861423789
data_sensitivity:
- interaction
notification_emails:
- android-probes@mozilla.com
expires: "2021-08-01"
signed_in_sync:
type: boolean
description: >
@ -1564,25 +1479,6 @@ preferences:
notification_emails:
- android-probes@mozilla.com
expires: "2022-02-01"
private_search_suggestions:
type: boolean
description: >
Whether or not the user has enabled showing search suggestions
in private mode.
default: false (we prompt the user, asking them to make a selection)
send_in_pings:
- metrics
bugs:
- https://github.com/mozilla-mobile/fenix/issues/11118
data_reviews:
- https://github.com/mozilla-mobile/fenix/pull/11211
- https://github.com/mozilla-mobile/fenix/pull/15713#issuecomment-703972068
- https://github.com/mozilla-mobile/fenix/pull/19924#issuecomment-861423789
data_sensitivity:
- interaction
notification_emails:
- android-probes@mozilla.com
expires: "2021-08-01"
toolbar_position_setting:
type: string
description: >
@ -2467,62 +2363,6 @@ history:
- android-probes@mozilla.com
expires: "2022-08-01"
tip:
displayed:
type: event
description: |
The tip was displayed
extra_keys:
identifier:
description: "The identifier of the tip displayed"
bugs:
- https://github.com/mozilla-mobile/fenix/issues/9328
data_reviews:
- https://github.com/mozilla-mobile/fenix/pull/9836
- https://github.com/mozilla-mobile/fenix/pull/15713#issuecomment-703972068
- https://github.com/mozilla-mobile/fenix/pull/19924#issuecomment-861423789
data_sensitivity:
- interaction
notification_emails:
- android-probes@mozilla.com
expires: "2021-08-01"
pressed:
type: event
description: |
The tip's button was pressed
extra_keys:
identifier:
description: "The identifier of the tip the action was taken on"
bugs:
- https://github.com/mozilla-mobile/fenix/issues/9328
data_reviews:
- https://github.com/mozilla-mobile/fenix/pull/9836
- https://github.com/mozilla-mobile/fenix/pull/15713#issuecomment-703972068
- https://github.com/mozilla-mobile/fenix/pull/19924#issuecomment-861423789
data_sensitivity:
- interaction
notification_emails:
- android-probes@mozilla.com
expires: "2021-08-01"
closed:
type: event
description: |
The tip was closed
extra_keys:
identifier:
description: "The identifier of the tip closed"
bugs:
- https://github.com/mozilla-mobile/fenix/issues/9328
data_reviews:
- https://github.com/mozilla-mobile/fenix/pull/9836
- https://github.com/mozilla-mobile/fenix/pull/15713#issuecomment-703972068
- https://github.com/mozilla-mobile/fenix/pull/19924#issuecomment-861423789
data_sensitivity:
- interaction
notification_emails:
- android-probes@mozilla.com
expires: "2021-08-01"
reader_mode:
available:
type: event
@ -3084,39 +2924,6 @@ search_widget:
- android-probes@mozilla.com
expires: "2022-02-01"
private_browsing_mode:
snackbar_undo:
type: event
description: |
A user pressed the "undo" button in the snackbar that is shown when the
garbage icon is tapped.
bugs:
- https://github.com/mozilla-mobile/fenix/issues/4658
data_reviews:
- https://github.com/mozilla-mobile/fenix/pull/4968
- https://github.com/mozilla-mobile/fenix/pull/15713#issuecomment-703972068
- https://github.com/mozilla-mobile/fenix/pull/19924#issuecomment-861423789
data_sensitivity:
- interaction
notification_emails:
- android-probes@mozilla.com
expires: "2021-08-01"
notification_tapped:
type: event
description: |
A user pressed the private browsing mode notification itself.
bugs:
- https://github.com/mozilla-mobile/fenix/issues/4658
data_reviews:
- https://github.com/mozilla-mobile/fenix/pull/4968
- https://github.com/mozilla-mobile/fenix/pull/15713#issuecomment-703972068
- https://github.com/mozilla-mobile/fenix/pull/19924#issuecomment-861423789
data_sensitivity:
- interaction
notification_emails:
- android-probes@mozilla.com
expires: "2021-08-01"
contextual_hint.tracking_protection:
display:
type: event
@ -3294,103 +3101,6 @@ tracking_protection:
- android-probes@mozilla.com
expires: "2022-02-01"
private_browsing_shortcut:
create_shortcut:
type: event
description: |
A user pressed the "Add private browsing shortcut" button in settings.
bugs:
- https://github.com/mozilla-mobile/fenix/issues/4658
data_reviews:
- https://github.com/mozilla-mobile/fenix/pull/5194
- https://github.com/mozilla-mobile/fenix/pull/15713#issuecomment-703972068
- https://github.com/mozilla-mobile/fenix/pull/19924#issuecomment-861423789
data_sensitivity:
- interaction
notification_emails:
- android-probes@mozilla.com
expires: "2021-08-01"
cfr_add_shortcut:
type: event
description: |
A user pressed the "Add shortcut" button when the contextual feature
recommender appeared.
bugs:
- https://github.com/mozilla-mobile/fenix/issues/4658
data_reviews:
- https://github.com/mozilla-mobile/fenix/pull/5194
- https://github.com/mozilla-mobile/fenix/pull/15713#issuecomment-703972068
- https://github.com/mozilla-mobile/fenix/pull/19924#issuecomment-861423789
data_sensitivity:
- interaction
notification_emails:
- android-probes@mozilla.com
expires: "2021-08-01"
cfr_cancel:
type: event
description: |
A user pressed the "No thanks" button when the contextual feature
recommender appeared.
bugs:
- https://github.com/mozilla-mobile/fenix/issues/4658
data_reviews:
- https://github.com/mozilla-mobile/fenix/pull/5194
- https://github.com/mozilla-mobile/fenix/pull/15713#issuecomment-703972068
- https://github.com/mozilla-mobile/fenix/pull/19924#issuecomment-861423789
data_sensitivity:
- interaction
notification_emails:
- android-probes@mozilla.com
expires: "2021-08-01"
pinned_shortcut_priv:
type: event
description: |
A user pressed the pinned private shortcut in Android home screen, opening
up a new private search.
bugs:
- https://github.com/mozilla-mobile/fenix/issues/4658
data_reviews:
- https://github.com/mozilla-mobile/fenix/pull/5194
- https://github.com/mozilla-mobile/fenix/pull/15713#issuecomment-703972068
- https://github.com/mozilla-mobile/fenix/pull/19924#issuecomment-861423789
data_sensitivity:
- interaction
notification_emails:
- android-probes@mozilla.com
expires: "2021-08-01"
static_shortcut_tab:
type: event
description: |
A user pressed the long-press shortcut "Open new tab", opening up a new
search.
bugs:
- https://github.com/mozilla-mobile/fenix/issues/4658
data_reviews:
- https://github.com/mozilla-mobile/fenix/pull/5194
- https://github.com/mozilla-mobile/fenix/pull/15713#issuecomment-703972068
- https://github.com/mozilla-mobile/fenix/pull/19924#issuecomment-861423789
data_sensitivity:
- interaction
notification_emails:
- android-probes@mozilla.com
expires: "2021-08-01"
static_shortcut_priv:
type: event
description: |
A user pressed the long-press shortcut "Open new private tab", opening up
a new private search.
bugs:
- https://github.com/mozilla-mobile/fenix/issues/4658
data_reviews:
- https://github.com/mozilla-mobile/fenix/pull/5194
- https://github.com/mozilla-mobile/fenix/pull/15713#issuecomment-703972068
- https://github.com/mozilla-mobile/fenix/pull/19924#issuecomment-861423789
data_sensitivity:
- interaction
notification_emails:
- android-probes@mozilla.com
expires: "2021-08-01"
tab:
media_play:
type: event
@ -3676,237 +3386,6 @@ logins:
- android-probes@mozilla.com
expires: "2022-02-01"
download_notification:
resume:
type: event
description: |
A user resumed a download in the download notification
bugs:
- https://github.com/mozilla-mobile/fenix/issues/5583
data_reviews:
- https://github.com/mozilla-mobile/fenix/pull/6554
- https://github.com/mozilla-mobile/fenix/pull/13958#issuecomment-676857877
- https://github.com/mozilla-mobile/fenix/pull/18143
- https://github.com/mozilla-mobile/fenix/pull/19924#issuecomment-861423789
data_sensitivity:
- interaction
notification_emails:
- android-probes@mozilla.com
expires: "2021-07-01"
pause:
type: event
description: |
A user paused a download in the download notification
bugs:
- https://github.com/mozilla-mobile/fenix/issues/5583
data_reviews:
- https://github.com/mozilla-mobile/fenix/pull/6554
- https://github.com/mozilla-mobile/fenix/pull/13958#issuecomment-676857877
- https://github.com/mozilla-mobile/fenix/pull/18143
- https://github.com/mozilla-mobile/fenix/pull/19924#issuecomment-861423789
data_sensitivity:
- interaction
notification_emails:
- android-probes@mozilla.com
expires: "2021-07-01"
cancel:
type: event
description: |
A user cancelled a download in the download notification
bugs:
- https://github.com/mozilla-mobile/fenix/issues/5583
data_reviews:
- https://github.com/mozilla-mobile/fenix/pull/6554
- https://github.com/mozilla-mobile/fenix/pull/13958#issuecomment-676857877
- https://github.com/mozilla-mobile/fenix/pull/18143
- https://github.com/mozilla-mobile/fenix/pull/19924#issuecomment-861423789
data_sensitivity:
- interaction
notification_emails:
- android-probes@mozilla.com
expires: "2021-07-01"
try_again:
type: event
description: |
A user tapped on try again when a download fails in the download
notification
bugs:
- https://github.com/mozilla-mobile/fenix/issues/5583
data_reviews:
- https://github.com/mozilla-mobile/fenix/pull/6554
- https://github.com/mozilla-mobile/fenix/pull/13958#issuecomment-676857877
- https://github.com/mozilla-mobile/fenix/pull/18143
- https://github.com/mozilla-mobile/fenix/pull/19924#issuecomment-861423789
data_sensitivity:
- interaction
notification_emails:
- android-probes@mozilla.com
expires: "2021-07-01"
open:
type: event
description: |
A user opened a downloaded file in the download notification
bugs:
- https://github.com/mozilla-mobile/fenix/issues/5583
data_reviews:
- https://github.com/mozilla-mobile/fenix/pull/6554
- https://github.com/mozilla-mobile/fenix/pull/13958#issuecomment-676857877
- https://github.com/mozilla-mobile/fenix/pull/18143
- https://github.com/mozilla-mobile/fenix/pull/19924#issuecomment-861423789
data_sensitivity:
- interaction
notification_emails:
- android-probes@mozilla.com
expires: "2021-07-01"
in_app_open:
type: event
description: |
A user opened a downloaded file in the in-app notification link
bugs:
- https://github.com/mozilla-mobile/fenix/issues/5583
data_reviews:
- https://github.com/mozilla-mobile/fenix/pull/6554
- https://github.com/mozilla-mobile/fenix/pull/13958#issuecomment-676857877
- https://github.com/mozilla-mobile/fenix/pull/18143
- https://github.com/mozilla-mobile/fenix/pull/19924#issuecomment-861423789
data_sensitivity:
- interaction
notification_emails:
- android-probes@mozilla.com
expires: "2021-07-01"
in_app_try_again:
type: event
description: |
A user tapped on try again when a download fails in the in-app
notification link
bugs:
- https://github.com/mozilla-mobile/fenix/issues/5583
data_reviews:
- https://github.com/mozilla-mobile/fenix/pull/6554
- https://github.com/mozilla-mobile/fenix/pull/13958#issuecomment-676857877
- https://github.com/mozilla-mobile/fenix/pull/18143
- https://github.com/mozilla-mobile/fenix/pull/19924#issuecomment-861423789
data_sensitivity:
- interaction
notification_emails:
- android-probes@mozilla.com
expires: "2021-07-01"
downloads_misc:
download_added:
type: event
description:
A counter for how many times something is downloaded in the app.
bugs:
- https://github.com/mozilla-mobile/fenix/issues/11578
data_reviews:
- https://github.com/mozilla-mobile/fenix/pull/16730
- https://github.com/mozilla-mobile/fenix/pull/18143
- https://github.com/mozilla-mobile/fenix/pull/19924#issuecomment-861423789
notification_emails:
- android-probes@mozilla.com
expires: "2021-07-01"
downloads_management:
downloads_screen_opened:
type: event
description: >
A counter for the number of times users access the "Downloads" folder
inside the app.
bugs:
- https://github.com/mozilla-mobile/fenix/issues/15367
data_reviews:
- https://github.com/mozilla-mobile/fenix/pull/16728
- https://github.com/mozilla-mobile/fenix/pull/18143
- https://github.com/mozilla-mobile/fenix/pull/19924#issuecomment-861423789
notification_emails:
- android-probes@mozilla.com
expires: "2021-07-01"
item_opened:
type: event
description: >
A counter for how often a user tap to opens a download from inside the
"Downloads" folder.
bugs:
- https://github.com/mozilla-mobile/fenix/issues/15367
- https://github.com/mozilla-mobile/fenix/issues/19923
data_reviews:
- https://github.com/mozilla-mobile/fenix/pull/16728
- https://github.com/mozilla-mobile/fenix/pull/18143
- https://github.com/mozilla-mobile/fenix/pull/19924#issuecomment-861423789
notification_emails:
- android-probes@mozilla.com
expires: "2021-12-01"
item_deleted:
type: event
description: >
A counter for how often a user deletes one / more downloads at a time.
bugs:
- https://github.com/mozilla-mobile/fenix/issues/15367
- https://github.com/mozilla-mobile/fenix/issues/19923
data_reviews:
- https://github.com/mozilla-mobile/fenix/pull/16728
- https://github.com/mozilla-mobile/fenix/pull/18143
- https://github.com/mozilla-mobile/fenix/pull/19924#issuecomment-861423789
notification_emails:
- android-probes@mozilla.com
expires: "2021-12-01"
user_specified_search_engines:
custom_engine_added:
type: event
description: |
A user added a new custom search engine
bugs:
- https://github.com/mozilla-mobile/fenix/issues/5884
data_reviews:
- https://github.com/mozilla-mobile/fenix/pull/6918
- https://github.com/mozilla-mobile/fenix/pull/15713#issuecomment-703972068
- https://github.com/mozilla-mobile/fenix/pull/19924#issuecomment-861423789
data_sensitivity:
- interaction
notification_emails:
- android-probes@mozilla.com
expires: "2021-08-01"
no_lint:
- COMMON_PREFIX
custom_engine_deleted:
type: event
description: |
A user deleted a custom search engine
bugs:
- https://github.com/mozilla-mobile/fenix/issues/5884
- https://github.com/mozilla-mobile/fenix/issues/7881
data_reviews:
- https://github.com/mozilla-mobile/fenix/pull/6918
- https://github.com/mozilla-mobile/fenix/pull/15713#issuecomment-703972068
- https://github.com/mozilla-mobile/fenix/pull/19924#issuecomment-861423789
data_sensitivity:
- interaction
notification_emails:
- android-probes@mozilla.com
expires: "2021-08-01"
search_suggestions:
enable_in_private:
type: event
description: |
A user enabled receiving search suggestions in private sessions
bugs:
- https://github.com/mozilla-mobile/fenix/issues/6070
data_reviews:
- https://github.com/mozilla-mobile/fenix/pull/6746
- https://github.com/mozilla-mobile/fenix/pull/15713#issuecomment-703972068
- https://github.com/mozilla-mobile/fenix/pull/19924#issuecomment-861423789
data_sensitivity:
- technical
- interaction
notification_emails:
- android-probes@mozilla.com
expires: "2021-08-01"
voice_search:
tapped:
type: event
@ -4078,40 +3557,6 @@ top_sites:
- android-probes@mozilla.com
expires: "2022-02-01"
about_page:
support_tapped:
type: event
description: |
A user tapped on "Support" item from About page
bugs:
- https://github.com/mozilla-mobile/fenix/issues/6834
data_reviews:
- https://github.com/mozilla-mobile/fenix/pull/8047
- https://github.com/mozilla-mobile/fenix/pull/13958#issuecomment-676857877
- https://github.com/mozilla-mobile/fenix/pull/18143
- https://github.com/mozilla-mobile/fenix/pull/19924#issuecomment-861423789
data_sensitivity:
- interaction
notification_emails:
- android-probes@mozilla.com
expires: "2021-07-01"
privacy_notice_tapped:
type: event
description: |
A user tapped on "Privacy notice" item from About page
bugs:
- https://github.com/mozilla-mobile/fenix/issues/6834
data_reviews:
- https://github.com/mozilla-mobile/fenix/pull/8047
- https://github.com/mozilla-mobile/fenix/pull/13958#issuecomment-676857877
- https://github.com/mozilla-mobile/fenix/pull/18143
- https://github.com/mozilla-mobile/fenix/pull/19924#issuecomment-861423789
data_sensitivity:
- interaction
notification_emails:
- android-probes@mozilla.com
expires: "2021-07-01"
app_theme:
dark_theme_selected:
type: event
@ -4925,12 +4370,13 @@ perf.startup:
- https://github.com/mozilla-mobile/fenix/issues/18836
data_reviews:
- https://github.com/mozilla-mobile/fenix/pull/19028
- https://github.com/mozilla-mobile/fenix/pull/21076#issuecomment-909237275
data_sensitivity:
- interaction
notification_emails:
- perf-android-fe@mozilla.com
- mcomella@mozilla.com
expires: "2021-10-09"
expires: "2022-04-01"
perf.awesomebar:
history_suggestions:
@ -5218,12 +4664,13 @@ progressive_web_app:
- https://github.com/mozilla-mobile/fenix/pull/11859
- https://github.com/mozilla-mobile/fenix/pull/18071
- https://github.com/mozilla-mobile/fenix/pull/19924#issuecomment-861423789
- https://github.com/mozilla-mobile/fenix/pull/21076#issuecomment-909237275
data_sensitivity:
- interaction
notification_emails:
- android-probes@mozilla.com
- erichards@mozilla.com
expires: "2021-09-01"
expires: "2022-03-01"
install_tap:
type: event
description: |
@ -5234,12 +4681,13 @@ progressive_web_app:
- https://github.com/mozilla-mobile/fenix/pull/11859
- https://github.com/mozilla-mobile/fenix/pull/18071
- https://github.com/mozilla-mobile/fenix/pull/19924#issuecomment-861423789
- https://github.com/mozilla-mobile/fenix/pull/21076#issuecomment-909237275
data_sensitivity:
- interaction
notification_emails:
- android-probes@mozilla.com
- erichards@mozilla.com
expires: "2021-09-01"
expires: "2022-03-01"
foreground:
type: event
description: |
@ -5254,12 +4702,13 @@ progressive_web_app:
- https://github.com/mozilla-mobile/fenix/pull/11859
- https://github.com/mozilla-mobile/fenix/pull/18071
- https://github.com/mozilla-mobile/fenix/pull/19924#issuecomment-861423789
- https://github.com/mozilla-mobile/fenix/pull/21076#issuecomment-909237275
data_sensitivity:
- interaction
notification_emails:
- android-probes@mozilla.com
- erichards@mozilla.com
expires: "2021-09-01"
expires: "2022-03-01"
background:
type: event
description: |
@ -5274,44 +4723,13 @@ progressive_web_app:
- https://github.com/mozilla-mobile/fenix/pull/11859
- https://github.com/mozilla-mobile/fenix/pull/18071
- https://github.com/mozilla-mobile/fenix/pull/19924#issuecomment-861423789
- https://github.com/mozilla-mobile/fenix/pull/21076#issuecomment-909237275
data_sensitivity:
- interaction
notification_emails:
- android-probes@mozilla.com
- erichards@mozilla.com
expires: "2021-09-01"
master_password:
displayed:
type: event
description: |
The master password migration dialog was displayed
bugs:
- https://github.com/mozilla-mobile/fenix/pull/14468#issuecomment-684114534
data_reviews:
- https://github.com/mozilla-mobile/fenix/pull/14468#issuecomment-684114534
- https://github.com/mozilla-mobile/fenix/pull/18071
- https://github.com/mozilla-mobile/fenix/pull/19924#issuecomment-861423789
data_sensitivity:
- interaction
notification_emails:
- android-probes@mozilla.com
expires: "2021-09-01"
migration:
type: event
description: |
Logins were successfully migrated using a master password.
bugs:
- https://github.com/mozilla-mobile/fenix/pull/14468#issuecomment-684114534
data_reviews:
- https://github.com/mozilla-mobile/fenix/pull/14468#issuecomment-684114534
- https://github.com/mozilla-mobile/fenix/pull/18071
- https://github.com/mozilla-mobile/fenix/pull/19924#issuecomment-861423789
data_sensitivity:
- interaction
notification_emails:
- android-probes@mozilla.com
expires: "2021-09-01"
expires: "2022-03-01"
tabs:
setting_opened:
@ -5330,50 +4748,6 @@ tabs:
- android-probes@mozilla.com
expires: "2022-02-01"
banner_open_in_app:
displayed:
type: event
description: |
Open in App banner was shown.
bugs:
- https://github.com/mozilla-mobile/fenix/issues/16828
data_reviews:
- https://github.com/mozilla-mobile/fenix/pull/17049
- https://github.com/mozilla-mobile/fenix/pull/19924#issuecomment-861423789
data_sensitivity:
- interaction
notification_emails:
- android-probes@mozilla.com
expires: "2021-08-01"
dismissed:
type: event
description: |
User tapped 'dismiss' on Open in App banner.
bugs:
- https://github.com/mozilla-mobile/fenix/issues/16828
data_reviews:
- https://github.com/mozilla-mobile/fenix/pull/17049
- https://github.com/mozilla-mobile/fenix/pull/19924#issuecomment-861423789
data_sensitivity:
- interaction
notification_emails:
- android-probes@mozilla.com
expires: "2021-08-01"
go_to_settings:
type: event
description: |
User tapped 'go to settings' on Open in App banner.
bugs:
- https://github.com/mozilla-mobile/fenix/issues/16828
data_reviews:
- https://github.com/mozilla-mobile/fenix/pull/17049
- https://github.com/mozilla-mobile/fenix/pull/19924#issuecomment-861423789
data_sensitivity:
- interaction
notification_emails:
- android-probes@mozilla.com
expires: "2021-08-01"
contextual_menu:
copy_tapped:
type: event
@ -5799,11 +5173,12 @@ home_menu:
data_reviews:
- https://github.com/mozilla-mobile/fenix/pull/18987
- https://github.com/mozilla-mobile/fenix/pull/19924#issuecomment-861423789
- https://github.com/mozilla-mobile/fenix/pull/21076#issuecomment-909237275
data_sensitivity:
- interaction
notification_emails:
- android-probes@mozilla.com
expires: "2021-10-01"
expires: "2022-04-01"
home_screen:
home_screen_displayed:
@ -5814,11 +5189,12 @@ home_screen:
data_reviews:
- https://github.com/mozilla-mobile/fenix/pull/19025
- https://github.com/mozilla-mobile/fenix/pull/19924#issuecomment-861423789
- https://github.com/mozilla-mobile/fenix/pull/21076#issuecomment-909237275
data_sensitivity:
- interaction
notification_emails:
- android-probes@mozilla.com
expires: "2021-10-01"
expires: "2022-04-01"
android_keystore_experiment:
experiment_failure:
@ -5835,11 +5211,12 @@ android_keystore_experiment:
data_reviews:
- https://github.com/mozilla-mobile/fenix/pull/18333#pullrequestreview-612447395
- https://github.com/mozilla-mobile/fenix/pull/19924#issuecomment-861423789
- https://github.com/mozilla-mobile/fenix/pull/21076#issuecomment-909237275
data_sensitivity:
- technical
notification_emails:
- android-probes@mozilla.com
expires: "2021-09-01"
expires: "2022-03-01"
get_failure:
type: event
description: |
@ -5854,11 +5231,12 @@ android_keystore_experiment:
data_reviews:
- https://github.com/mozilla-mobile/fenix/pull/18333#pullrequestreview-612447395
- https://github.com/mozilla-mobile/fenix/pull/19924#issuecomment-861423789
- https://github.com/mozilla-mobile/fenix/pull/21076#issuecomment-909237275
data_sensitivity:
- technical
notification_emails:
- android-probes@mozilla.com
expires: "2021-09-01"
expires: "2022-03-01"
get_result:
type: event
description: |
@ -5873,11 +5251,12 @@ android_keystore_experiment:
data_reviews:
- https://github.com/mozilla-mobile/fenix/pull/18333#pullrequestreview-612447395
- https://github.com/mozilla-mobile/fenix/pull/19924#issuecomment-861423789
- https://github.com/mozilla-mobile/fenix/pull/21076#issuecomment-909237275
data_sensitivity:
- technical
notification_emails:
- android-probes@mozilla.com
expires: "2021-09-01"
expires: "2022-03-01"
write_failure:
type: event
description: |
@ -5892,11 +5271,12 @@ android_keystore_experiment:
data_reviews:
- https://github.com/mozilla-mobile/fenix/pull/18333#pullrequestreview-612447395
- https://github.com/mozilla-mobile/fenix/pull/19924#issuecomment-861423789
- https://github.com/mozilla-mobile/fenix/pull/21076#issuecomment-909237275
data_sensitivity:
- technical
notification_emails:
- android-probes@mozilla.com
expires: "2021-09-01"
expires: "2022-03-01"
write_success:
type: event
description: |
@ -5906,11 +5286,12 @@ android_keystore_experiment:
data_reviews:
- https://github.com/mozilla-mobile/fenix/pull/18333#pullrequestreview-612447395
- https://github.com/mozilla-mobile/fenix/pull/19924#issuecomment-861423789
- https://github.com/mozilla-mobile/fenix/pull/21076#issuecomment-909237275
data_sensitivity:
- technical
notification_emails:
- android-probes@mozilla.com
expires: "2021-09-01"
expires: "2022-03-01"
reset:
type: event
description: |
@ -5921,11 +5302,12 @@ android_keystore_experiment:
data_reviews:
- https://github.com/mozilla-mobile/fenix/pull/18333#pullrequestreview-612447395
- https://github.com/mozilla-mobile/fenix/pull/19924#issuecomment-861423789
- https://github.com/mozilla-mobile/fenix/pull/21076#issuecomment-909237275
data_sensitivity:
- technical
notification_emails:
- android-probes@mozilla.com
expires: "2021-09-01"
expires: "2022-03-01"
set_default_newtab_experiment:
set_default_browser_clicked:
@ -5937,11 +5319,12 @@ set_default_newtab_experiment:
data_reviews:
- https://github.com/mozilla-mobile/fenix/pull/18895
- https://github.com/mozilla-mobile/fenix/pull/19924#issuecomment-861423789
- https://github.com/mozilla-mobile/fenix/pull/21076#issuecomment-909237275
data_sensitivity:
- interaction
notification_emails:
- android-probes@mozilla.com
expires: "2021-10-01"
expires: "2022-04-01"
close_experiment_card_clicked:
type: event
description: |
@ -5951,11 +5334,12 @@ set_default_newtab_experiment:
data_reviews:
- https://github.com/mozilla-mobile/fenix/pull/18895
- https://github.com/mozilla-mobile/fenix/pull/19924#issuecomment-861423789
- https://github.com/mozilla-mobile/fenix/pull/21076#issuecomment-909237275
data_sensitivity:
- interaction
notification_emails:
- android-probes@mozilla.com
expires: "2021-10-01"
expires: "2022-04-01"
set_default_setting_experiment:
set_default_browser_clicked:
@ -5967,11 +5351,12 @@ set_default_setting_experiment:
data_reviews:
- https://github.com/mozilla-mobile/fenix/pull/19047
- https://github.com/mozilla-mobile/fenix/pull/19924#issuecomment-861423789
- https://github.com/mozilla-mobile/fenix/pull/21076#issuecomment-909237275
data_sensitivity:
- interaction
notification_emails:
- android-probes@mozilla.com
expires: "2021-10-01"
expires: "2022-04-01"
start_on_home:
enter_home_screen:
type: event

@ -637,8 +637,6 @@ open class FenixApplication : LocaleAwareApplication(), Provider {
bookmarksSuggestion.set(settings.shouldShowBookmarkSuggestions)
clipboardSuggestionsEnabled.set(settings.shouldShowClipboardSuggestions)
searchShortcutsEnabled.set(settings.shouldShowSearchShortcuts)
openLinksInPrivate.set(settings.openLinksInAPrivateTab)
privateSearchSuggestions.set(settings.shouldShowSearchSuggestionsInPrivate)
voiceSearchEnabled.set(settings.shouldShowVoiceSearch)
openLinksInAppEnabled.set(settings.openLinksInExternalApp)
signedInSync.set(settings.signedInFxaAccount)

@ -494,16 +494,14 @@ abstract class BaseBrowserFragment :
val dynamicDownloadDialog = DynamicDownloadDialog(
container = view.browserLayout,
downloadState = downloadState,
metrics = requireComponents.analytics.metrics,
didFail = downloadJobStatus == DownloadState.Status.FAILED,
tryAgain = downloadFeature::tryAgain,
onCannotOpenFile = {
showCannotOpenFileError(view.browserLayout, context, it)
},
view = view.viewDynamicDownloadDialog,
toolbarHeight = toolbarHeight,
onDismiss = { sharedViewModel.downloadDialogState.remove(downloadState.sessionId) }
)
toolbarHeight = toolbarHeight
) { sharedViewModel.downloadDialogState.remove(downloadState.sessionId) }
dynamicDownloadDialog.show()
browserToolbarView.expand()
@ -896,7 +894,6 @@ abstract class BaseBrowserFragment :
DynamicDownloadDialog(
container = view.browserLayout,
downloadState = savedDownloadState.first,
metrics = requireComponents.analytics.metrics,
didFail = savedDownloadState.second,
tryAgain = onTryAgain,
onCannotOpenFile = {

@ -24,9 +24,6 @@ import mozilla.components.support.ktx.kotlinx.coroutines.flow.ifAnyChanged
import org.mozilla.fenix.R
import org.mozilla.fenix.browser.infobanner.DynamicInfoBanner
import org.mozilla.fenix.browser.infobanner.InfoBanner
import org.mozilla.fenix.components.metrics.Event
import org.mozilla.fenix.components.metrics.Event.BannerOpenInAppGoToSettings
import org.mozilla.fenix.ext.components
import org.mozilla.fenix.ext.nav
import org.mozilla.fenix.utils.Settings
@ -93,7 +90,6 @@ class OpenInAppOnboardingObserver(
infoBanner?.showBanner()
sessionDomainForDisplayedBanner = url.tryGetHostFromUrl()
settings.shouldShowOpenInAppBanner = false
context.components.analytics.metrics.track(Event.BannerOpenInAppDisplayed)
}
}
@ -105,18 +101,12 @@ class OpenInAppOnboardingObserver(
dismissText = context.getString(R.string.open_in_app_cfr_negative_button_text),
actionText = context.getString(R.string.open_in_app_cfr_positive_button_text),
container = container,
shouldScrollWithTopToolbar = shouldScrollWithTopToolbar,
dismissAction = ::dismissAction
shouldScrollWithTopToolbar = shouldScrollWithTopToolbar
) {
val directions = BrowserFragmentDirections.actionBrowserFragmentToSettingsFragment(
preferenceToScrollTo = context.getString(R.string.pref_key_open_links_in_external_app)
)
context.components.analytics.metrics.track(BannerOpenInAppGoToSettings)
navController.nav(R.id.browserFragment, directions)
}
}
private fun dismissAction() {
context.components.analytics.metrics.track(Event.BannerOpenInAppDismissed)
}
}

@ -21,7 +21,6 @@ import org.mozilla.fenix.GleanMetrics.Logins
import org.mozilla.fenix.GleanMetrics.Onboarding
import org.mozilla.fenix.GleanMetrics.ProgressiveWebApp
import org.mozilla.fenix.GleanMetrics.SearchShortcuts
import org.mozilla.fenix.GleanMetrics.Tip
import org.mozilla.fenix.GleanMetrics.ToolbarSettings
import org.mozilla.fenix.GleanMetrics.TopSites
import org.mozilla.fenix.GleanMetrics.TrackingProtection
@ -52,7 +51,6 @@ sealed class Event {
object CustomTabsClosed : Event()
object CustomTabsActionTapped : Event()
object CustomTabsMenuOpened : Event()
object UriOpened : Event()
object NormalAndPrivateUriOpened : Event()
object SyncAuthOpened : Event()
object SyncAuthClosed : Event()
@ -96,17 +94,6 @@ sealed class Event {
object CollectionRenamePressed : Event()
object SearchWidgetNewTabPressed : Event()
object SearchWidgetVoiceSearchPressed : Event()
object FindInPageOpened : Event()
object FindInPageClosed : Event()
object FindInPageSearchCommitted : Event()
object PrivateBrowsingSnackbarUndoTapped : Event()
object PrivateBrowsingNotificationTapped : Event()
object PrivateBrowsingCreateShortcut : Event()
object PrivateBrowsingAddShortcutCFR : Event()
object PrivateBrowsingCancelCFR : Event()
object PrivateBrowsingPinnedShortcutPrivateTab : Event()
object PrivateBrowsingStaticShortcutTab : Event()
object PrivateBrowsingStaticShortcutPrivateTab : Event()
object TabMediaPlay : Event()
object TabMediaPause : Event()
object MediaPlayState : Event()
@ -114,17 +101,6 @@ sealed class Event {
object MediaStopState : Event()
object MediaFullscreenState : Event()
object MediaPictureInPictureState : Event()
object InAppNotificationDownloadOpen : Event()
object InAppNotificationDownloadTryAgain : Event()
object NotificationDownloadCancel : Event()
object NotificationDownloadOpen : Event()
object NotificationDownloadPause : Event()
object NotificationDownloadResume : Event()
object NotificationDownloadTryAgain : Event()
object DownloadAdded : Event()
object DownloadsScreenOpened : Event()
object DownloadsItemOpened : Event()
object DownloadsItemDeleted : Event()
object NotificationMediaPlay : Event()
object NotificationMediaPause : Event()
object TopSiteOpenDefault : Event()
@ -146,12 +122,7 @@ sealed class Event {
object EditLogin : Event()
object EditLoginSave : Event()
object ViewLoginPassword : Event()
object CustomEngineAdded : Event()
object CustomEngineDeleted : Event()
object PrivateBrowsingShowSearchSuggestions : Event()
object WhatsNewTapped : Event()
object SupportTapped : Event()
object PrivacyNoticeTapped : Event()
object PocketTopSiteClicked : Event()
object PocketTopSiteRemoved : Event()
object FennecToFenixMigrated : Event()
@ -194,9 +165,6 @@ sealed class Event {
object ProgressiveWebAppOpenFromHomescreenTap : Event()
object ProgressiveWebAppInstallAsShortcut : Event()
object MasterPasswordMigrationSuccess : Event()
object MasterPasswordMigrationDisplayed : Event()
object TabSettingsOpened : Event()
object CopyUrlUsed : Event()
@ -207,10 +175,6 @@ sealed class Event {
object HaveOpenTabs : Event()
object HaveNoOpenTabs : Event()
object BannerOpenInAppDisplayed : Event()
object BannerOpenInAppDismissed : Event()
object BannerOpenInAppGoToSettings : Event()
object ContextMenuCopyTapped : Event()
object ContextMenuSearchTapped : Event()
object ContextMenuSelectAllTapped : Event()
@ -363,21 +327,6 @@ sealed class Event {
get() = hashMapOf(Addons.openAddonSettingKeys.addonId to addonId)
}
data class TipDisplayed(val identifier: String) : Event() {
override val extras: Map<Tip.displayedKeys, String>?
get() = hashMapOf(Tip.displayedKeys.identifier to identifier)
}
data class TipPressed(val identifier: String) : Event() {
override val extras: Map<Tip.pressedKeys, String>?
get() = hashMapOf(Tip.pressedKeys.identifier to identifier)
}
data class TipClosed(val identifier: String) : Event() {
override val extras: Map<Tip.closedKeys, String>?
get() = hashMapOf(Tip.closedKeys.identifier to identifier)
}
data class ToolbarPositionChanged(val position: Position) : Event() {
enum class Position { TOP, BOTTOM }

@ -8,14 +8,12 @@ import android.content.Context
import mozilla.components.service.glean.Glean
import mozilla.components.service.glean.private.NoExtraKeys
import mozilla.components.support.base.log.logger.Logger
import org.mozilla.fenix.GleanMetrics.AboutPage
import org.mozilla.fenix.GleanMetrics.Addons
import org.mozilla.fenix.GleanMetrics.AndroidAutofill
import org.mozilla.fenix.GleanMetrics.AndroidKeystoreExperiment
import org.mozilla.fenix.GleanMetrics.AppTheme
import org.mozilla.fenix.GleanMetrics.Autoplay
import org.mozilla.fenix.GleanMetrics.Awesomebar
import org.mozilla.fenix.GleanMetrics.BannerOpenInApp
import org.mozilla.fenix.GleanMetrics.BookmarksManagement
import org.mozilla.fenix.GleanMetrics.BrowserSearch
import org.mozilla.fenix.GleanMetrics.Collections
@ -24,32 +22,24 @@ import org.mozilla.fenix.GleanMetrics.ContextualHintTrackingProtection
import org.mozilla.fenix.GleanMetrics.ContextualMenu
import org.mozilla.fenix.GleanMetrics.CrashReporter
import org.mozilla.fenix.GleanMetrics.CustomTab
import org.mozilla.fenix.GleanMetrics.DownloadNotification
import org.mozilla.fenix.GleanMetrics.DownloadsMisc
import org.mozilla.fenix.GleanMetrics.DownloadsManagement
import org.mozilla.fenix.GleanMetrics.ErrorPage
import org.mozilla.fenix.GleanMetrics.Events
import org.mozilla.fenix.GleanMetrics.ExperimentsDefaultBrowser
import org.mozilla.fenix.GleanMetrics.FindInPage
import org.mozilla.fenix.GleanMetrics.History
import org.mozilla.fenix.GleanMetrics.HomeMenu
import org.mozilla.fenix.GleanMetrics.HomeScreen
import org.mozilla.fenix.GleanMetrics.LoginDialog
import org.mozilla.fenix.GleanMetrics.Logins
import org.mozilla.fenix.GleanMetrics.MasterPassword
import org.mozilla.fenix.GleanMetrics.MediaNotification
import org.mozilla.fenix.GleanMetrics.MediaState
import org.mozilla.fenix.GleanMetrics.Metrics
import org.mozilla.fenix.GleanMetrics.Onboarding
import org.mozilla.fenix.GleanMetrics.Pings
import org.mozilla.fenix.GleanMetrics.Pocket
import org.mozilla.fenix.GleanMetrics.PrivateBrowsingMode
import org.mozilla.fenix.GleanMetrics.PrivateBrowsingShortcut
import org.mozilla.fenix.GleanMetrics.ProgressiveWebApp
import org.mozilla.fenix.GleanMetrics.ReaderMode
import org.mozilla.fenix.GleanMetrics.RecentTabs
import org.mozilla.fenix.GleanMetrics.SearchShortcuts
import org.mozilla.fenix.GleanMetrics.SearchSuggestions
import org.mozilla.fenix.GleanMetrics.SearchWidget
import org.mozilla.fenix.GleanMetrics.SetDefaultNewtabExperiment
import org.mozilla.fenix.GleanMetrics.SetDefaultSettingExperiment
@ -60,11 +50,9 @@ import org.mozilla.fenix.GleanMetrics.SyncedTabs
import org.mozilla.fenix.GleanMetrics.Tab
import org.mozilla.fenix.GleanMetrics.Tabs
import org.mozilla.fenix.GleanMetrics.TabsTray
import org.mozilla.fenix.GleanMetrics.Tip
import org.mozilla.fenix.GleanMetrics.ToolbarSettings
import org.mozilla.fenix.GleanMetrics.TopSites
import org.mozilla.fenix.GleanMetrics.TrackingProtection
import org.mozilla.fenix.GleanMetrics.UserSpecifiedSearchEngines
import org.mozilla.fenix.GleanMetrics.VoiceSearch
import org.mozilla.fenix.ext.components
@ -161,15 +149,6 @@ private val Event.wrapper: EventWrapper<*>?
is Event.LoginDialogPromptNeverSave -> EventWrapper<NoExtraKeys>(
{ LoginDialog.neverSave.record(it) }
)
is Event.FindInPageOpened -> EventWrapper<NoExtraKeys>(
{ FindInPage.opened.record(it) }
)
is Event.FindInPageClosed -> EventWrapper<NoExtraKeys>(
{ FindInPage.closed.record(it) }
)
is Event.FindInPageSearchCommitted -> EventWrapper<NoExtraKeys>(
{ FindInPage.searchedPage.record(it) }
)
is Event.ContextMenuItemTapped -> EventWrapper(
{ ContextMenu.itemTapped.record(it) },
{ ContextMenu.itemTappedKeys.valueOf(it) }
@ -245,9 +224,6 @@ private val Event.wrapper: EventWrapper<*>?
is Event.CustomTabsClosed -> EventWrapper<NoExtraKeys>(
{ CustomTab.closed.record(it) }
)
is Event.UriOpened -> EventWrapper<NoExtraKeys>(
{ Events.totalUriCount.add(1) }
)
is Event.NormalAndPrivateUriOpened -> EventWrapper<NoExtraKeys>(
{ Events.normalAndPrivateUriCount.add(1) }
)
@ -391,30 +367,6 @@ private val Event.wrapper: EventWrapper<*>?
is Event.SearchWidgetVoiceSearchPressed -> EventWrapper<NoExtraKeys>(
{ SearchWidget.voiceButton.record(it) }
)
is Event.PrivateBrowsingSnackbarUndoTapped -> EventWrapper<NoExtraKeys>(
{ PrivateBrowsingMode.snackbarUndo.record(it) }
)
is Event.PrivateBrowsingNotificationTapped -> EventWrapper<NoExtraKeys>(
{ PrivateBrowsingMode.notificationTapped.record(it) }
)
is Event.PrivateBrowsingCreateShortcut -> EventWrapper<NoExtraKeys>(
{ PrivateBrowsingShortcut.createShortcut.record(it) }
)
is Event.PrivateBrowsingAddShortcutCFR -> EventWrapper<NoExtraKeys>(
{ PrivateBrowsingShortcut.cfrAddShortcut.record(it) }
)
is Event.PrivateBrowsingCancelCFR -> EventWrapper<NoExtraKeys>(
{ PrivateBrowsingShortcut.cfrCancel.record(it) }
)
is Event.PrivateBrowsingPinnedShortcutPrivateTab -> EventWrapper<NoExtraKeys>(
{ PrivateBrowsingShortcut.pinnedShortcutPriv.record(it) }
)
is Event.PrivateBrowsingStaticShortcutTab -> EventWrapper<NoExtraKeys>(
{ PrivateBrowsingShortcut.staticShortcutTab.record(it) }
)
is Event.PrivateBrowsingStaticShortcutPrivateTab -> EventWrapper<NoExtraKeys>(
{ PrivateBrowsingShortcut.staticShortcutPriv.record(it) }
)
is Event.WhatsNewTapped -> EventWrapper<NoExtraKeys>(
{ Events.whatsNewTapped.record(it) }
)
@ -439,39 +391,6 @@ private val Event.wrapper: EventWrapper<*>?
is Event.MediaPictureInPictureState -> EventWrapper<NoExtraKeys>(
{ MediaState.pictureInPicture.record(it) }
)
is Event.InAppNotificationDownloadOpen -> EventWrapper<NoExtraKeys>(
{ DownloadNotification.inAppOpen.record(it) }
)
is Event.InAppNotificationDownloadTryAgain -> EventWrapper<NoExtraKeys>(
{ DownloadNotification.inAppTryAgain.record(it) }
)
is Event.NotificationDownloadCancel -> EventWrapper<NoExtraKeys>(
{ DownloadNotification.cancel.record(it) }
)
is Event.NotificationDownloadOpen -> EventWrapper<NoExtraKeys>(
{ DownloadNotification.open.record(it) }
)
is Event.NotificationDownloadPause -> EventWrapper<NoExtraKeys>(
{ DownloadNotification.pause.record(it) }
)
is Event.NotificationDownloadResume -> EventWrapper<NoExtraKeys>(
{ DownloadNotification.resume.record(it) }
)
is Event.NotificationDownloadTryAgain -> EventWrapper<NoExtraKeys>(
{ DownloadNotification.tryAgain.record(it) }
)
is Event.DownloadAdded -> EventWrapper<NoExtraKeys>(
{ DownloadsMisc.downloadAdded.record(it) }
)
is Event.DownloadsScreenOpened -> EventWrapper<NoExtraKeys>(
{ DownloadsManagement.downloadsScreenOpened.record(it) }
)
is Event.DownloadsItemOpened -> EventWrapper<NoExtraKeys>(
{ DownloadsManagement.itemOpened.record(it) }
)
is Event.DownloadsItemDeleted -> EventWrapper<NoExtraKeys>(
{ DownloadsManagement.itemDeleted.record(it) }
)
is Event.NotificationMediaPlay -> EventWrapper<NoExtraKeys>(
{ MediaNotification.play.record(it) }
)
@ -522,19 +441,10 @@ private val Event.wrapper: EventWrapper<*>?
is Event.EditLoginSave -> EventWrapper<NoExtraKeys>(
{ Logins.saveEditedLogin.record(it) }
)
is Event.PrivateBrowsingShowSearchSuggestions -> EventWrapper<NoExtraKeys>(
{ SearchSuggestions.enableInPrivate.record(it) }
)
is Event.ToolbarPositionChanged -> EventWrapper(
{ ToolbarSettings.changedPosition.record(it) },
{ ToolbarSettings.changedPositionKeys.valueOf(it) }
)
is Event.CustomEngineAdded -> EventWrapper<NoExtraKeys>(
{ UserSpecifiedSearchEngines.customEngineAdded.record(it) }
)
is Event.CustomEngineDeleted -> EventWrapper<NoExtraKeys>(
{ UserSpecifiedSearchEngines.customEngineDeleted.record(it) }
)
is Event.SaveLoginsSettingChanged -> EventWrapper(
{ Logins.saveLoginsSettingChanged.record(it) },
{ Logins.saveLoginsSettingChangedKeys.valueOf(it) }
@ -568,12 +478,6 @@ private val Event.wrapper: EventWrapper<*>?
{ TopSites.swipeCarousel.record(it) },
{ TopSites.swipeCarouselKeys.valueOf(it) }
)
is Event.SupportTapped -> EventWrapper<NoExtraKeys>(
{ AboutPage.supportTapped.record(it) }
)
is Event.PrivacyNoticeTapped -> EventWrapper<NoExtraKeys>(
{ AboutPage.privacyNoticeTapped.record(it) }
)
is Event.PocketTopSiteClicked -> EventWrapper<NoExtraKeys>(
{ Pocket.pocketTopSiteClicked.record(it) }
)
@ -595,18 +499,6 @@ private val Event.wrapper: EventWrapper<*>?
{ Addons.openAddonSetting.record(it) },
{ Addons.openAddonSettingKeys.valueOf(it) }
)
is Event.TipDisplayed -> EventWrapper(
{ Tip.displayed.record(it) },
{ Tip.displayedKeys.valueOf(it) }
)
is Event.TipPressed -> EventWrapper(
{ Tip.pressed.record(it) },
{ Tip.pressedKeys.valueOf(it) }
)
is Event.TipClosed -> EventWrapper(
{ Tip.closed.record(it) },
{ Tip.closedKeys.valueOf(it) }
)
is Event.VoiceSearchTapped -> EventWrapper<NoExtraKeys>(
{ VoiceSearch.tapped.record(it) }
)
@ -730,12 +622,6 @@ private val Event.wrapper: EventWrapper<*>?
{ Events.recentlyClosedTabsOpened.record(it) }
)
is Event.MasterPasswordMigrationDisplayed -> EventWrapper<NoExtraKeys>(
{ MasterPassword.displayed.record(it) }
)
is Event.MasterPasswordMigrationSuccess -> EventWrapper<NoExtraKeys>(
{ MasterPassword.migration.record(it) }
)
is Event.TabSettingsOpened -> EventWrapper<NoExtraKeys>(
{ Tabs.settingOpened.record(it) }
)
@ -757,15 +643,6 @@ private val Event.wrapper: EventWrapper<*>?
Event.HaveNoOpenTabs -> EventWrapper<NoExtraKeys>(
{ Metrics.hasOpenTabs.set(false) }
)
is Event.BannerOpenInAppDisplayed -> EventWrapper<NoExtraKeys>(
{ BannerOpenInApp.displayed.record(it) }
)
is Event.BannerOpenInAppDismissed -> EventWrapper<NoExtraKeys>(
{ BannerOpenInApp.dismissed.record(it) }
)
is Event.BannerOpenInAppGoToSettings -> EventWrapper<NoExtraKeys>(
{ BannerOpenInApp.goToSettings.record(it) }
)
is Event.SyncedTabSuggestionClicked -> EventWrapper<NoExtraKeys>(
{ SyncedTabs.syncedTabsSuggestionClicked.record(it) }
)

@ -18,8 +18,6 @@ import mozilla.components.feature.awesomebar.provider.SearchSuggestionProvider
import mozilla.components.feature.awesomebar.provider.SessionSuggestionProvider
import mozilla.components.feature.contextmenu.facts.ContextMenuFacts
import mozilla.components.feature.customtabs.CustomTabsFacts
import mozilla.components.feature.downloads.facts.DownloadsFacts
import mozilla.components.feature.findinpage.facts.FindInPageFacts
import mozilla.components.feature.media.facts.MediaFacts
import mozilla.components.feature.prompts.facts.LoginDialogFacts
import mozilla.components.feature.pwa.ProgressiveWebAppFacts
@ -165,8 +163,6 @@ internal class ReleaseMetricController(
Component.FEATURE_PROMPTS to LoginDialogFacts.Items.NEVER_SAVE -> Event.LoginDialogPromptNeverSave
Component.FEATURE_PROMPTS to LoginDialogFacts.Items.SAVE -> Event.LoginDialogPromptSave
Component.FEATURE_FINDINPAGE to FindInPageFacts.Items.CLOSE -> Event.FindInPageClosed
Component.FEATURE_FINDINPAGE to FindInPageFacts.Items.INPUT -> Event.FindInPageSearchCommitted
Component.FEATURE_CONTEXTMENU to ContextMenuFacts.Items.ITEM -> {
metadata?.get("item")?.let { Event.ContextMenuItemTapped.create(it.toString()) }
}
@ -189,17 +185,6 @@ internal class ReleaseMetricController(
Component.FEATURE_CUSTOMTABS to CustomTabsFacts.Items.CLOSE -> Event.CustomTabsClosed
Component.FEATURE_CUSTOMTABS to CustomTabsFacts.Items.ACTION_BUTTON -> Event.CustomTabsActionTapped
Component.FEATURE_DOWNLOADS to DownloadsFacts.Items.NOTIFICATION -> {
when (action) {
Action.CANCEL -> Event.NotificationDownloadCancel
Action.OPEN -> Event.NotificationDownloadOpen
Action.PAUSE -> Event.NotificationDownloadPause
Action.RESUME -> Event.NotificationDownloadResume
Action.TRY_AGAIN -> Event.NotificationDownloadTryAgain
else -> null
}
}
Component.FEATURE_MEDIA to MediaFacts.Items.NOTIFICATION -> {
when (action) {
Action.PLAY -> Event.NotificationMediaPlay

@ -27,12 +27,10 @@ import mozilla.components.service.sync.logins.toLogin
import mozilla.components.support.migration.FennecLoginsMPImporter
import mozilla.components.support.migration.FennecProfile
import org.mozilla.fenix.R
import org.mozilla.fenix.components.metrics.Event
import org.mozilla.fenix.components.tips.Tip
import org.mozilla.fenix.components.tips.TipProvider
import org.mozilla.fenix.components.tips.TipType
import org.mozilla.fenix.ext.components
import org.mozilla.fenix.ext.metrics
import org.mozilla.fenix.ext.settings
/**
@ -87,8 +85,6 @@ class MasterPasswordTipProvider(
val dialog = dialogBuilder.show()
context.metrics.track(Event.MasterPasswordMigrationDisplayed)
val passwordErrorText = context.getString(R.string.mp_dialog_error_transfer_saved_logins)
val migrationContinueButton =
dialogView.findViewById<MaterialButton>(R.id.migration_continue).apply {
@ -216,8 +212,6 @@ class MasterPasswordTipProvider(
private fun dismissMPTip() {
tip?.let {
context.metrics.track(Event.TipClosed(it.identifier))
context.components.settings.preferences
.edit()
.putBoolean(it.identifier, false)
@ -230,8 +224,6 @@ class MasterPasswordTipProvider(
private fun showSuccessDialog() {
dismissMPTip()
context.metrics.track(Event.MasterPasswordMigrationSuccess)
val dialogView =
LayoutInflater.from(context).inflate(R.layout.mp_migration_done_dialog, null)

@ -297,7 +297,6 @@ class DefaultBrowserToolbarMenuController(
}
is ToolbarMenu.Item.FindInPage -> {
findInPageLauncher()
metrics.track(Event.FindInPageOpened)
}
is ToolbarMenu.Item.AddonsManager -> browserAnimator.captureEngineViewAndDrawStatically {
navController.nav(

@ -15,9 +15,6 @@ import mozilla.components.browser.state.state.content.DownloadState
import mozilla.components.feature.downloads.AbstractFetchDownloadService
import mozilla.components.feature.downloads.toMegabyteOrKilobyteString
import org.mozilla.fenix.R
import org.mozilla.fenix.components.metrics.Event
import org.mozilla.fenix.components.metrics.MetricController
import org.mozilla.fenix.ext.metrics
import org.mozilla.fenix.ext.settings
/**
@ -29,7 +26,6 @@ import org.mozilla.fenix.ext.settings
class DynamicDownloadDialog(
private val container: ViewGroup,
private val downloadState: DownloadState?,
private val metrics: MetricController,
private val didFail: Boolean,
private val tryAgain: (String) -> Unit,
private val onCannotOpenFile: (DownloadState) -> Unit,
@ -83,7 +79,6 @@ class DynamicDownloadDialog(
)
setOnClickListener {
tryAgain(downloadState.id)
context.metrics.track(Event.InAppNotificationDownloadTryAgain)
dismiss(view)
}
}
@ -103,8 +98,6 @@ class DynamicDownloadDialog(
mozilla.components.feature.downloads.R.string.mozac_feature_downloads_button_open
)
setOnClickListener {
metrics.track(Event.DownloadsItemOpened)
val fileWasOpened = AbstractFetchDownloadService.openFile(
applicationContext = context.applicationContext,
download = downloadState
@ -114,7 +107,6 @@ class DynamicDownloadDialog(
onCannotOpenFile(downloadState)
}
context.metrics.track(Event.InAppNotificationDownloadOpen)
dismiss(view)
}
}

@ -775,14 +775,12 @@ class HomeFragment : Fragment() {
)
layout.findViewById<Button>(R.id.cfr_pos_button).apply {
setOnClickListener {
context.metrics.track(Event.PrivateBrowsingAddShortcutCFR)
PrivateShortcutCreateManager.createPrivateShortcut(context)
privateBrowsingRecommend.dismiss()
}
}
layout.findViewById<Button>(R.id.cfr_neg_button).apply {
setOnClickListener {
context.metrics.track(Event.PrivateBrowsingCancelCFR)
privateBrowsingRecommend.dismiss()
}
}

@ -30,16 +30,9 @@ class StartSearchIntentProcessor(
metrics.track(Event.SearchWidgetNewTabPressed)
Event.PerformedSearch.SearchAccessPoint.WIDGET
}
STATIC_SHORTCUT_NEW_TAB -> {
metrics.track(Event.PrivateBrowsingStaticShortcutTab)
Event.PerformedSearch.SearchAccessPoint.SHORTCUT
}
STATIC_SHORTCUT_NEW_PRIVATE_TAB -> {
metrics.track(Event.PrivateBrowsingStaticShortcutPrivateTab)
Event.PerformedSearch.SearchAccessPoint.SHORTCUT
}
STATIC_SHORTCUT_NEW_TAB,
STATIC_SHORTCUT_NEW_PRIVATE_TAB,
PRIVATE_BROWSING_PINNED_SHORTCUT -> {
metrics.track(Event.PrivateBrowsingPinnedShortcutPrivateTab)
Event.PerformedSearch.SearchAccessPoint.SHORTCUT
}
else -> null

@ -9,8 +9,6 @@ import androidx.core.view.isVisible
import org.mozilla.fenix.BrowserDirection
import org.mozilla.fenix.HomeActivity
import org.mozilla.fenix.R
import org.mozilla.fenix.components.metrics.Event
import org.mozilla.fenix.components.metrics.MetricController
import org.mozilla.fenix.components.tips.Tip
import org.mozilla.fenix.components.tips.TipType
import org.mozilla.fenix.databinding.ButtonTipItemBinding
@ -23,7 +21,6 @@ import org.mozilla.fenix.utils.view.ViewHolder
class ButtonTipViewHolder(
private val view: View,
private val interactor: SessionControlInteractor,
private val metrics: MetricController = view.context.components.analytics.metrics,
private val settings: Settings = view.context.components.settings
) : ViewHolder(view) {
@ -35,8 +32,6 @@ class ButtonTipViewHolder(
this.tip = tip
metrics.track(Event.TipDisplayed(tip.identifier))
with(binding) {
tipHeaderText.text = tip.title
tip.titleDrawable?.let {
@ -60,12 +55,9 @@ class ButtonTipViewHolder(
tipButton.setOnClickListener {
tip.type.action.invoke()
metrics.track(Event.TipPressed(tip.identifier))
}
tipClose.setOnClickListener {
metrics.track(Event.TipClosed(tip.identifier))
settings.preferences
.edit()
.putBoolean(tip.identifier, false)

@ -32,8 +32,6 @@ import org.mozilla.fenix.R
import org.mozilla.fenix.addons.showSnackBar
import org.mozilla.fenix.browser.browsingmode.BrowsingMode
import org.mozilla.fenix.components.StoreProvider
import org.mozilla.fenix.components.metrics.Event
import org.mozilla.fenix.components.metrics.MetricController
import org.mozilla.fenix.databinding.FragmentDownloadsBinding
import org.mozilla.fenix.ext.components
import org.mozilla.fenix.ext.filterNotExistsOnDisk
@ -48,7 +46,6 @@ class DownloadFragment : LibraryPageFragment<DownloadItem>(), UserInteractionHan
private lateinit var downloadStore: DownloadFragmentStore
private lateinit var downloadView: DownloadView
private lateinit var downloadInteractor: DownloadInteractor
private lateinit var metrics: MetricController
private var undoScope: CoroutineScope? = null
private var pendingDownloadDeletionJob: (suspend () -> Unit)? = null
private lateinit var downloadsUseCases: DownloadsUseCases
@ -128,13 +125,9 @@ class DownloadFragment : LibraryPageFragment<DownloadItem>(), UserInteractionHan
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setHasOptionsMenu(true)
metrics = requireComponents.analytics.metrics
metrics.track(Event.DownloadsScreenOpened)
}
private fun displayDeleteAll() {
metrics.track(Event.DownloadsItemDeleted)
activity?.let { activity ->
AlertDialog.Builder(activity).apply {
setMessage(R.string.download_delete_all_dialog)
@ -166,8 +159,6 @@ class DownloadFragment : LibraryPageFragment<DownloadItem>(), UserInteractionHan
* (itemView.overflow_menu) this [items].size() will be 1.
*/
private fun deleteDownloadItems(items: Set<DownloadItem>) {
metrics.track(Event.DownloadsItemDeleted)
updatePendingDownloadToDelete(items)
undoScope = CoroutineScope(IO)
undoScope?.allowUndo(
@ -276,8 +267,6 @@ class DownloadFragment : LibraryPageFragment<DownloadItem>(), UserInteractionHan
)
)
}
metrics.track(Event.DownloadsItemOpened)
}
/**

@ -314,7 +314,6 @@ class SearchDialogFragment : AppCompatDialogFragment(), UserInteractionHandler {
}
store.dispatch(SearchFragmentAction.SetShowSearchSuggestions(true))
store.dispatch(SearchFragmentAction.AllowSearchSuggestionsInPrivateModePrompt(false))
requireComponents.analytics.metrics.track(Event.PrivateBrowsingShowSearchSuggestions)
}
inflated.dismiss.setOnClickListener {

@ -13,9 +13,7 @@ import mozilla.components.browser.state.store.BrowserStore
import mozilla.components.feature.privatemode.notification.AbstractPrivateNotificationService
import org.mozilla.fenix.HomeActivity
import org.mozilla.fenix.R
import org.mozilla.fenix.components.metrics.Event
import org.mozilla.fenix.ext.components
import org.mozilla.fenix.ext.metrics
import java.util.Locale
/**
@ -66,8 +64,6 @@ class PrivateNotificationService : AbstractPrivateNotificationService() {
// as otherwise SessionManager and the store will be out of sync.
components.useCases.tabsUseCases.removePrivateTabs()
metrics.track(Event.PrivateBrowsingNotificationTapped)
// If the app is in private mode we launch to the private mode home screen as a
// confirmation that all private tabs have been deleted. If we don't do this the user
// will end up on a new selected tab in normal mode which isn't desired.

@ -12,8 +12,6 @@ import androidx.preference.SwitchPreference
import org.mozilla.fenix.HomeActivity
import org.mozilla.fenix.R
import org.mozilla.fenix.components.PrivateShortcutCreateManager
import org.mozilla.fenix.components.metrics.Event
import org.mozilla.fenix.ext.metrics
import org.mozilla.fenix.ext.settings
import org.mozilla.fenix.ext.showToolbar
@ -34,7 +32,6 @@ class PrivateBrowsingFragment : PreferenceFragmentCompat() {
private fun updatePreferences() {
requirePreference<Preference>(R.string.pref_key_add_private_browsing_shortcut).apply {
setOnPreferenceClickListener {
requireContext().metrics.track(Event.PrivateBrowsingCreateShortcut)
PrivateShortcutCreateManager.createPrivateShortcut(requireContext())
true
}

@ -198,13 +198,7 @@ class AboutFragment : Fragment(), AboutPageListener {
WhatsNew.userViewedWhatsNew(requireContext())
requireComponents.analytics.metrics.track(Event.WhatsNewTapped)
}
SUPPORT -> {
requireComponents.analytics.metrics.track(Event.SupportTapped)
}
PRIVACY_NOTICE -> {
requireComponents.analytics.metrics.track(Event.PrivacyNoticeTapped)
}
LICENSING_INFO, RIGHTS -> {} // no telemetry needed
SUPPORT, PRIVACY_NOTICE, LICENSING_INFO, RIGHTS -> {} // no telemetry needed
}
openLinkInNormalTab(item.url)

@ -32,7 +32,6 @@ import org.mozilla.fenix.BrowserDirection
import org.mozilla.fenix.HomeActivity
import org.mozilla.fenix.R
import org.mozilla.fenix.components.FenixSnackbar
import org.mozilla.fenix.components.metrics.Event
import org.mozilla.fenix.databinding.CustomSearchEngineBinding
import org.mozilla.fenix.databinding.CustomSearchEngineRadioButtonBinding
import org.mozilla.fenix.databinding.FragmentAddSearchEngineBinding
@ -193,8 +192,6 @@ class AddSearchEngineFragment :
.setText(successMessage)
.show()
}
context?.components?.analytics?.metrics?.track(Event.CustomEngineAdded)
findNavController().popBackStack()
}
}

@ -51,17 +51,11 @@ class TelemetryMiddleware(
context.state.findTab(action.sessionId)?.let { tab ->
// Record UriOpened event when a non-private page finishes loading
if (tab.content.loading && !action.loading) {
if (!tab.content.private) {
metrics.track(Event.UriOpened)
}
metrics.track(Event.NormalAndPrivateUriOpened)
}
}
}
is DownloadAction.AddDownloadAction -> {
metrics.track(Event.DownloadAdded)
}
is DownloadAction.AddDownloadAction -> { /* NOOP */ }
is EngineAction.KillEngineSessionAction -> {
val tab = context.state.findTabOrCustomTab(action.tabId)
onEngineSessionKilled(context.state, tab)

@ -11,9 +11,7 @@ import androidx.lifecycle.LifecycleOwner
import androidx.lifecycle.LifecycleRegistry
import androidx.navigation.NavController
import io.mockk.every
import io.mockk.just
import io.mockk.mockk
import io.mockk.runs
import io.mockk.spyk
import io.mockk.verify
import kotlinx.coroutines.ExperimentalCoroutinesApi
@ -34,7 +32,6 @@ import org.junit.Rule
import org.junit.Test
import org.junit.runner.RunWith
import org.mozilla.fenix.browser.infobanner.DynamicInfoBanner
import org.mozilla.fenix.ext.components
import org.mozilla.fenix.helpers.FenixRobolectricTestRunner
import org.mozilla.fenix.utils.Settings
@ -149,7 +146,7 @@ class OpenInAppOnboardingObserverTest {
every { settings.openLinksInExternalApp } returns false
every { settings.shouldShowOpenInAppCfr } returns true
every { appLinksUseCases.appLinkRedirect.invoke(any()).hasExternalApp() } returns true
every { context.components.analytics.metrics.track(any()) } just runs
store.dispatch(ContentAction.UpdateLoadingStateAction("1", true)).joinBlocking()
openInAppOnboardingObserver.start()

@ -509,7 +509,6 @@ class DefaultBrowserToolbarMenuControllerTest {
controller.handleToolbarItemInteraction(item)
assertTrue(launcherInvoked)
verify { metrics.track(Event.FindInPageOpened) }
}
@Test

@ -25,8 +25,6 @@ import org.junit.Test
import org.junit.runner.RunWith
import org.mozilla.fenix.BrowserDirection
import org.mozilla.fenix.HomeActivity
import org.mozilla.fenix.components.metrics.Event
import org.mozilla.fenix.components.metrics.MetricController
import org.mozilla.fenix.components.tips.Tip
import org.mozilla.fenix.components.tips.TipType
import org.mozilla.fenix.helpers.FenixRobolectricTestRunner
@ -38,7 +36,6 @@ class ButtonTipViewHolderTest {
@MockK private lateinit var activity: HomeActivity
@MockK private lateinit var interactor: SessionControlInteractor
@MockK(relaxed = true) private lateinit var metrics: MetricController
@MockK private lateinit var settings: Settings
@MockK private lateinit var sharedPrefs: SharedPreferences
@MockK private lateinit var sharedPrefsEditor: SharedPreferences.Editor
@ -52,7 +49,7 @@ class ButtonTipViewHolderTest {
.inflate(ButtonTipViewHolder.LAYOUT_ID, null)
)
viewHolder = ButtonTipViewHolder(view, interactor, metrics, settings)
viewHolder = ButtonTipViewHolder(view, interactor, settings)
every { view.context } returns activity
every { activity.openToBrowserAndLoad(any(), any(), any()) } just Runs
every { interactor.onCloseTip(any()) } just Runs
@ -69,8 +66,6 @@ class ButtonTipViewHolderTest {
assertEquals("Tip Title", viewHolder.tip_header_text.text)
assertEquals("Tip description", viewHolder.tip_description_text.text)
assertEquals("button", viewHolder.tip_button.text)
verify { metrics.track(Event.TipDisplayed("tipIdentifier")) }
}
@Test
@ -103,7 +98,6 @@ class ButtonTipViewHolderTest {
viewHolder.tip_button.performClick()
verify { action() }
verify { metrics.track(Event.TipPressed("tipIdentifier")) }
}
@Test
@ -113,7 +107,6 @@ class ButtonTipViewHolderTest {
viewHolder.tip_close.performClick()
verify { interactor.onCloseTip(tip) }
verify { metrics.track(Event.TipClosed("tipIdentifier")) }
verify { sharedPrefsEditor.putBoolean("tipIdentifier", false) }
}

@ -11,7 +11,6 @@ import kotlinx.coroutines.ExperimentalCoroutinesApi
import kotlinx.coroutines.test.TestCoroutineDispatcher
import mozilla.components.browser.state.engine.EngineMiddleware
import mozilla.components.browser.state.action.ContentAction
import mozilla.components.browser.state.action.DownloadAction
import mozilla.components.browser.state.action.EngineAction
import mozilla.components.browser.state.action.TabListAction
import mozilla.components.browser.state.state.BrowserState
@ -179,38 +178,27 @@ class TelemetryMiddlewareTest {
}
@Test
fun `GIVEN a page is loading WHEN loading is complete THEN we record a UriOpened event`() {
fun `GIVEN a normal page is loading WHEN loading is complete THEN we record a UriOpened event`() {
val tab = createTab(id = "1", url = "https://mozilla.org")
store.dispatch(TabListAction.AddTabAction(tab)).joinBlocking()
store.dispatch(ContentAction.UpdateLoadingStateAction(tab.id, true)).joinBlocking()
verify(exactly = 0) { metrics.track(Event.UriOpened) }
verify(exactly = 0) { metrics.track(Event.NormalAndPrivateUriOpened) }
store.dispatch(ContentAction.UpdateLoadingStateAction(tab.id, false)).joinBlocking()
verify(exactly = 1) { metrics.track(Event.UriOpened) }
verify(exactly = 1) { metrics.track(Event.NormalAndPrivateUriOpened) }
}
@Test
fun `GIVEN a private page is loading WHEN loading is complete THEN we never record a UriOpened event`() {
fun `GIVEN a private page is loading WHEN loading is complete THEN we record a UriOpened event`() {
val tab = createTab(id = "1", url = "https://mozilla.org", private = true)
store.dispatch(TabListAction.AddTabAction(tab)).joinBlocking()
store.dispatch(ContentAction.UpdateLoadingStateAction(tab.id, true)).joinBlocking()
verify(exactly = 0) { metrics.track(Event.UriOpened) }
verify(exactly = 0) { metrics.track(Event.NormalAndPrivateUriOpened) }
store.dispatch(ContentAction.UpdateLoadingStateAction(tab.id, false)).joinBlocking()
verify(exactly = 0) { metrics.track(Event.UriOpened) }
verify(exactly = 1) { metrics.track(Event.NormalAndPrivateUriOpened) }
}
@Test
fun `WHEN a download is added THEN the downloads count is updated`() {
store.dispatch(DownloadAction.AddDownloadAction(mock())).joinBlocking()
verify { metrics.track(Event.DownloadAdded) }
}
@Test
fun `WHEN foreground tab getting killed THEN middleware counts it`() {
store.dispatch(

Loading…
Cancel
Save