Commit Graph

185 Commits

Author SHA1 Message Date
Dale Harvey
543ce47074 Bug 1823543 - Add telemetry to distinguish trending results. r=adw
Differential Revision: https://phabricator.services.mozilla.com/D173093
2023-03-28 13:28:44 +00:00
James Teow
18ca46e947 Bug 1815971 - Count number of times persisted search is viewed and reverted due to Popups - r=adw
Differential Revision: https://phabricator.services.mozilla.com/D172690
2023-03-22 13:59:06 +00:00
Noah
4d055a38ea Bug 1821392 - Change Search and Address Bar telemetry docs to use titles for the probe names. r=Standard8
Differential Revision: https://phabricator.services.mozilla.com/D172203
2023-03-10 12:31:59 +00:00
Drew Willcoxon
f5dc21ef86 Bug 1819797 - Update telemetry for navigational suggestions and dynamic Wikipedia and add subtypes to quick suggest results. r=daleharvey
This adds a bunch of scalars to record navigational suggestions telemetry as
discussed with data science and described in the spec. These scalars are
different from the other Suggest ones because we want to record how nav
suggestions interact with the heuristic result. Unlike the existing scalars, the
keys of these new scalars are the types of heuristics that were shown when a nav
suggestion was or wasn't shown. One of the scalars is updated every time a nav
suggestion is *not* shown, and of course for most users that will be the vast
majority of the time or all the time, so I put all these scalars behind a Nimbus
variable. We'll set the variable to true in the control and treatment branches
of the nav suggestions experiment.

This patch also makes sure nav suggestions are recorded properly in Glean, as
`navigational`. I noticed that dynamic Wikipedia results are currently recorded
as `suggest_non_sponsor`, so I also added a new `dynamic_wikipedia` Glean type
for them. They're also recorded as `urlbar.picked.quicksuggest` in the legacy
telemetry, so I also changed it so they're recorded as
`urlbar.picked.dynamic_wikipedia`.

Currently for dynamic Wikipedia, the non-sponsored scalars are also incremented,
and I discussed with data science whether they and the sponsored scalars should
be incremented for all the new Suggest suggestion types we now have. We agreed
that they should be reserved for the usual partner sponsored and expanded
Wikipedia suggestions, and they should not be used for these new Suggest types,
so this patch also makes that change, and it does not update the non-sponsored
scalars for nav suggestions either.

The other major change this makes is to add a new `subtype` property to quick
suggest result payloads. I think we need a clear, simple way to distinguish
between all these various Suggest suggestion types that doesn't depend on
examining different payload properties depending on the type.

Differential Revision: https://phabricator.services.mozilla.com/D171525
2023-03-08 01:11:02 +00:00
mcheang
b2a902585c Bug 1815699 - Modify existing Glean telemetry and add new telemetry to account for weather as a suggestion. r=adw
This patch modifies existing Glean urlbar abandonment, engagement, and
impression events by including a weather suggestion.

This patch also adds a new telemetry scalar url.picked.weather to the legacy
telemetry system.

Differential Revision: https://phabricator.services.mozilla.com/D169225
2023-03-01 19:06:49 +00:00
Marco Bonardo
da777ff870 Bug 1818881 - Avoid polling for frecency recalcs. r=florian,daisuke
Rather than checking every minute for work to do, use .exchange() to check
if sShouldStartFrecencyRecalculation switches to true and if so dispatch a
runnable to notify PlacesFrecencyRecalculator. The latter sets back
sShouldStartFrecencyRecalculation to false once the recalculation is complete.

Differential Revision: https://phabricator.services.mozilla.com/D171093
2023-02-28 12:57:19 +00:00
Sandor Molnar
3999ccd9bd Backed out changeset 6596733ddc41 (bug 1818881) for causing xpc failures in toolkit/components/search/tests/xpcshell/test_searchSuggest_cookies.js CLOSED TREE 2023-02-28 13:31:40 +02:00
Marco Bonardo
0d632556be Bug 1818881 - Avoid polling for frecency recalcs. r=florian,daisuke
Rather than checking every minute for work to do, use .exchange() to check
if sShouldStartFrecencyRecalculation switches to true and if so dispatch a
runnable to notify PlacesFrecencyRecalculator. The latter sets back
sShouldStartFrecencyRecalculation to false once the recalculation is complete.

Differential Revision: https://phabricator.services.mozilla.com/D171093
2023-02-28 10:11:43 +00:00
Marco Bonardo
4b3b579a88 Bug 1818549 - Update frecency recalculation documentation. r=mcheang
Reformat special values and fields with double backticks.
Add additional details about the recalculation.

Differential Revision: https://phabricator.services.mozilla.com/D170785
2023-02-24 13:50:23 +00:00
Dão Gottwald
081303df7d Bug 1818245 - Consolidate dynamic attribute setting code in UrlbarView. r=adw
Differential Revision: https://phabricator.services.mozilla.com/D170612
2023-02-24 07:16:56 +00:00
Marco Bonardo
40acd19925 Bug 1765552 - Add ranking documentation to Address Bar source docs. r=mcheang
Differential Revision: https://phabricator.services.mozilla.com/D157934
2023-02-22 18:08:47 +00:00
ogiorgis
8180c16c8e Bug 1810702 - remove circular reference warnings r=firefox-source-docs-reviewers,sylvestre DONTBUILD
Moreover it fixes the behavior of the right menu.

Depends on D170178

Differential Revision: https://phabricator.services.mozilla.com/D170179
2023-02-17 12:38:03 +00:00
Daisuke Akatsuka
fa543b9869 Bug 1815342: Take telemetry of the user action that deletes the autofilled string. r=mak
Differential Revision: https://phabricator.services.mozilla.com/D169172
2023-02-09 21:55:22 +00:00
Marco Bonardo
300fb22c66 Bug 1811209 - Add telemetry to measure frecency recalculation. r=daisuke
Add an histogram to measure time to recalculate a chunk, and a scalar to measure
the number of pages that must be recalculated.

Differential Revision: https://phabricator.services.mozilla.com/D169203
2023-02-09 14:38:22 +00:00
Dale Harvey
11f59f385e Bug 1806024 - Add telemetry for QuickAction inpressions. r=adw
Differential Revision: https://phabricator.services.mozilla.com/D166611
2023-02-02 10:12:13 +00:00
Drew Willcoxon
9cb9133500 Bug 1806765 - Implement zero-prefix telemetry and add weather suggestion exposure telemetry. r=dao
This adds telemetry to UrlbarView that records the following things related to
the zero-prefix view (i.e., the topsites view):

* Exposures: How many times the ZP view was shown
* Engagements: How many times a result was picked in the ZP view
* Abandonments: How many times the user abandoned the ZP view
* Dwell time: How long the user was shown the ZP view

I considered adding telemetry specifically for topsites instead of the ZP view
as a whole, but since we have plans to start showing other types of results in
the ZP view, I don't think it's a good idea to rely on one specific type of
result as a proxy for the view itself. What DS and Product want to know about is
the view itself: how many times it was shown, for how long, etc.

This also adds one related scalar related to weather suggestions that counts the
number of times it's shown. This is the same scalar I added in D164778 using a
different, more complex approach.

Depends on D164615

Differential Revision: https://phabricator.services.mozilla.com/D165253
2023-01-06 23:44:19 +00:00
Drew Willcoxon
4f60a88fed Bug 1804536 - Implement telemetry for weather suggestions. r=daleharvey
This adds the following scalars:

* `impression_weather`
* `click_weather`
* `help_weather`
* `block_weather`

And these histograms:

* `FX_URLBAR_MERINO_LATENCY_WEATHER_MS`
* `FX_URLBAR_MERINO_RESPONSE_WEATHER`

The histograms are updated in addition to the existing general Merino latency
and response histograms. I also modified the existing response histogram by
adding a new `no_suggestion` category so we can tell the difference between a
successful fetch with suggestions and a successful fetch without suggestions.

There's other telemetry in https://mozilla-hub.atlassian.net/browse/SNT-333 that
this doesn't add. I didn't want to do it all here since some of it is very
different. I'll file new bugs as necessary.

Other changes this makes:

* Factor out weather initialization from test_weather.js into MerinoTestUtils so
  it can also be used in the new browser_telemetry_weather.js
* Copy `updateTopSites()` from the main urlbar head.js to quicksuggest's head.js
* Add some more `info()` logging to the telemetry helpers in head.js

