Closed Bug 1694315 Opened 3 years ago Closed 3 years ago

Add queryContext and details parameters to UrlbarProvider.onEngagement()

Categories

(Firefox :: Address Bar, task, P1)

task
Points:
2

Tracking

()

RESOLVED FIXED
88 Branch
Iteration:
88.1 - Feb 22 - Mar 7
Tracking Status
firefox87 + fixed
firefox88 --- fixed

People

(Reporter: adw, Assigned: adw)

References

Details

Attachments

(1 file)

This would be helpful for implementing telemetry for impressions and clicks.

There are a couple of things that would make collecting engagement telemetry
like impressions and clicks a lot easier: having the query context and details
of the picked result. We need to collect this exact telemetry for the top sites
and quick suggest experiments.

Details of the picked result is easy because there's already a details object
with that info when the controller's telemetry event tells the providers manager
to notify providers of an engagement.

The query context is a little harder, but we can take it from the controller.
It's not guaranteed to be defined at the time that onEngagement is called for
start, so I tried to make that clear in the javadoc. Since it may not be
defined on start, onEngagement still needs the isPrivate param even though
the context also has an isPrivate property.

With this patch, we should be able to record clicks in providers without having
to call pickResult for every provider. pickResult would be the other obvious
place to record picks on results in providers.

Pushed by dwillcoxon@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/247f9f34e799
Add queryContext and details parameters to UrlbarProvider.onEngagement(). r=harry
Flags: qe-verify-
Flags: in-testsuite+

[Tracking Requested - why for this release]:

We need this for the contextual services/quick suggest experiment in 87.

See Also: → 1675567
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 88 Branch

Comment on attachment 9204743 [details]
Bug 1694315 - Add queryContext and details parameters to UrlbarProvider.onEngagement().

Beta/Release Uplift Approval Request

  • User impact if declined: We need this for the contextual services/quick suggest experiment in 87.
  • Is this code covered by automated tests?: Yes
  • Has the fix been verified in Nightly?: No
  • Needs manual test from QE?: No
  • If yes, steps to reproduce:
  • List of other uplifts needed: Bug 1693178
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): This adds a couple of new parameters to a function that's called when the user uses the urlbar. It doesn't affect normal usage. It has test coverage.
  • String changes made/needed:
Attachment #9204743 - Flags: approval-mozilla-beta?

Comment on attachment 9204743 [details]
Bug 1694315 - Add queryContext and details parameters to UrlbarProvider.onEngagement().

Approved for 87.0b3.

Attachment #9204743 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: