diff --git a/browser/components/search/BrowserSearchTelemetry.sys.mjs b/browser/components/search/BrowserSearchTelemetry.sys.mjs index 2993ad169517..3b66069d4dbd 100644 --- a/browser/components/search/BrowserSearchTelemetry.sys.mjs +++ b/browser/components/search/BrowserSearchTelemetry.sys.mjs @@ -288,15 +288,6 @@ class BrowserSearchTelemetryHandler { scalarKey, 1 ); - Services.telemetry.recordEvent( - "navigation", - "search", - scalarSource, - action, - { - engine: engine.telemetryId, - } - ); } /** diff --git a/browser/components/search/docs/telemetry.rst b/browser/components/search/docs/telemetry.rst index 20f50532ce9c..8cc59bdbb66c 100644 --- a/browser/components/search/docs/telemetry.rst +++ b/browser/components/search/docs/telemetry.rst @@ -129,14 +129,6 @@ browser.engagement.navigation.* For ``urlbar`` or ``searchbar``, indicates the user confirmed a search suggestion. -navigation.search (OBSOLETE) -^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - This is a legacy and disabled event telemetry that is currently under - discussion for removal or modernization. It can't be enabled through a pref. - it's more or less equivalent to browser.engagement.navigation, but can also - report the picked search engine. - SearchSERPTelemetry.sys.mjs ~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/browser/components/search/test/browser/telemetry/browser_search_telemetry_aboutHome.js b/browser/components/search/test/browser/telemetry/browser_search_telemetry_aboutHome.js index 9e9af43698e2..c713e77205cc 100644 --- a/browser/components/search/test/browser/telemetry/browser_search_telemetry_aboutHome.js +++ b/browser/components/search/test/browser/telemetry/browser_search_telemetry_aboutHome.js @@ -32,9 +32,6 @@ add_setup(async function () { let oldCanRecord = Services.telemetry.canRecordExtended; Services.telemetry.canRecordExtended = true; - // Enable event recording for the events tested here. - Services.telemetry.setEventRecordingEnabled("navigation", true); - await SpecialPowers.pushPrefEnv({ set: [ [ @@ -46,7 +43,6 @@ add_setup(async function () { registerCleanupFunction(async function () { await PlacesUtils.history.clear(); - Services.telemetry.setEventRecordingEnabled("navigation", false); Services.telemetry.canRecordExtended = oldCanRecord; }); }); @@ -106,19 +102,7 @@ add_task(async function test_abouthome_activitystream_simpleQuery() { 1 ); - // Also check events. - TelemetryTestUtils.assertEvents( - [ - { - object: "about_home", - value: "enter", - extra: { engine: "other-MozSearch" }, - }, - ], - { category: "navigation", method: "search" } - ); - - // Also also check Glean events. + // Also check Glean events. const record = Glean.newtabSearch.issued.testGetValue(); Assert.ok(!!record, "Must have recorded a search issuance"); Assert.equal(record.length, 1, "One search, one event"); diff --git a/browser/components/search/test/browser/telemetry/browser_search_telemetry_content.js b/browser/components/search/test/browser/telemetry/browser_search_telemetry_content.js index b17604badde7..86317003e2e6 100644 --- a/browser/components/search/test/browser/telemetry/browser_search_telemetry_content.js +++ b/browser/components/search/test/browser/telemetry/browser_search_telemetry_content.js @@ -28,12 +28,8 @@ add_setup(async function () { let oldCanRecord = Services.telemetry.canRecordExtended; Services.telemetry.canRecordExtended = true; - // Enable event recording for the events tested here. - Services.telemetry.setEventRecordingEnabled("navigation", true); - registerCleanupFunction(async function () { await PlacesUtils.history.clear(); - Services.telemetry.setEventRecordingEnabled("navigation", false); Services.telemetry.canRecordExtended = oldCanRecord; }); }); @@ -101,18 +97,6 @@ add_task(async function test_context_menu() { 1 ); - // Also check events. - TelemetryTestUtils.assertEvents( - [ - { - object: "contextmenu", - value: null, - extra: { engine: "other-MozSearch" }, - }, - ], - { category: "navigation", method: "search" } - ); - contextMenu.hidePopup(); BrowserTestUtils.removeTab(gBrowser.selectedTab); BrowserTestUtils.removeTab(tab); @@ -174,18 +158,6 @@ add_task(async function test_about_newtab() { 1 ); - // Also check events. - TelemetryTestUtils.assertEvents( - [ - { - object: "about_newtab", - value: "enter", - extra: { engine: "other-MozSearch" }, - }, - ], - { category: "navigation", method: "search" } - ); - // Also also check Glean events. const record = Glean.newtabSearch.issued.testGetValue(); Assert.ok(!!record, "Must have recorded a search issuance"); diff --git a/browser/components/search/test/browser/telemetry/browser_search_telemetry_searchbar.js b/browser/components/search/test/browser/telemetry/browser_search_telemetry_searchbar.js index ba2b5e49d20e..f0a962799029 100644 --- a/browser/components/search/test/browser/telemetry/browser_search_telemetry_searchbar.js +++ b/browser/components/search/test/browser/telemetry/browser_search_telemetry_searchbar.js @@ -78,12 +78,8 @@ add_setup(async function () { let oldCanRecord = Services.telemetry.canRecordExtended; Services.telemetry.canRecordExtended = true; - // Enable event recording for the events tested here. - Services.telemetry.setEventRecordingEnabled("navigation", true); - registerCleanupFunction(async function () { Services.telemetry.canRecordExtended = oldCanRecord; - Services.telemetry.setEventRecordingEnabled("navigation", false); }); }); @@ -129,18 +125,6 @@ add_task(async function test_plainQuery() { 1 ); - // Also check events. - TelemetryTestUtils.assertEvents( - [ - { - object: "searchbar", - value: "enter", - extra: { engine: "other-MozSearch" }, - }, - ], - { category: "navigation", method: "search" } - ); - // Check the histograms as well. let resultMethods = resultMethodHist.snapshot(); checkHistogramResults( @@ -199,18 +183,6 @@ add_task(async function test_oneOff_enter() { 1 ); - // Also check events. - TelemetryTestUtils.assertEvents( - [ - { - object: "searchbar", - value: "oneoff", - extra: { engine: "other-MozSearch2" }, - }, - ], - { category: "navigation", method: "search" } - ); - // Check the histograms as well. let resultMethods = resultMethodHist.snapshot(); checkHistogramResults( @@ -351,18 +323,6 @@ async function checkSuggestionClick(clickOptions, waitForActionFn) { 1 ); - // Also check events. - TelemetryTestUtils.assertEvents( - [ - { - object: "searchbar", - value: "suggestion", - extra: { engine: searchEngineId }, - }, - ], - { category: "navigation", method: "search" } - ); - // Check the histograms as well. let resultMethods = resultMethodHist.snapshot(); checkHistogramResults( diff --git a/browser/components/urlbar/tests/browser/browser_urlbar_telemetry.js b/browser/components/urlbar/tests/browser/browser_urlbar_telemetry.js index e479b5c83be2..16cac39a3843 100644 --- a/browser/components/urlbar/tests/browser/browser_urlbar_telemetry.js +++ b/browser/components/urlbar/tests/browser/browser_urlbar_telemetry.js @@ -113,9 +113,6 @@ add_setup(async function () { let oldCanRecord = Services.telemetry.canRecordExtended; Services.telemetry.canRecordExtended = true; - // Enable event recording for the events tested here. - Services.telemetry.setEventRecordingEnabled("navigation", true); - // Clear history so that history added by previous tests doesn't mess up this // test when it selects results in the urlbar. await PlacesUtils.history.clear(); @@ -137,7 +134,6 @@ add_setup(async function () { Services.prefs.setBoolPref(SUGGEST_URLBAR_PREF, suggestionsEnabled); await PlacesUtils.history.clear(); await UrlbarTestUtils.formHistory.clear(); - Services.telemetry.setEventRecordingEnabled("navigation", false); }); }); @@ -189,20 +185,6 @@ add_task(async function test_simpleQuery() { undefined ); - // Also check events. - TelemetryTestUtils.assertEvents( - [ - [ - "navigation", - "search", - "urlbar", - "enter", - { engine: "other-MozSearch" }, - ], - ], - { category: "navigation", method: "search" } - ); - TelemetryTestUtils.assertHistogram( resultMethodHist, UrlbarTestUtils.SELECTED_RESULT_METHODS.enter, @@ -245,20 +227,6 @@ add_task(async function test_searchMode_enter() { "This search must only increment one entry in the scalar." ); - // Also check events. - TelemetryTestUtils.assertEvents( - [ - [ - "navigation", - "search", - "urlbar_searchmode", - "enter", - { engine: "other-MozSearch" }, - ], - ], - { category: "navigation", method: "search" } - ); - TelemetryTestUtils.assertHistogram( resultMethodHist, UrlbarTestUtils.SELECTED_RESULT_METHODS.enter, @@ -333,20 +301,6 @@ add_task(async function test_oneOff_enter() { undefined ); - // Also check events. - TelemetryTestUtils.assertEvents( - [ - [ - "navigation", - "search", - "urlbar_searchmode", - "enter", - { engine: "other-MozSearch" }, - ], - ], - { category: "navigation", method: "search" } - ); - TelemetryTestUtils.assertHistogram( resultMethodHist, UrlbarTestUtils.SELECTED_RESULT_METHODS.enter, @@ -505,20 +459,6 @@ add_task(async function test_suggestion_click() { 1 ); - // Also check events. - TelemetryTestUtils.assertEvents( - [ - [ - "navigation", - "search", - "urlbar", - "suggestion", - { engine: searchEngineId }, - ], - ], - { category: "navigation", method: "search" } - ); - TelemetryTestUtils.assertHistogram( resultMethodHist, UrlbarTestUtils.SELECTED_RESULT_METHODS.click, @@ -676,20 +616,6 @@ add_task(async function test_searchmode_suggestion_click() { 1 ); - // Also check events. - TelemetryTestUtils.assertEvents( - [ - [ - "navigation", - "search", - "urlbar_searchmode", - "suggestion", - { engine: searchEngineId }, - ], - ], - { category: "navigation", method: "search" } - ); - TelemetryTestUtils.assertHistogram( resultMethodHist, UrlbarTestUtils.SELECTED_RESULT_METHODS.click, @@ -858,20 +784,6 @@ add_task(async function test_formHistory_click() { 1 ); - // Also check events. - TelemetryTestUtils.assertEvents( - [ - [ - "navigation", - "search", - "urlbar", - "formhistory", - { engine: searchEngineId }, - ], - ], - { category: "navigation", method: "search" } - ); - TelemetryTestUtils.assertHistogram( resultMethodHist, UrlbarTestUtils.SELECTED_RESULT_METHODS.click, diff --git a/browser/components/urlbar/tests/browser/browser_urlbar_telemetry_persisted.js b/browser/components/urlbar/tests/browser/browser_urlbar_telemetry_persisted.js index 9f7d5a8e62c6..97295bccdf29 100644 --- a/browser/components/urlbar/tests/browser/browser_urlbar_telemetry_persisted.js +++ b/browser/components/urlbar/tests/browser/browser_urlbar_telemetry_persisted.js @@ -3,8 +3,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /** - * This file tests browser.engagement.navigation.urlbar_persisted and the - * event navigation.search.urlbar_persisted + * This file tests browser.engagement.navigation.urlbar_persisted. */ "use strict"; @@ -111,25 +110,6 @@ function assertScalarDoesNotExist(scalar) { Assert.ok(!(scalar in scalars), scalar + " must not be recorded."); } -function assertTelemetryEvents() { - TelemetryTestUtils.assertEvents( - [ - ["navigation", "search", "urlbar", "enter", { engine: "Example" }], - [ - "navigation", - "search", - "urlbar_persisted", - "enter", - { engine: "Example" }, - ], - ], - { - category: "navigation", - method: "search", - } - ); -} - // A user making a search after making a search should result // in the telemetry being recorded. add_task(async function search_after_search() { @@ -155,9 +135,6 @@ add_task(async function search_after_search() { 1 ); - // Check events. - assertTelemetryEvents(); - BrowserTestUtils.removeTab(tab); }); @@ -184,9 +161,6 @@ add_task(async function switch_to_tab_and_search() { 1 ); - // Check events. - assertTelemetryEvents(); - BrowserTestUtils.removeTab(tab1); BrowserTestUtils.removeTab(tab2); }); @@ -213,9 +187,6 @@ add_task(async function handle_revert() { 1 ); - // Check events. - assertTelemetryEvents(); - BrowserTestUtils.removeTab(tab); }); @@ -250,8 +221,5 @@ add_task(async function back_and_forth() { 1 ); - // Check events. - assertTelemetryEvents(); - BrowserTestUtils.removeTab(tab); }); diff --git a/toolkit/components/telemetry/Events.yaml b/toolkit/components/telemetry/Events.yaml index 671f4c6c8bd1..30d018fcb8ca 100644 --- a/toolkit/components/telemetry/Events.yaml +++ b/toolkit/components/telemetry/Events.yaml @@ -667,29 +667,6 @@ homepage: extra_keys: webExtensionId: The identifier of the webextension, if known. -navigation: - search: - objects: ["about_home", "about_newtab", "contextmenu", "oneoff", - "suggestion", "alias", "enter", "searchbar", "urlbar", - "urlbar_handoff", "urlbar_persisted", "urlbar_searchmode", - "webextension"] - release_channel_collection: opt-out - products: - - "firefox" - - "fennec" - record_in_processes: ["main"] - description: > - This is recorded on each search navigation. - The value field records the action used to trigger the search: - "enter", "oneoff", "suggestion", "alias", null (for contextmenu and webextension) - bug_numbers: [1316281, 1496764] - notification_emails: - - "mdeboer@mozilla.com" - - "rharter@mozilla.com" - expiry_version: never - extra_keys: - engine: The id of the search engine used. - upgrade_dialog: trigger: objects: ["reason"]