Differential Revision: https://phabricator.services.mozilla.com/D164615
2023-01-06 16:41:49 +00:00
Daisuke Akatsuka
0fd375269f Bug 1806524: Add links of telemetry doc built from metrics.yaml to telemetry.rst r=adw,mak
Differential Revision: https://phabricator.services.mozilla.com/D165378
2022-12-26 01:24:21 +00:00
Dale Harvey
31c13c0cd4 Bug 1800993 - Add telemetry for dynamic wikipedia results. r=adw
Differential Revision: https://phabricator.services.mozilla.com/D162253
2022-12-09 21:29:38 +00:00
Sandor Molnar
b46f787337 Backed out changeset ba7612a763a0 (bug 1800993) for needing data-review. CLOSED TREE 2022-12-08 00:55:42 +02:00
Dale Harvey
05f278cf30 Bug 1800993 - Add telemetry for dynamic wikipedia results. r=adw
Differential Revision: https://phabricator.services.mozilla.com/D162253
2022-12-07 22:40:53 +00:00
Drew Willcoxon
212d13a054 Bug 1803873 - Support row buttons in all row types and make changes to tip rows. r=dao
This makes a couple of large changes:

(1) "Generic" buttons (the ones added by `UrlbarView.#addRowButton()`) are now
supported in all row types. The help button that's currently included in some
types of rows when `result.payload.helpUrl` is defined is now supported for all
row types, and two additional button types are now supported too: block buttons
and labeled buttons. A row will get a block button if its
`result.payload.isBlockable` is defined. It will get a labeled button if
`result.payload.buttons` is defined and non-empty. A button can include a `url`
property that is then added as an attribute on the button's element, and
`UrlbarInput.pickResult()` will use this attribute to load the URL when the
button is picked.

(2) The reason I added labeled buttons is because it lets us support tip buttons
without much more effort, which then lets us get rid of the special row type
used for tips. With this patch, tips are now standard rows that use generic
buttons.

This approach should be compatible with the result menu, when we switch over to
it, because we can include the help and block commands in the menu when
`helpUrl` and `isBlockable` are defined, instead of creating buttons for them.
Labeled buttons -- the ones used in tips -- would still be created. The result
menu button itself can continue to be a generic button.

It should also be compatible with including the result menu button inside the
row selection. We'll still add buttons to `.urlbarView-row`, separate from
`.urlbarView-row-inner`, so that the buttons can continue to be on the right
side of the row. We can color the background of the row instead of the
row-inner.

As with D163630, my motivation for this change is to support generic buttons in
dynamic result rows so that help and block buttons can be easily added to
weather suggestions. Here too the larger changes of supporting generic labeled
buttons and removing special rows for tips aren't strictly necessary, but I took
the opportunity to rework things.

Finally, this makes a few other changes:

* It includes some of the more minor improvements to selection that I made in
  D163630.

* It removes the help URL code from quick actions since it was decided not to
  show a help button. Currently, the button is hidden in CSS, but now that a
  generic help button is added for dynamic result rows when
  `result.payload.helpUrl` is defined, `helpUrl` needs to be removed from the
  payload to prevent a button from being added.

* I removed the special tip wrapping behavior, where the tip button and help
  button would wrap below the tip's text. Instead, now the text wraps inside
  row-inner and the buttons always remain on the same horizontal as the text. I
  don't think it's worth the extra complication.

Differential Revision: https://phabricator.services.mozilla.com/D163766
2022-12-06 18:43:49 -05:00
Noemi Erli
5ffe6e3698 Backed out changeset e0eac08ef8bc (bug 1803873) fo causing failures in browser_search_telemetry_sources_navigation CLOSED TREE 2022-12-07 01:24:44 +02:00
Drew Willcoxon
f7f081c409 Bug 1803873 - Support row buttons in all row types and make changes to tip rows. r=dao
This makes a couple of large changes:

(1) "Generic" buttons (the ones added by `UrlbarView.#addRowButton()`) are now
supported in all row types. The help button that's currently included in some
types of rows when `result.payload.helpUrl` is defined is now supported for all
row types, and two additional button types are now supported too: block buttons
and labeled buttons. A row will get a block button if its
`result.payload.isBlockable` is defined. It will get a labeled button if
`result.payload.buttons` is defined and non-empty. A button can include a `url`
property that is then added as an attribute on the button's element, and
`UrlbarInput.pickResult()` will use this attribute to load the URL when the
button is picked.

