Closed Bug 1923902 Opened 1 year ago Closed 10 months ago

Add settings toggle for Focus DAU ping

Categories

(Focus :: General, enhancement, P1)

Desktop
All
enhancement

Tracking

(firefox135 wontfix, firefox136 fixed)

RESOLVED FIXED
135 Branch
Tracking Status
firefox135 --- wontfix
firefox136 --- fixed

People

(Reporter: polly, Assigned: polly)

References

Details

Attachments

(9 files)

For the additional DAU ping we will want a separate settings toggle that controls whether it is uploaded.

When we add this, we must make sure that for any users that have already disabled telemetry, the new ping is also disabled.

Content design for this work has not been finalized so this part is not actionable as yet.

Client apps will need to generate and store a new dau_id for the lifetime of the app.

Steps:

  • add a new usage:profile_id metric to fenix/app/metrics.yaml ("the dau id")
  • on first launch of the app when Glean is initialised, call Usage.profileId.generateAndSet() and save the returned dau id string in a Preference
  • on subsequent launches of the app:
    -- if upload is enabled, retrieve the DAU id value from the preference and call Usage.profileId.set(id)
    -- if upload is disabled, unset the DAU id

When the DAU checkbox is toggled:

  • ON: generate and set the dau id & store in preference
  • OFF: unset the dau id

NB unsetting the dau id is achieved by setting the UUID to a canary value: Usage.profileId.set('beefbeef-beef-beef-beef-beeefbeefbee')

Summary: Add settings toggle for DAU ping → Add settings toggle for Focus DAU ping
Depends on: 1923842
No longer depends on: 1921220
Severity: -- → N/A
Type: defect → task
Priority: -- → P1
Type: task → enhancement
See Also: → 1921220
Assignee: nobody → polly
Attachment #9438821 - Attachment description: WIP: Bug 1923902: add focus glean usage profile id → Bug 1923902: add focus glean usage profile id
Status: NEW → ASSIGNED
Attachment #9438821 - Attachment description: Bug 1923902: add focus glean usage profile id → WIP: Bug 1923902: add focus glean usage profile id
Attachment #9438821 - Attachment description: WIP: Bug 1923902: add focus glean usage profile id → Bug 1923902: add focus glean usage profile id
Group: mozilla-employee-confidential
Pushed by pmceldowney@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/4f2e5a05f5c2 add focus glean usage profile id r=android-reviewers,data-stewards,TravisLong,tthibaud
Backout by abutkovits@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/345b870dbfb0 Backed out changeset 4f2e5a05f5c2 for causing failures at GleanMetricsServiceTest. CLOSED TREE
Pushed by pmceldowney@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/4b81dcd11535 add focus glean usage profile id r=android-reviewers,data-stewards,TravisLong,tthibaud
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 135 Branch

reopening because the ping is in but the switch part still needs doing

Status: RESOLVED → REOPENED
Flags: needinfo?(polly)
Resolution: FIXED → ---
Assignee: polly → nobody
Assignee: nobody → polly

Set values for duration, os, os version, app display version and app channel.
Also pulled out the glean specific calls behind an interface for easier unit testing of the lifecycle observer actions.

This adds a new "daily usage ping" switch to the settings page and uses it to control whether or not the daily usage ping is sent. (Previously, the main telemetry switch was used.) The new switch's state defaults to the value of the main telemetry switch.

Attachment #9461302 - Attachment description: WIP: Bug 1923902: add switch for glean daily usage ping. → Bug 1923902: add switch for glean daily usage ping.
Attachment #9461302 - Attachment description: Bug 1923902: add switch for glean daily usage ping. → Bug 1923902: add switch for focus daily usage ping.
Attachment #9461248 - Attachment description: Bug 1923902: set the values in the daily usage ping. → Bug 1923902: set the values in the focus daily usage ping.

This means the usage profile id will be set and unset when the usage reporting switch is toggled on and off.

Attachment #9461316 - Attachment description: Bug 1923902: move usage profile id interactions into new separate usage reporting service. → Bug 1923902: move focus usage profile id interactions into new separate usage reporting service.

This has now been replaced by the daily usage ping.

We want to look at the daily usage ping switch and not the old telemetry switch or the studies

Rename method, explain a bit more about the canary value in comments.

Pushed by pmceldowney@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/dca1626f36a0 add fields into focus daily usage ping r=android-reviewers,twhite https://hg.mozilla.org/integration/autoland/rev/4d2054fbaad3 set the values in the focus daily usage ping. r=android-reviewers,twhite https://hg.mozilla.org/integration/autoland/rev/4e3c8926f214 add switch for focus daily usage ping. r=android-reviewers,twhite https://hg.mozilla.org/integration/autoland/rev/6f462603a57a move focus usage profile id interactions into new separate usage reporting service. r=android-reviewers,twhite https://hg.mozilla.org/integration/autoland/rev/4678448e8be6 send data deletion request when focus usage reporting switch is toggled off. r=android-reviewers,tthibaud https://hg.mozilla.org/integration/autoland/rev/5621f33e354b switch off general telemetry and studies r=android-reviewers,tthibaud https://hg.mozilla.org/integration/autoland/rev/190dbb7e0dce update ui tests for new privacy settings r=android-reviewers,tthibaud https://hg.mozilla.org/integration/autoland/rev/53a5a50b2962 tidy up a bit r=android-reviewers,tthibaud
Depends on: 1953027
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: