Bug 1858542 - Introduce `FxSuggestFactsMiddleware`.
This commit builds on bug 1857092 to record impressions for sponsored Firefox Suggest search suggestions, and moves the logic for recording clicks to the same middleware. An impression means, "did the user see a suggestion when they finished engaging with the awesomebar?" A "finished engagement" means the user navigated to a URL, a search results page, or a shown suggestion. We don't record impressions for: * Suggestions that the user sees as they're typing. * Abandoned engagements, when the user dismisses the awesomebar without navigating to a destination. If the user taps on a Firefox Suggest suggestion, we record an impression _and_ a click for that suggestion. If they tap on any other suggestion, or navigate to a URL or search results page, we record an impression only. The new `FxSuggestFactsMiddleware` in this commit observes the `EngagementFinished` action added in the last commit, and emits facts for impressions and clicks. (cherry picked from commit 196e46c25beba770227dde1594034b1275a450e5)fenix/120.0
parent
ae0d46ae91
commit
cf91e990c3
Loading…
Reference in New Issue