(2) The reason I added labeled buttons is because it lets us support tip buttons
without much more effort, which then lets us get rid of the special row type
used for tips. With this patch, tips are now standard rows that use generic
buttons.

This approach should be compatible with the result menu, when we switch over to
it, because we can include the help and block commands in the menu when
`helpUrl` and `isBlockable` are defined, instead of creating buttons for them.
Labeled buttons -- the ones used in tips -- would still be created. The result
menu button itself can continue to be a generic button.

It should also be compatible with including the result menu button inside the
row selection. We'll still add buttons to `.urlbarView-row`, separate from
`.urlbarView-row-inner`, so that the buttons can continue to be on the right
side of the row. We can color the background of the row instead of the
row-inner.

As with D163630, my motivation for this change is to support generic buttons in
dynamic result rows so that help and block buttons can be easily added to
weather suggestions. Here too the larger changes of supporting generic labeled
buttons and removing special rows for tips aren't strictly necessary, but I took
the opportunity to rework things.

Finally, this makes a few other changes:

* It includes some of the more minor improvements to selection that I made in
  D163630.

* It removes the help URL code from quick actions since it was decided not to
  show a help button. Currently, the button is hidden in CSS, but now that a
  generic help button is added for dynamic result rows when
  `result.payload.helpUrl` is defined, `helpUrl` needs to be removed from the
  payload to prevent a button from being added.

* I removed the special tip wrapping behavior, where the tip button and help
  button would wrap below the tip's text. Instead, now the text wraps inside
  row-inner and the buttons always remain on the same horizontal as the text. I
  don't think it's worth the extra complication.

Differential Revision: https://phabricator.services.mozilla.com/D163766
2022-12-06 22:28:55 +00:00
Cristian Tuns
63266cca48 Backed out changeset 263fffe843be (bug 1803873) for causing mochitest failures on browser_test_focus_urlbar.js CLOSED TREE 2022-12-06 15:10:09 -05:00
Drew Willcoxon
e634925c17 Bug 1803873 - Support row buttons in all row types and make changes to tip rows. r=dao
This makes a couple of large changes:

(1) "Generic" buttons (the ones added by `UrlbarView.#addRowButton()`) are now
supported in all row types. The help button that's currently included in some
types of rows when `result.payload.helpUrl` is defined is now supported for all
row types, and two additional button types are now supported too: block buttons
and labeled buttons. A row will get a block button if its
`result.payload.isBlockable` is defined. It will get a labeled button if
`result.payload.buttons` is defined and non-empty. A button can include a `url`
property that is then added as an attribute on the button's element, and
`UrlbarInput.pickResult()` will use this attribute to load the URL when the
button is picked.

(2) The reason I added labeled buttons is because it lets us support tip buttons
without much more effort, which then lets us get rid of the special row type
used for tips. With this patch, tips are now standard rows that use generic
buttons.

This approach should be compatible with the result menu, when we switch over to
it, because we can include the help and block commands in the menu when
`helpUrl` and `isBlockable` are defined, instead of creating buttons for them.
Labeled buttons -- the ones used in tips -- would still be created. The result
menu button itself can continue to be a generic button.

It should also be compatible with including the result menu button inside the
row selection. We'll still add buttons to `.urlbarView-row`, separate from
`.urlbarView-row-inner`, so that the buttons can continue to be on the right
side of the row. We can color the background of the row instead of the
row-inner.

As with D163630, my motivation for this change is to support generic buttons in
dynamic result rows so that help and block buttons can be easily added to
weather suggestions. Here too the larger changes of supporting generic labeled
buttons and removing special rows for tips aren't strictly necessary, but I took
the opportunity to rework things.

Finally, this makes a few other changes:

* It includes some of the more minor improvements to selection that I made in
  D163630.

* It removes the help URL code from quick actions since it was decided not to
  show a help button. Currently, the button is hidden in CSS, but now that a
  generic help button is added for dynamic result rows when
  `result.payload.helpUrl` is defined, `helpUrl` needs to be removed from the
  payload to prevent a button from being added.

