Closed Bug 1805827 Opened 1 year ago Closed 1 year ago

Implement weather suggestion exposure telemetry

Categories

(Firefox :: Address Bar, task, P1)

task

Tracking

()

RESOLVED DUPLICATE of bug 1806765

People

(Reporter: adw, Assigned: adw)

References

Details

Attachments

(1 obsolete file)

https://mozilla-hub.atlassian.net/browse/SNT-333

We don't have an easy way to record exposures right now so I've split it off into this bug. Bug 1804536 is for most of the other weather telemetry.

Depends on: 1800810

For Firefox Suggest weather suggestions, we need to record telemetry every time
a suggestion is shown. We've been referring to this type of telemetry as
exposure telemetry.

At first glance that doesn't seem hard because weather suggestions are only
shown in the top-sites view and they have a suggested index, which almost
guarantees they'll always be shown. So the Suggest provider could assume that if
it adds a weather suggestion to a query, it will be visible in the view.

However, that's not true for the same reasons discussed in bug 1800810. The
result may be added to the view but hidden and never made visible, or it may be
added to the query but never to the view. This is true for any type of result,
not only weather suggestions.

This patch adds a new method on providers called onResultsShown() that the
view calls at the end of a query for each provider that had visible results at
the end of the query. With that, it's very simple to correctly implement this
telemetry or anything else that depends on results being shown. (There may
already be existing telemetry or other code that assumes if results are added to
a query they're also visible. We could do an audit and use this if necessary.)

I added a new test called browser_visibleResults.js that tests both
onResultsShown() and visibleResults from bug 1800810. That way we don't need
to test all these various edge cases for each new feature that uses them.

Finally this also adds the exposure telemetry scalar itself for weather
suggestions.

Depends on D164615

Attachment #9308443 - Attachment is obsolete: true

I abandoned my patch here and ended up fixing this in bug 1806765.

Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Duplicate of bug: 1806765
Resolution: --- → DUPLICATE
Blocks: 1815018
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: