Closed Bug 1919180 Opened 2 months ago Closed 1 month ago

Add telemetry to differentiate symbol or keyword entering search mode

Categories

(Firefox :: Address Bar, task, P2)

task

Tracking

()

RESOLVED FIXED
133 Branch
Tracking Status
firefox133 --- fixed

People

(Reporter: mcheang, Assigned: mcheang)

References

(Blocks 1 open bug, )

Details

Attachments

(1 file)

When the user enters search mode by typing these symbols (*, ^, %, >) , it is currently being record via:
urlbar.searchmode.typed.

We want to add telemetry so we can understand when the user enters search mode via the new restrict keywords (@tabs, @history, @bookmarks, @actions) rather than using the symbols. The scalar keys for urlbar.searchmode.typed and urlbar.searchmode.keywordoffer has been updated.

Summary of changes

  • urlbar.searchmode.typed: The scalar key is suffixed with "keyword" for restrict keyword entries and "symbol" for symbol entries.
  • urlbar.searchmode.keywordoffer: The scalar key is suffixed with "keyword" for restrict keyword entries via keywordoffer.
  • Example: History search mode scalar key is history_keyword for restrict keyword and history_symbol for symbol.

Restrict keywords (@bookmarks, @tabs, @history, @actions):

Testing Steps

  • type full keyword @tabs
  • type partial keyword @t and press right arrow to autofill

Expected telemetry scalar keys for urlbar.searchmode.typed

tabs_keyword

Testing Steps

  • type@ and click on tabs result
  • type@ and arrow down to tabs result and press enter
  • type partial keyword @t and press enter to autofill
  • type partial keyword @t and press tab and then enter

Expected telemetry scalar key for urlbar.searchmode.keywordoffer

tabs_keyword

Symbols (%, ^, *, >):

Testing Steps

  • type % and space to enter tabs search mode
  • type ^ and space to enter history search mode
  • type * and space to enter bookmarks search mode
  • type > and space to enter actions search mode

Expected telemetry scalar keys for urlbar.searchmode.typed

tabs_symbol
history_symbol
bookmarks_symbol
actions_symbol

Assignee: nobody → mcheang
  • urlbar.searchmode.typed: Prefixed with "keyword" for restrict keyword entries and "symbol" for symbol entries.
  • urlbar.searchmode.keywordoffer: Prefixed with "keyword" for restrict keyword entries via keywordoffer.
  • Example: History search mode scalar key is history_keyword for restrict keyword and history_symbol for symbol.
Pushed by mcheang@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/2fa695c28d67 Update scalar keys for urlbar.searchmode.typed and urlbar.searchmode.keywordoffer. r=mak,urlbar-reviewers

Thank you. I've added a fix for the patch and re-landed it.

Flags: needinfo?(mcheang)
Pushed by mcheang@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/737f799b6c6c Update scalar keys for urlbar.searchmode.typed and urlbar.searchmode.keywordoffer. r=mak,urlbar-reviewers

Backed out for causing mochitest fails on browser_secondaryActions.js

[task 2024-10-04T00:38:31.264Z] 00:38:31     INFO - TEST-PASS | browser/components/urlbar/tests/browser/browser_secondaryActions.js | Urlbar results have proper searchmodesource attribute - "actions" == "actions" - 
[task 2024-10-04T00:38:31.264Z] 00:38:31     INFO - Buffered messages finished
[task 2024-10-04T00:38:31.266Z] 00:38:31     INFO - TEST-UNEXPECTED-FAIL | browser/components/urlbar/tests/browser/browser_secondaryActions.js | Expected searchMode - {"source":8,"isPreview":false,"entry":"typed","restrictType":"symbol"} deepEqual {"source":8,"entry":"typed","isPreview":false} - 
[task 2024-10-04T00:38:31.266Z] 00:38:31     INFO - Stack trace:
[task 2024-10-04T00:38:31.266Z] 00:38:31     INFO - resource://testing-common/UrlbarTestUtils.sys.mjs:assertSearchMode:902
[task 2024-10-04T00:38:31.267Z] 00:38:31     INFO - chrome://mochitests/content/browser/browser/components/urlbar/tests/browser/browser_secondaryActions.js:enter_action_search_mode:183
[task 2024-10-04T00:38:31.267Z] 00:38:31     INFO - chrome://mochikit/content/browser-test.js:handleTask:1145
[task 2024-10-04T00:38:31.267Z] 00:38:31     INFO - chrome://mochikit/content/browser-test.js:_runTaskBasedTest:1217
[task 2024-10-04T00:38:31.267Z] 00:38:31     INFO - chrome://mochikit/content/browser-test.js:Tester_execTest:1358
[task 2024-10-04T00:38:31.267Z] 00:38:31     INFO - chrome://mochikit/content/browser-test.js:nextTest/<:1134
[task 2024-10-04T00:38:31.267Z] 00:38:31     INFO - chrome://mochikit/content/tests/SimpleTest/SimpleTest.js:SimpleTest.waitForFocus/<:1058
[task 2024-10-04T00:38:31.267Z] 00:38:31     INFO - TEST-PASS | browser/components/urlbar/tests/browser/browser_secondaryActions.js | Expected result source should have a name - "actions" == true - 
Flags: needinfo?(mcheang)

I added a fix for browser_secondaryActions.js and relanded.

Flags: needinfo?(mcheang)
Pushed by mcheang@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/19cdcae69553 Update scalar keys for urlbar.searchmode.typed and urlbar.searchmode.keywordoffer. r=mak,urlbar-reviewers
Status: NEW → RESOLVED
Closed: 1 month ago
Resolution: --- → FIXED
Target Milestone: --- → 133 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: