the surface displayed probe overcounts in some cases
Categories
(Firefox :: Shopping, defect, P1)
Tracking
()
Tracking | Status | |
---|---|---|
firefox-esr115 | --- | unaffected |
firefox121 | --- | wontfix |
firefox122 | --- | verified |
firefox123 | --- | verified |
People
(Reporter: jhirsch, Assigned: jhirsch)
References
Details
Attachments
(1 file, 2 obsolete files)
48 bytes,
text/x-phabricator-request
|
dmeehan
:
approval-mozilla-beta+
|
Details | Review |
Summary
In certain cases, we have discovered counting errors in the probe that records events when the shopping sidebar is displayed in desktop Firefox (glean.shopping.surfaceDisplayed
). These bugs go back to 119.
We are recording extra incorrect events in the following cases:
- tab switches
- page is displayed with sidebar visible
- user switches tabs
- user then switches back to the page (without reloading the page)
- an extra event is incorrectly recorded
- page loaded in background
- page is loaded in a background tab
- an event is incorrectly recorded immediately, before the user sees the tab
- user opts in
- page is displayed with onboarding shown in the sidebar
- event is recorded
- user opts in, displaying review checker content
- event is incorrectly recorded again
- user opts out, then back in
- page is displayed with sidebar in opted-in state with review checker content
- event is correctly recorded
- user hides the sidebar by clicking "hide review checker" in sidebar settings component
- user re-displays the sidebar by clicking the urlbar button
- event is incorrectly recorded twice
We are correctly recording events in the following cases:
(note, all of these assume the page is loaded in a foregrounded tab)
- page is loaded by entering URL or clicking a link
- page is loaded from session restore
- page is displayed from hitting back/forward buttons
- page is reloaded by the user manually
- page was displayed with sidebar hidden, then the user clicked the urlbar button to show the sidebar
- page was displayed with sidebar visible, then the user closes the sidebar and reopens the sidebar
- accurate if user has not opted in, so onboarding card is shown, and closes the sidebar using the X in the header, the "not now" link in the onboarding card, or the urlbar button
- accurate if the user has opted in and closes the sidebar using the X in the header, but not in the case where the user opts out using the "hide review checker" button in the settings component
- page was displayed with sidebar hidden, then sidebar was made visible by another FF component
- or by flipping prefs in about:config in a different window
- or by nimbus activating the shopping feature for the first time
- (note for future, this is not done now) or by a messaging system callout
Assignee | ||
Comment 1•10 months ago
|
||
[Tracking Requested - why for this release]: We've just discovered a bug in a critical Glean probe and would like to uplift a fix into 121.
Assignee | ||
Updated•10 months ago
|
Updated•10 months ago
|
Assignee | ||
Comment 2•10 months ago
|
||
-
Avoid counting background tab loads by checking if the browser is the selectedBrowser
-
Avoid counting tab switches by passing TabSelect through and dropping those.
- Unfortunately, this means tabs opened in the background, then foregrounded via tab switch, will not get counted.
Still todo:
-
tabs loaded in background, then foregrounded later.
- maybe we set some state on the chrome browser element, and clear it
when the URL changes? sigh
- maybe we set some state on the chrome browser element, and clear it
-
user opts in and we double count
-
user opts out, then in, and we double count
Assignee | ||
Comment 3•10 months ago
|
||
-
Avoid counting background tab loads by setting a flag if a navigation
involves a browser that is not the gBrowser.selectedBrowser. Set a
flag in this case. -
Avoid counting TabSelects unless the background flag is set.
Still todo:
- user opt in/out double count
Updated•10 months ago
|
Updated•10 months ago
|
Assignee | ||
Comment 4•10 months ago
|
||
This can just ride the trains into 122; based on conversations with leadership, we need to iterate further on the review checker experience before it'll roll out further, and the overcounts tracked by this bug don't influence the data enough to merit late uplift into a respin/dot release.
Assignee | ||
Comment 5•9 months ago
|
||
Updated•9 months ago
|
Comment 8•9 months ago
|
||
bugherder |
Comment 9•9 months ago
|
||
The patch landed in nightly and beta is affected.
:jhirsch, is this bug important enough to require an uplift?
- If yes, please nominate the patch for beta approval.
- If no, please set
status-firefox122
towontfix
.
For more information, please visit BugBot documentation.
Assignee | ||
Comment 10•9 months ago
|
||
Comment on attachment 9367376 [details]
Bug 1868602 - Fixes to dedupe shopping surface displayed Glean counts. r?Gijs,perry.mcmanis
Beta/Release Uplift Approval Request
- User impact if declined: This feature is only experimentally exposed to a small percentage of en-US users. This patch corrects some telemetry overcounts so we can more accurately measure the number of pages loaded with the shopping sidebar visible.
- Is this code covered by automated tests?: Yes
- Has the fix been verified in Nightly?: Yes
- Needs manual test from QE?: Yes
- If yes, steps to reproduce: Use the glean debugging tools to verify that the various extra telemetry counts listed in the bug description no longer occur.
- List of other uplifts needed: None
- Risk to taking this patch: Low
- Why is the change risky/not risky? (and alternatives if risky): This is a very small patch that only affects users enrolled in the shopping experiments, which are limited to a very small percentage of en-US users.
- String changes made/needed: None
- Is Android affected?: No
Assignee | ||
Updated•9 months ago
|
Comment 11•9 months ago
|
||
Comment on attachment 9367376 [details]
Bug 1868602 - Fixes to dedupe shopping surface displayed Glean counts. r?Gijs,perry.mcmanis
Approved for 122.0b9
Comment 12•9 months ago
|
||
uplift |
Updated•9 months ago
|
Updated•8 months ago
|
Comment 13•8 months ago
|
||
Verified as fixed in our latest Nightly build 123.0a1 (2024-01-11) and Beta 122.0b9.
Description
•