* I removed the special tip wrapping behavior, where the tip button and help
  button would wrap below the tip's text. Instead, now the text wraps inside
  row-inner and the buttons always remain on the same horizontal as the text. I
  don't think it's worth the extra complication.

Differential Revision: https://phabricator.services.mozilla.com/D163766
2022-12-06 16:35:31 +00:00
Mark Banner
5d1820b074 Bug 1799314 - Convert consumers of testing modules to import ES modules direct (browser/). r=Gijs,settings-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D161914
2022-11-17 12:00:30 +00:00
James Teow
d6dddd38a9 Bug 1798793 - Add search tip message for showSearchTerms feature - r=adw,fluent-reviewers,flod
The showSearchTerms feature has a search tip that should appear
on the users default search engine results page.

The design and copy for the feature are in this Figma file:
https://www.figma.com/file/Ock0cYjzi7I1GmcctqOr9K/Search-settings-updates?node-id=352%3A9183

Differential Revision: https://phabricator.services.mozilla.com/D161186
2022-11-09 18:36:08 +00:00
James Teow
12cf092287 Bug 1798912 - Add showSearchTerms.enabled to TelemetryEnvironment - r=adw
Differential Revision: https://phabricator.services.mozilla.com/D161373
2022-11-07 21:53:44 +00:00
Rebecca BurWei
03cafb001b Bug 1794022 - Add docs. r=nanj DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D161042
2022-11-02 18:20:14 +00:00
Drew Willcoxon
16aaeab517 Bug 1798595 - Refactor quick suggest [Part 5]: Move remote settings code into QuickSuggestRemoteSettingsClient and initialization into QuickSuggest. r=daisuke
This does the following:

* Moves quick suggest initialization from UrlbarQuickSuggest to QuickSuggest
* Renames UrlbarQuickSuggest.sys.mjs to QuickSuggestRemoteSettingsClient.sys.mjs, so now this file is focused only on remote settings
* Makes QuickSuggest create an instance of QuickSuggestRemoteSettingsClient and keep it as `QuickSuggest.remoteSettings`
* Moves latency telemetry from UrlbarProviderQuickSuggest into QuickSuggestRemoteSettingsClient
* Changes the ad hoc logger used in QuickSuggestRemoteSettingsClient to a proper urlbar-style logger
* Updates consumers to use `QuickSuggest.remoteSettings` instead of UrlbarQuickSuggest

Please see bug 1798595 for details.

Depends on D160985

Differential Revision: https://phabricator.services.mozilla.com/D160986
2022-11-02 06:50:15 +00:00
Drew Willcoxon
d7aafbd006 Bug 1795803 - Expose the Merino provider pref to Nimbus. r=daisuke
This adds a Nimbus variable corresponding to `browser.urlbar.merino.providers`.

I noticed that when we added a Nimbus variable for client variants (bug
1743685), we didn't actually use it in the provider. Instead we use its fallback
pref. I fixed that too.

Differential Revision: https://phabricator.services.mozilla.com/D159557
2022-10-18 19:58:53 +00:00
Hanna Jones
bbe4852d8f Bug 1793621 - fix broken links in dynamic result types documentation r=adw
Differential Revision: https://phabricator.services.mozilla.com/D158585
2022-10-07 17:53:38 +00:00
Daisuke Akatsuka
9ba0b5c516 Bug 1787961: Add telemetry for number of sponsored visit that can not find triggering URL. r=mak
Differential Revision: https://phabricator.services.mozilla.com/D155928
2022-09-06 20:51:34 +00:00
Dale Harvey
dd5fabc1d3 Bug 1783154 - Add QuickAction to urlbar.picked Scalar. r=adw
Differential Revision: https://phabricator.services.mozilla.com/D155514
2022-09-01 12:41:24 +00:00
Marian-Vasile Laza
394e9a4eaf Backed out changeset 654379382e64 (bug 1783154) for causing bc failures on browser_restoreEmptyInput.js. CLOSED TREE 2022-08-30 18:59:43 +03:00
Dale Harvey
61a27ea08e Bug 1783154 - Add QuickAction to urlbar.picked Scalar. r=adw
Differential Revision: https://phabricator.services.mozilla.com/D155514
2022-08-30 14:36:54 +00:00
Sylvestre Ledru
5cbc63e635 no bug - Fix a few typo found by the next version of codespell r=marco
Differential Revision: https://phabricator.services.mozilla.com/D150321
2022-07-20 15:26:22 +00:00
James Teow
50dc35e75a Bug 1735534 - Set browser.urlbar.dnsResolveSingleWordsAfterSearch to 0 by default - r=mak
Differential Revision: https://phabricator.services.mozilla.com/D149159
2022-06-30 16:15:04 +00:00
Drew Willcoxon
97ec7014fd Bug 1777119 - Update the public adaptive history autofill doc. r=daisuke
Please see the bug for info. This revision changes the URL of the adaptive
history doc to the new published doc. Ultimately this doc should live in-tree
but until then this is a nice, simple improvement.

Differential Revision: https://phabricator.services.mozilla.com/D150516
2022-06-28 23:30:14 +00:00
Drew Willcoxon
f636a6751a Bug 1776797 - Replace scenario with improve_suggest_experience_checked in Firefox Suggest pings. r=nanj
The documentation says this change was made in 103 because I'll request uplift
to Beta 103.

This also adds documentation for the new `sid` and `seq` Merino params from
D150289. I should have update the doc there, and since I'm modifying it now
anyway let's do it here.

Differential Revision: https://phabricator.services.mozilla.com/D150490
2022-06-28 19:42:47 +00:00
Drew Willcoxon
5c00832e2d Bug 1776787 - Clarify the autofill telemetry documentation. r=daisuke
Differential Revision: https://phabricator.services.mozilla.com/D150430
2022-06-27 23:38:47 +00:00
Daisuke Akatsuka
c69fb96874 Bug 1774305: Add impression telemetry for autofill. r=adw
Differential Revision: https://phabricator.services.mozilla.com/D149355
2022-06-17 19:50:37 +00:00
Michael Kohler
8ffbdb5831 Bug 1672427 - Remove FX_URLBAR_SELECTED_RESULT_INDEX, FX_URLBAR_SELECTED_RESULT_TYPE_2 and FX_URLBAR_SELECTED_RESULT_INDEX_BY_TYPE_2 histograms r=mak
Differential Revision: https://phabricator.services.mozilla.com/D148359
2022-06-17 09:04:27 +00:00
smolnar
c6e293bfa2 Backed out changeset 299feb340bf2 (bug 1774305) for causing mochitest failures in browser_urlbar_telemetry_autofill. CLOSED TREE 2022-06-17 02:39:20 +03:00
Daisuke Akatsuka
6f5181bdb6 Bug 1774305: Add impression telemetry for autofill. r=adw
Differential Revision: https://phabricator.services.mozilla.com/D149355
2022-06-16 22:38:41 +00:00
Drew Willcoxon
c5786fb5e6 Bug 1769583 - Add the urlbar autofill prefs to telemetry environment data. r=chutten
Differential Revision: https://phabricator.services.mozilla.com/D146504
2022-05-17 15:36:28 +00:00
Daisuke Akatsuka
ee631d075f Bug 1597791: Add telemetry for adaptive history autofill. r=adw
Differential Revision: https://phabricator.services.mozilla.com/D144685
2022-05-13 22:46:36 +00:00
Daisuke Akatsuka
75d26df957 Bug 1597791: Support adaptive history autofill. r=adw,mak
Differential Revision: https://phabricator.services.mozilla.com/D144393
2022-05-13 22:46:36 +00:00
Drew Willcoxon
0f4b72aa32 Bug 1765881 - Part 1: Limit the number of Suggest impression cap reset telemetry events recorded at once. r=nanj
This records multiple reset "events" inside a single telemetry event instead of
using one telemetry event per reset event like we currently do. It also stops
recording reset events for interval periods that elapsed while the app wasn't
running. This will prevent us from recording a bunch of events at once like we
currently do. Please see the bug for more background.

A new `eventCount` property in the telemetry event's `extra` indicates the
number of reset events that are being reported in the telemetry event.

I talked with Rebecca about these changes and she's OK with them.

Differential Revision: https://phabricator.services.mozilla.com/D145049
2022-04-29 23:32:43 +00:00