# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.

# Adding a new metric? We have docs for that!
# https://firefox-source-docs.mozilla.org/toolkit/components/glean/user/new_definitions_file.html

---
$schema: moz://mozilla.org/schemas/glean/metrics/2-0-0
$tags:
  - "Firefox :: Address Bar"

urlbar:
  abandonment:
    type: event
    description: Recorded when the user abandons a search (blurring the urlbar).
    extra_keys:
      abandonment_type:
        description: >
          Records the reason that resulted in an abandonment. The possible
          values are: `blur` and `tab_switch`.
        type: string
      sap:
        description: >
          `sap` is the meaning of `search access point`. It records where the
          user started the search action from. The possible values are: `urlbar`
          , `handoff`, `urlbar_newtab`, `urlbar_addonpage`, and `searchbar`.
        type: string
      location:
        description: >
          Which input was used: fullpage, sidebar, or urlbar.
        type: string
      window_mode:
        description: >
          The window mode: classic, private, or smartwindow.
        type: string
      interaction:
        description: >
          How the user started the search action. The possible values are:
          `typed`, `pasted`, `topsite_search` (clicked on a topsite search
          shortcut), `topsites` (selected a topsite result with empty search
          string), `returned` (The user abandoned a search, then returned to it)
          , `restarted` (The user abandoned a search, then returned to it,
          cleared it and typed a completely different string), `refined` (The
          user abandoned a search, then returned to it, and partially modified
          the string), `persisted_search_terms` (The user returned to a previous
          successful search that persisted terms in the urlbar),
          `persisted_search_terms_restarted` (The user returned to a previous
          successful search that persisted terms in the urlbar, then cleared it
          and typed a completely different string) and
          `persisted_search_terms_refined` (The user returned to a previous
          successful search that persisted terms in the urlbar, and partially
          modified the string).
        type: string
      search_mode:
        description: >
          If the urlbar is in search mode, thus restricting results to a
          specific search engine or local source, this is set to the search mode
          source. The possible sources are: `actions`, `bookmarks`, `history`,
          `search_engine`, and `tabs`. If search mode is active but the source
          did not fall into any of these categories, this will be `unknown`. If
          search mode is not active, this will be an empty string.
        type: string
      search_engine_default_id:
        description: >
          The telemetry id of the search engine.
          Reflects `search.engine.default.engine_id`.
        type: string
      n_chars:
        description: >
          The length of string used for the search. It includes whitespaces.
        type: quantity
      n_words:
        description: >
          The length of words used for the search. The words are made by
          splitting the search string by whitespaces, thus this doesn’t support
          CJK languages. For performance reasons a maximum of 255 characters are
          considered when splitting.
        type: quantity
      n_results:
        description: >
          The number of results shown to the user. If this is high the results
          list below may be truncated due to technical limitations. Also note in
          that case not all the results may be physically visible due to the
          screen size limitation.
        type: quantity
      groups:
        description: >
          Comma separated list of result groups in the order they were shown to
          the user. The groups may be repeated, since the list will match 1:1
          the results list, so we can link each result to a group. The possible
          group names are: `heuristic`, `adaptive_history`, `search_history`,
          `search_suggest`, `search_suggest_rich`, `trending_search`,
          `trending_search_rich`, `top_pick`, `top_site`, `remote_tab`,
          `addon`, `general`, `suggest`, `about_page`, `suggested_index`,
          `restrict_keyword`, `ai`.
          If the group did not fall into any of these,
          this will be `unknown` and a bug should be filed to investigate it.
        type: string
      results:
        description: >
          Comma separated list of result types in the order they were shown to
          the user. The `unknown` type should not occur and indicates a bug. The
          possible types are:
          `action`,
          `addon`,
          `ai_chat`,
          `ai_search_fallback`,
          `autofill_about`,
          `autofill_adaptive_origin`,
          `autofill_adaptive_url`,
          `autofill_origin`,
          `autofill_unknown`,
          `autofill_url`,
          `bookmark`,
          `bookmark_adaptive`,
          `bookmark_adaptive_serp`,
          `bookmark_serp`,
          `calc`,
          `clipboard`,
          `fxsuggest_data_sharing_opt_in`,
          `history`,
          `history_adaptive`,
          `history_adaptive_serp`,
          `history_autofill_fallback_origin`,
          `history_semantic`,
          `history_semantic_serp`,
          `history_serp`,
          `intervention_clear`,
          `intervention_refresh`,
          `intervention_unknown`,
          `intervention_update`,
          `keyword`,
          `merino_adm_sponsored`,
          `merino_amo`,
          `merino_market`,
          `merino_top_picks`,
          `merino_wikipedia`,
          `ml_yelp`,
          `recent_search`,
          `remote_tab`,
          `restrict_keyword_actions`,
          `restrict_keyword_bookmarks`,
          `restrict_keyword_history`,
          `restrict_keyword_tabs`,
          `rust_adm_nonsponsored`,
          `rust_adm_sponsored`,
          `rust_amo`,
          `rust_exposure`,
          `rust_important_dates`,
          `rust_market_opt_in`,
          `rust_mdn`,
          `rust_yelp`,
          `search_engine`,
          `search_history`,
          `search_suggest`,
          `search_suggest_rich`,
          `tab`,
          `tab_adaptive`,
          `tab_adaptive_serp`,
          `tab_semantic`,
          `tab_semantic_serp`,
          `tab_serp`,
          `tab_to_search`,
          `tip_dismissal_acknowledgment`,
          `tip_onboard`,
          `tip_redirect`,
          `tip_unknown`,
          `top_site`,
          `trending_search`,
          `trending_search_rich`,
          `unit`,
          `url`,
          `weather`
        type: string
      actions:
        description: >
          Comma separated list of actions keys in the order they were shown to
          the user. Possible keys are: `addons`, `bookmarks`, `clear`, `downloads`,
          `extensions`, `inspect`, `logins`, `print`, `private`,
          `refresh`, `restart`, `savepdf`, `screenshot`, `settings`, `tabswitch`,
          `themes`, `update`, `viewsource`.
          If there is no action shown in a position that is denoted with `none`.
        type: string
      available_semantic_sources:
        description: >
          Comma separated list of semantic sources that were available to search.
          This indicates general availability of the source, not whether it was
          queried.
          The possible values are: `history`, `none`.
        type: string
      chat_id: &chat_id
        description: >
          UUID for this smart window session. Unique identifier for each chat
          conversation. Only set when sap is `smartbar`.
        type: string
      intent: &intent
        description: >
          What was the detected intent for the request: navigate, search,
          chat, or empty string. Only set when sap is `smartbar`.
        type: string
      model: &model
        description: >
          Model selected by the user. Only set when sap is `smartbar`.
        type: string
    bugs:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1800414
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1805717
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1842247
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1917992
      - https://bugzilla.mozilla.org/show_bug.cgi?id=2003067
      - https://bugzilla.mozilla.org/show_bug.cgi?id=2009615
      - https://bugzilla.mozilla.org/show_bug.cgi?id=2027637
    data_reviews:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1800414#c2
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1805717#c4
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1842247#c3
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1917992
      - https://bugzilla.mozilla.org/show_bug.cgi?id=2003067
      - https://bugzilla.mozilla.org/show_bug.cgi?id=2009615
      - https://bugzilla.mozilla.org/show_bug.cgi?id=2027637
    data_sensitivity:
      - interaction
    notification_emails:
      - fx-search-telemetry@mozilla.com
    expires: never

  bounce:
    type: event
    description: Recorded when the user leaves a page loaded by picking an address bar result and they spent less than 10s on it.
    extra_keys:
      sap:
        description: >
          `sap` is the meaning of `search access point`. It records where the
          user started the search action from. The possible values are: `urlbar`
          , `handoff`, `urlbar_newtab`, `urlbar_addonpage`, and `searchbar`.
        type: string
      location:
        description: >
          Which input was used: fullpage, sidebar, or urlbar.
        type: string
      window_mode:
        description: >
          The window mode: classic, private, or smartwindow.
        type: string
      interaction:
        description: >
          How the user started the search action. The possible values are:
          `typed`, `pasted`, `topsite_search` (clicked on a topsite search
          shortcut), `topsites` (selected a topsite result with empty search
          string), `returned` (The user abandoned a search, then returned to it)
          , `restarted` (The user abandoned a search, then returned to it,
          cleared it and typed a completely different string), `refined` (The
          user abandoned a search, then returned to it, and partially modified
          the string), `persisted_search_terms` (The user returned to a previous
          successful search that persisted terms in the urlbar),
          `persisted_search_terms_restarted` (The user returned to a previous
          successful search that persisted terms in the urlbar, then cleared it
          and typed a completely different string) and
          `persisted_search_terms_refined` (The user returned to a previous
          successful search that persisted terms in the urlbar, and partially
          modified the string).
        type: string
      search_mode:
        description: >
          If the urlbar is in search mode, thus restricting results to a
          specific search engine or local source, this is set to the search mode
          source. The possible sources are: `actions`, `bookmarks`, `history`,
          `search_engine`, and `tabs`. If search mode is active but the source
          did not fall into any of these categories, this will be `unknown`. If
          search mode is not active, this will be an empty string.
        type: string
      search_engine_default_id:
        description: >
          The telemetry id of the search engine.
          Reflects `search.engine.default.engine_id`.
        type: string
      n_chars:
        description: >
          The length of string used for the search. It includes whitespaces.
        type: quantity
      n_words:
        description: >
          The length of words used for the search. The words are made by
          splitting the search string by whitespaces, thus this doesn’t support
          CJK languages. For performance reasons a maximum of 255 characters are
          considered when splitting.
        type: quantity
      n_results:
        description: >
          The number of results shown to the user. If this is high the results
          list below may be truncated due to technical limitations. Also note in
          that case not all the results may be physically visible due to the
          screen size limitation.
        type: quantity
      selected_result:
        description: >
          The type of the result the user selected. This is to be set as the
          selected_result value of the last engagement event.
        type: string
      selected_position:
        description: >
          The 1-based index of the result the user selected. If user searched
          without selection, 0 will be recorded.
        type: quantity
      provider:
        description: >
          The name of the `UrlbarProvider` that provided the selected result.
          The possible values are: `AboutPages`, `AliasEngines`, `Autofill`,
          `BookmarkKeywords`, `calculator`, `UrlbarProviderContextualSearch`,
          `HeuristicFallback`, `HistoryUrlHeuristic`, `InputHistory`,
          `UrlbarProviderInterventions`, `Omnibox`, `OpenTabs`, `Places`,
          `PrivateSearch`, `quickactions`, `UrlbarProviderQuickSuggest`,
          `RemoteTabs`, `SearchSuggestions`, `UrlbarProviderSearchTips`,
          `TabToSearch`, `TokenAliasEngines`, `UrlbarProviderTopSites`,
          `UnitConversion` and `UnifiedComplete`.
          If engagement_type is `drop_go` or `paste_go`, this will be null
          because no results are shown. And also, if selected_result is
          `experimental_addon`, it means that the user selected a result
          from an add-on using the urlbar experimental API. In this case,
          this will be the provider name specified by the add-on.
        type: string
      engagement_type:
        description: >
          Records how the user selected the result. The possible values are the same
          as those defined for the engagement event engagement_type property.
        type: string
      results:
        description: >
          Comma separated list of result types in the order they were shown to
          the user. The `unknown` type should not occur and indicates a bug. The
          types are one of the values defined for the engagement event results property.
        type: string
      view_time:
        description: >
          The number of seconds the user spent on the page.
        type: quantity
      threshold:
        description: >
          The view time threshold for bounce detection, in seconds.
        type: quantity
      chat_id: *chat_id
      intent: *intent
      model: *model
    bugs:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1959741
      - https://bugzilla.mozilla.org/show_bug.cgi?id=2009615
      - https://bugzilla.mozilla.org/show_bug.cgi?id=2027637
    data_reviews:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1959741
      - https://bugzilla.mozilla.org/show_bug.cgi?id=2009615
      - https://bugzilla.mozilla.org/show_bug.cgi?id=2027637
    data_sensitivity:
      - interaction
    notification_emails:
      - fx-search-telemetry@mozilla.com
    expires: never


  disable:
    type: event
    description: >
      Recorded after a search containing a Suggest result is engaged
      or abandoned. Number of seconds is controlled by hidden
      browser.urlbar.disableSuggestEvent.maxSecondsFromLastSearch pref.
      Reported values refer to the last search.
    extra_keys:
      sap:
        description: >
          `sap` is the meaning of `search access point`. It records where the
          user started the search action from. The possible values are: `urlbar`
          , `handoff`, `urlbar_newtab`, `urlbar_addonpage`, and `searchbar`.
        type: string
      location:
        description: >
          Which input was used: fullpage, sidebar, or urlbar.
        type: string
      window_mode:
        description: >
          The window mode: classic, private, or smartwindow.
        type: string
      interaction:
        description: >
          How the user started the search action. The possible values are:
          `typed`, `pasted`, `topsite_search` (clicked on a topsite search
          shortcut), `topsites` (selected a topsite result with empty search
          string), `returned` (The user abandoned a search, then returned to it)
          , `restarted` (The user abandoned a search, then returned to it,
          cleared it and typed a completely different string), `refined` (The
          user abandoned a search, then returned to it, and partially modified
          the string), `persisted_search_terms` (The user returned to a previous
          successful search that persisted terms in the urlbar),
          `persisted_search_terms_restarted` (The user returned to a previous
          successful search that persisted terms in the urlbar, then cleared it
          and typed a completely different string) and
          `persisted_search_terms_refined` (The user returned to a previous
          successful search that persisted terms in the urlbar, and partially
          modified the string).
        type: string
      search_mode:
        description: >
          If the urlbar is in search mode, thus restricting results to a
          specific search engine or local source, this is set to the search mode
          source. The possible sources are: `actions`, `bookmarks`, `history`,
          `search_engine`, and `tabs`. If search mode is active but the source
          did not fall into any of these categories, this will be `unknown`. If
          search mode is not active, this will be an empty string.
        type: string
      search_engine_default_id:
        description: >
          The telemetry id of the search engine.
          Reflects `search.engine.default.engine_id`.
        type: string
      n_chars:
        description: >
          The length of string used for the search. It includes whitespaces.
        type: quantity
      n_words:
        description: >
          The length of words used for the search. The words are made by
          splitting the search string by whitespaces, thus this doesn’t support
          CJK languages. For performance reasons a maximum of 255 characters are
          considered when splitting.
        type: quantity
      n_results:
        description: >
          The number of results shown to the user. If this is high the results
          list below may be truncated due to technical limitations. Also note in
          that case not all the results may be physically visible due to the
          screen size limitation.
        type: quantity
      selected_result:
        description: >
          The type of the result the user selected. If the last search was an engagement,
          it will be set to the selected_result value of the engagement event, otherwise in
          the case of the abandonment event, it will be set to `none`.
        type: string
      results:
        description: >
          Comma separated list of result types in the order they were shown to
          the user. The `unknown` type should not occur and indicates a bug. The
          types are one of the values defined for the engagement event results property.
        type: string
      feature:
        description: >
          The specific feature that is being disabled. The possible types are:
          `suggest`
          More values may be added in the future.
        type: string
      chat_id: *chat_id
      intent: *intent
      model: *model
    bugs:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1960836
      - https://bugzilla.mozilla.org/show_bug.cgi?id=2009615
      - https://bugzilla.mozilla.org/show_bug.cgi?id=2027637
    data_reviews:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1960836
      - https://bugzilla.mozilla.org/show_bug.cgi?id=2009615
      - https://bugzilla.mozilla.org/show_bug.cgi?id=2027637
    data_sensitivity:
      - interaction
    notification_emails:
      - fx-search-telemetry@mozilla.com
    expires: never

  engagement:
    type: event
    description: Recorded when the user executes an action on a result.
    extra_keys:
      sap:
        description: >
          `sap` is the meaning of `search access point`. It records where the
          user started the search action from. The possible values are: `urlbar`
          , `handoff`, `urlbar_newtab`, `urlbar_addonpage`, and `searchbar`.
        type: string
      location:
        description: >
          Which input was used: fullpage, sidebar, or urlbar.
        type: string
      window_mode:
        description: >
          The window mode: classic, private, or smartwindow.
        type: string
      interaction:
        description: >
          How the user started the search action. The possible values are:
          `typed`, `pasted`, `topsite_search` (clicked on a topsite search
          shortcut), `topsites` (selected a topsite result with empty search
          string), `returned` (The user abandoned a search, then returned to it)
          , `restarted` (The user abandoned a search, then returned to it,
          cleared it and typed a completely different string), `refined` (The
          user abandoned a search, then returned to it, and partially modified
          the string), `persisted_search_terms` (The user returned to a previous
          successful search that persisted terms in the urlbar),
          `persisted_search_terms_restarted` (The user returned to a previous
          successful search that persisted terms in the urlbar, then cleared it
          and typed a completely different string) and
          `persisted_search_terms_refined` (The user returned to a previous
          successful search that persisted terms in the urlbar, and partially
          modified the string).
        type: string
      search_mode:
        description: >
          If the urlbar is in search mode, thus restricting results to a
          specific search engine or local source, this is set to the search mode
          source. The possible sources are: `actions`, `bookmarks`, `history`,
          `search_engine`, and `tabs`. If search mode is active but the source
          did not fall into any of these categories, this will be `unknown`. If
          search mode is not active, this will be an empty string.
        type: string
      search_engine_default_id:
        description: >
          The telemetry id of the search engine.
          Reflects `search.engine.default.engine_id`.
        type: string
      n_chars:
        description: >
          The length of string used for the search. It includes whitespaces.
        type: quantity
      n_words:
        description: >
          The length of words used for the search. The words are made by
          splitting the search string by whitespaces, thus this doesn’t support
          CJK languages. For performance reasons a maximum of 255 characters are
          considered when splitting.
        type: quantity
      n_results:
        description: >
          The number of results shown to the user. If this is high the results
          list below may be truncated due to technical limitations. Also note in
          that case not all the results may be physically visible due to the
          screen size limitation.
        type: quantity
      selected_result:
        description: >
          The type of the result the user selected. The `unknown` type should
          not occur and indicates a bug. The possible types are:
          `action`,
          `addon`,
          `ai_chat`,
          `ai_search_fallback`,
          `autofill_about`,
          `autofill_adaptive_origin`,
          `autofill_adaptive_url`,
          `autofill_origin`,
          `autofill_unknown`,
          `autofill_url`,
          `bookmark`,
          `bookmark_adaptive`,
          `bookmark_adaptive_serp`,
          `bookmark_serp`,
          `calc`,
          `clipboard`,
          `experimental_addon`,
          `fxsuggest_data_sharing_opt_in`,
          `history`,
          `history_adaptive`,
          `history_adaptive_serp`,
          `history_autofill_fallback_origin`,
          `history_semantic`,
          `history_semantic_serp`,
          `history_serp`,
          `input_field`,
          `intervention_clear`,
          `intervention_refresh`,
          `intervention_unknown`,
          `intervention_update`,
          `keyword`,
          `merino_adm_sponsored`,
          `merino_amo`,
          `merino_market`,
          `merino_top_picks`,
          `merino_wikipedia`,
          `ml_yelp`,
          `recent_search`,
          `remote_tab`,
          `restrict_keyword_actions`,
          `restrict_keyword_bookmarks`,
          `restrict_keyword_history`,
          `restrict_keyword_tabs`,
          `rust_adm_nonsponsored`,
          `rust_adm_sponsored`,
          `rust_amo`,
          `rust_exposure`,
          `rust_important_dates`,
          `rust_market_opt_in`,
          `rust_mdn`,
          `rust_yelp`,
          `search_engine`,
          `search_history`,
          `search_shortcut_button`,
          `search_suggest`,
          `search_suggest_rich`,
          `site_specific_contextual_search`,
          `tab`,
          `tab_adaptive`,
          `tab_adaptive_serp`,
          `tab_semantic`,
          `tab_semantic_serp`,
          `tab_serp`,
          `tab_to_search`,
          `tip_dismissal_acknowledgment`,
          `tip_onboard`,
          `tip_redirect`,
          `tip_unknown`,
          `top_site`,
          `trending_search`,
          `trending_search_rich`,
          `unit`,
          `url`,
          `weather`
          If the user has selected an action this will be set with an action
          prefix as followed
          `action_*`
          Where the wildcard(*) will be replaced by one of the values
          documented in the actions field.
        type: string
      selected_position:
        description: >
          The 1-based index of the result the user selected. If user searched
          without selection, 0 will be recorded.
        type: quantity
      provider:
        description: >
          The name of the `UrlbarProvider` that provided the selected result.
          The possible values are: `AboutPages`, `AliasEngines`, `Autofill`,
          `BookmarkKeywords`, `calculator`, `UrlbarProviderContextualSearch`,
          `HeuristicFallback`, `HistoryUrlHeuristic`, `InputHistory`,
          `UrlbarProviderInterventions`, `Omnibox`, `OpenTabs`, `Places`,
          `PrivateSearch`, `quickactions`, `UrlbarProviderQuickSuggest`,
          `RemoteTabs`, `SearchSuggestions`, `UrlbarProviderSearchTips`,
          `TabToSearch`, `TokenAliasEngines`, `UrlbarProviderTopSites`,
          `UnitConversion` and `UnifiedComplete`.
          If engagement_type is `drop_go` or `paste_go`, this will be null
          because no results are shown. And also, if selected_result is
          `experimental_addon`, it means that the user selected a result
           from an add-on using the urlbar experimental API. In this case,
           this will be the provider name specified by the add-on.
        type: string
      engagement_type:
        description: >
          Records how the user selected the result. The possible values are:
          `ask_button`,
          `click`,
          `dismiss`,
          `drop_go`,
          `enter`,
          `go_button`,
          `help`,
          `inaccurate_location`,
          `manage`,
          `navigate_button`,
          `not_interested`,
          `not_now`,
          `opt_in`,
          `paste_go`,
          `search_button`,
          `show_less_frequently`
        type: string
      groups:
        description: >
          Comma separated list of result groups in the order they were shown to
          the user. The groups may be repeated, since the list will match 1:1
          the results list, so we can link each result to a group. The possible
          group names are: `heuristic`, `adaptive_history`, `search_history`,
          `search_suggest`, `search_suggest_rich`, `trending_search`,
          `trending_search_rich`, `top_pick`, `top_site`, `recent_search`,
          `remote_tab`, `addon`, `general`, `suggest`, `about_page`,
          `suggested_index`, `restrict_keyword`, `ai`.
          If the group did not fall into any of these, this will be `unknown`
          and a bug should be filed to investigate it. If engagement_type is
          `drop_go` or `paste_go`, this  will be empty string because no results
          are shown.
        type: string
      results:
        description: >
          Comma separated list of result types in the order they were shown to
          the user. The `unknown` type should not occur and indicates a bug. The
          possible types are:
          `action`,
          `addon`,
          `ai_chat`,
          `ai_search_fallback`,
          `autofill_about`,
          `autofill_adaptive_origin`,
          `autofill_adaptive_url`,
          `autofill_origin`,
          `autofill_unknown`,
          `autofill_url`,
          `bookmark`,
          `bookmark_adaptive`,
          `bookmark_adaptive_serp`,
          `bookmark_serp`,
          `calc`,
          `clipboard`,
          `fxsuggest_data_sharing_opt_in`,
          `history`,
          `history_adaptive`,
          `history_adaptive_serp`,
          `history_autofill_fallback_origin`,
          `history_semantic`,
          `history_semantic_serp`,
          `history_serp`,
          `intervention_clear`,
          `intervention_refresh`,
          `intervention_unknown`,
          `intervention_update`,
          `keyword`,
          `merino_adm_sponsored`,
          `merino_amo`,
          `merino_market`,
          `merino_top_picks`,
          `merino_wikipedia`,
          `ml_yelp`,
          `recent_search`,
          `remote_tab`,
          `restrict_keyword_actions`,
          `restrict_keyword_bookmarks`,
          `restrict_keyword_history`,
          `restrict_keyword_tabs`,
          `rust_adm_nonsponsored`,
          `rust_adm_sponsored`,
          `rust_amo`,
          `rust_exposure`,
          `rust_important_dates`,
          `rust_market_opt_in`,
          `rust_mdn`,
          `rust_yelp`,
          `search_engine`,
          `search_history`,
          `search_suggest`,
          `search_suggest_rich`,
          `tab`,
          `tab_adaptive`,
          `tab_adaptive_serp`,
          `tab_semantic`,
          `tab_semantic_serp`,
          `tab_serp`,
          `tab_to_search`,
          `tip_dismissal_acknowledgment`,
          `tip_onboard`,
          `tip_redirect`,
          `tip_unknown`,
          `top_site`,
          `trending_search`,
          `trending_search_rich`,
          `unit`,
          `url`,
          `weather`
        type: string
      actions:
        description: >
          Comma separated list of actions keys in the order they were shown to
          the user. Possible keys are: `addons`, `bookmarks`, `clear`, `downloads`,
          `extensions`, `inspect`, `logins`, `print`, `private`,
          `refresh`, `restart`, `savepdf`, `screenshot`, `settings`, `tabswitch`,
          `themes`, `update`, `viewsource`.
          If there is no action shown in a position that is denoted with `none`.
        type: string
      available_semantic_sources:
        description: >
          Comma separated list of semantic sources that were available to search.
          This indicates general availability of the source, not whether it was
          queried.
          The possible values are: `history`, `none`.
        type: string
      chat_id: *chat_id
      intent: *intent
      model: *model
    bugs:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1797265
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1805717
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1842247
      - https://bugzilla.mozilla.org/show_bug.cgi?id=2003067
      - https://bugzilla.mozilla.org/show_bug.cgi?id=2008925
      - https://bugzilla.mozilla.org/show_bug.cgi?id=2009615
      - https://bugzilla.mozilla.org/show_bug.cgi?id=2027637
    data_reviews:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1797265#c3
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1805717#c4
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1842247#c3
      - https://bugzilla.mozilla.org/show_bug.cgi?id=2003067
      - https://bugzilla.mozilla.org/show_bug.cgi?id=2008925
      - https://bugzilla.mozilla.org/show_bug.cgi?id=2009615
      - https://bugzilla.mozilla.org/show_bug.cgi?id=2027637
    data_sensitivity:
      - interaction
    notification_emails:
      - fx-search-telemetry@mozilla.com
    expires: never

  heuristic_result_missing:
    type: rate
    description: >
      A uint recording the number of times the address bar handleCommand fallback
      path is hit.
    bugs:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1650819
    data_reviews:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1650819
    notification_emails:
      - fx-search-telemetry@mozilla.com
    data_sensitivity:
      - technical
    expires: never

  exposure:
    type: event
    description: >
      Recorded when client is exposed to urlbar experiment results.
    extra_keys:
      results:
        description: >
          Comma separated list of results that were exposed to the user.
        type: string
      terminal:
        description: >
          Comma separated list of booleans that indicates whether the results
          were present at the end of the urlbar session. This list is parallel
          to the `results` list. i.e., the boolean at index i is true if the
          result at index i was present at the end of the session. For example,
          if `results` is "bookmark,history,search_suggest" and the bookmark was
          not present at the end of the session, the history result was present,
          and the search suggestion was not present, then `terminal` will be
          "false,true,false".
        type: string
      sap:
        type: string
        description: >
          The search access point. It records where the exposure happened.
          The possible values are: `urlbar`, `handoff`, `urlbar_newtab`,
          `urlbar_addonpage`, and `searchbar`.
    bugs:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1819766
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1918299
    data_reviews:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1819766#c9
    data_sensitivity:
      - interaction
    notification_emails:
      - fx-search-telemetry@mozilla.com
    expires: never

  keyword_exposure:
    type: event
    description: >
      When keyword exposures are enabled, this event is recorded in the
      `urlbar-keyword-exposure` ping, which is submitted at the end of urlbar
      sessions during which one or more exposure results are matched. The ping
      will contain one `keyword_exposure` event for each instance where a result
      is matched during the session. See the `urlbar-keyword-exposure` ping for
      details.
    extra_keys:
      result:
        type: string
        description: >
          The type of result that was matched.
      keyword:
        type: string
        description: >
          The keyword that matched the result.
      terminal:
        type: boolean
        description: >
          Whether the matched result and keyword were present at the end of the
          urlbar session. If true, the session ended with them. If false, the
          result and keyword were matched at some point during the session but
          the session did not end with them.
      sap:
        type: string
        description: >
          The search access point. It records where the exposure happened.
          The possible values are: `urlbar`, `handoff`, `urlbar_newtab`,
          `urlbar_addonpage`, and `searchbar`.
    bugs:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1881875
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1915507
    data_reviews:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1881875
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1915507
    data_sensitivity:
      - stored_content
    notification_emails:
      - fx-search-telemetry@mozilla.com
    expires: never
    send_in_pings:
      - urlbar-keyword-exposure

  pref_max_results:
    lifetime: application
    type: quantity
    unit: integer
    description: >
      Maximum results to show in the Address Bar.
      Corresponds to the value of the `browser.urlbar.maxRichResults` pref.
    bugs:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1817196
      - https://bugzilla.mozilla.org/show_bug.cgi?id=2014318
    data_reviews:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1817196
    data_sensitivity:
      - interaction
    notification_emails:
      - fx-search-telemetry@mozilla.com
    expires: never
    send_in_pings:
      - events
      - metrics

  pref_suggest_all:
    lifetime: application
    type: boolean
    description: >
      Whether Suggest results are shown in the urlbar.
      Corresponds to the value of the
      `browser.urlbar.suggest.quicksuggest.all` pref.
    bugs:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1995574
      - https://bugzilla.mozilla.org/show_bug.cgi?id=2014318
    data_reviews:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1995574
    data_sensitivity:
      - interaction
    notification_emails:
      - fx-search-telemetry@mozilla.com
    expires: never
    send_in_pings:
      - events
      - metrics

  pref_suggest_online_available:
    lifetime: application
    type: boolean
    description: >
      Whether online Suggest is available to the user.
      Corresponds to the Nimbus variable `quickSuggestOnlineAvailable` and its
      fallback pref `browser.urlbar.quicksuggest.online.available`.
      NOTE: "Online Suggest" in this context means the new version of online
      Suggest introduced in 146 with Terms of Use and OHTTP.
    bugs:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1995362
      - https://bugzilla.mozilla.org/show_bug.cgi?id=2014318
    data_reviews:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1995362
    data_sensitivity:
      - interaction
    notification_emails:
      - fx-search-telemetry@mozilla.com
    expires: never
    send_in_pings:
      - events
      - metrics

  pref_suggest_online_enabled:
    lifetime: application
    type: boolean
    description: >
      This pref is true for all users by default! You probably want to use this
      in conjunction with pref_suggest_online_available and/or restrict your
      analysis to user populations where you know online Suggest is available.
      Corresponds to `browser.urlbar.quicksuggest.online.enabled`.
      NOTE: "Online Suggest" in this context means the new version of online
      Suggest introduced in 146 with Terms of Use and OHTTP.
    bugs:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1995362
      - https://bugzilla.mozilla.org/show_bug.cgi?id=2014318
    data_reviews:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1995362
    data_sensitivity:
      - interaction
    notification_emails:
      - fx-search-telemetry@mozilla.com
    expires: never
    send_in_pings:
      - events
      - metrics

  pref_suggest_sponsored:
    lifetime: application
    type: boolean
    description: >
      Whether sponsored quick suggest results are shown in the urlbar.
      Corresponds to the value of the
      `browser.urlbar.suggest.quicksuggest.sponsored` pref.
    bugs:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1847855
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1849726
      - https://bugzilla.mozilla.org/show_bug.cgi?id=2014318
    data_reviews:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1847855
    data_sensitivity:
      - interaction
    notification_emails:
      - fx-search-telemetry@mozilla.com
    expires: never
    send_in_pings:
      - events
      - metrics

  pref_suggest_topsites:
    lifetime: application
    type: boolean
    description: >
      Whether topsite results are enabled in the urlbar.
      Corresponds to the value of the `browser.urlbar.suggest.topsites` pref.
    bugs:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1817196
      - https://bugzilla.mozilla.org/show_bug.cgi?id=2014318
    data_reviews:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1817196
    data_sensitivity:
      - interaction
    notification_emails:
      - fx-search-telemetry@mozilla.com
    expires: never
    send_in_pings:
      - events
      - metrics

  autofill_deletion:
    type: counter
    description: >
      A uint recording the deletion count for autofilled string in the
      urlbar. This occurs when the user deletes whole autofilled string by
      BACKSPACE or DELETE key while the autofilled string is selected.
      This metric was generated to correspond to the Legacy Telemetry
      scalar urlbar.autofill_deletion.
    bugs:
      - https://bugzil.la/1815342
    data_reviews:
      - https://bugzil.la/1815342
    notification_emails:
      - fx-search-telemetry@mozilla.com
    expires: never
    telemetry_mirror: URLBAR_AUTOFILL_DELETION

  autocomplete_first_result_time:
    type: timing_distribution
    description: >
      PLACES: Time for first autocomplete result if > 50ms (ms)

      This metric was generated to correspond to the Legacy Telemetry
      exponential histogram PLACES_AUTOCOMPLETE_1ST_RESULT_TIME_MS.
    time_unit: millisecond
    bugs:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1950710
    data_reviews:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1950710
    notification_emails:
      - fx-search-telemetry@mozilla.com
      - adw@mozilla.com
    expires: never
    telemetry_mirror: PLACES_AUTOCOMPLETE_1ST_RESULT_TIME_MS

  autocomplete_sixth_result_time:
    type: timing_distribution
    description: >
      PLACES: Time for the 6 first autocomplete results (ms)

      This metric was generated to correspond to the Legacy Telemetry
      exponential histogram PLACES_AUTOCOMPLETE_6_FIRST_RESULTS_TIME_MS.
    time_unit: millisecond
    bugs:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1489524
    data_reviews:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1489524
    notification_emails:
      - fx-search-telemetry@mozilla.com
      - adw@mozilla.com
    expires: never
    telemetry_mirror: PLACES_AUTOCOMPLETE_6_FIRST_RESULTS_TIME_MS

# Replacement for PingCentre "quicksuggest-block|impression|click" pings.
quick_suggest:
  ping_type:
    type: string
    description: >
      The ping's type. In other situations might be designated by an event's
      name or an interaction field. E.g. "quicksuggest-impression",
      "quicksuggest-block", "quicksuggest-click".
    bugs:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1836283
    data_reviews:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1836283
    data_sensitivity:
      - interaction
    notification_emails:
      - najiang@mozilla.com
    expires: never
    send_in_pings:
      - quick-suggest

  country:
    type: string
    description: >
      Records the home region of the user as determined by `Region.sys.mjs` and
      the `browser.search.region` pref.
    bugs:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1968154
    data_reviews:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1968154
    data_sensitivity:
      - technical
    notification_emails:
      - fx-search-telemetry@mozilla.com
      - disco-team@mozilla.com
      - ads-eng@mozilla.com
    expires: never
    send_in_pings:
      - quick-suggest

  position:
    type: quantity
    unit: QuickSuggest position
    description: >
      The position (1-based) of the QuickSuggest item being interatcted with.
    bugs:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1836283
    data_reviews:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1836283
    data_sensitivity:
      - interaction
    notification_emails:
      - najiang@mozilla.com
    expires: never
    send_in_pings:
      - quick-suggest

  suggested_index:
    type: string
    description: >
      A stringified integer value that is the intended index of the suggestion
      being interacted with. If `suggested_index_relative_to_group` is true, the
      index is relative to the "Firefox Suggest" group; otherwise the index is
      relative to the entire list of suggestions. Non-negative values (starting
      at 0) are relative to the start/top of the group/list; negative values are
      relative to the end/bottom of the group/list.
    bugs:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1854755
    data_reviews:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1854755
    data_sensitivity:
      - interaction
    notification_emails:
      - najiang@mozilla.com
    expires: never
    send_in_pings:
      - quick-suggest

  suggested_index_relative_to_group:
    type: boolean
    description: >
      Whether `suggested_index` is relative to the "Firefox Suggest" group. If
      false, it is relative to the entire list of suggestions.
    bugs:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1854755
    data_reviews:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1854755
    data_sensitivity:
      - interaction
    notification_emails:
      - najiang@mozilla.com
    expires: never
    send_in_pings:
      - quick-suggest

  source:
    type: string
    description: >
      The source of the interaction. E.g. "urlbar".
    bugs:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1836283
    data_reviews:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1836283
    data_sensitivity:
      - interaction
    notification_emails:
      - najiang@mozilla.com
    expires: never
    send_in_pings:
      - quick-suggest

  match_type:
    type: string
    description: >
      Whether this was a best/top match or not. Either "best-match" or
      "firefox-suggest".
    bugs:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1836283
    data_reviews:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1836283
    data_sensitivity:
      - interaction
    notification_emails:
      - najiang@mozilla.com
    expires: never
    send_in_pings:
      - quick-suggest

  block_id:
    type: string
    description: >
      A unique identifier for the suggestion (a.k.a. a keywords block).
    bugs:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1836283
    data_reviews:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1836283
    data_sensitivity:
      - interaction
    notification_emails:
      - najiang@mozilla.com
    expires: never
    send_in_pings:
      - quick-suggest

  improve_suggest_experience:
    type: boolean
    description: >
      Whether online Suggest is available to the user and enabled.
    bugs:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1836283
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1995362
    data_reviews:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1836283
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1995362
    data_sensitivity:
      - interaction
    notification_emails:
      - najiang@mozilla.com
    expires: never
    send_in_pings:
      - quick-suggest

  advertiser:
    type: string
    description: >
      The name of the advertiser providing the sponsored TopSite.
    bugs:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1836283
    data_reviews:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1836283
    data_sensitivity:
      - interaction
      - web_activity
    notification_emails:
      - najiang@mozilla.com
    expires: never
    send_in_pings:
      - quick-suggest

  request_id:
    type: string
    description: >
      A request identifier for each API request to
      [Merino](https://mozilla-services.github.io/merino/).
      Only present for suggestions provided by Merino.
    bugs:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1836283
    data_reviews:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1836283
    data_sensitivity:
      - interaction
      - web_activity
    notification_emails:
      - najiang@mozilla.com
    expires: never
    send_in_pings:
      - quick-suggest

  is_clicked:
    type: boolean
    description: >
      Whether this quicksuggest-impression ping was for an item that was
      clicked.
    bugs:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1836283
    data_reviews:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1836283
    data_sensitivity:
      - interaction
    notification_emails:
      - najiang@mozilla.com
    expires: never
    send_in_pings:
      - quick-suggest

  reporting_url:
    type: url
    description: >
      The url to report this interaction to.
    bugs:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1836283
    data_reviews:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1836283
    data_sensitivity:
      - web_activity
    notification_emails:
      - najiang@mozilla.com
    expires: never
    send_in_pings:
      - quick-suggest

  context_id:
    type: uuid
    description: >
      An identifier to identify users for Contextual Services user interaction pings.
    bugs:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1836283
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1941161
    data_reviews:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1836283
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1941161
    data_sensitivity:
      - technical
    notification_emails:
      - najiang@mozilla.com
    expires: never
    send_in_pings:
      - quick-suggest
      - quick-suggest-deletion-request

  iab_category:
    type: string
    description: >
      The suggestion's category. Either "22 - Shopping" or "5 - Educational".
    bugs:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1836283
    data_reviews:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1836283
    data_sensitivity:
      - interaction
      - web_activity
    notification_emails:
      - najiang@mozilla.com
    expires: never
    send_in_pings:
      - quick-suggest

  suggestion_id:
    type: string
    description: >
      The suggestion ID from MARS/Merino.
    bugs:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=2050684
    data_reviews:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=2050684
    data_sensitivity:
      - interaction
    notification_emails:
      - najiang@mozilla.com
    expires: never
    send_in_pings:
      - quick-suggest

# Metrics from the Rust suggest component.
#
# We can't record metrics from Rust directly.  To work around that we:
#   - Define the metrics here.
#   - Define API calls in Rust suggest component that return the metrics
#     alongside the normal results.
#   - Record the metrics in the JS code in this component

suggest:
  ingest_time:
    type: labeled_timing_distribution
    description: Time for ingestion (excluding download time), labelled by record type
    time_unit: microsecond
    labels:
      - icon
      - amp
      - wikipedia
      - amo-suggestions
      - yelp-suggestions
      - mdn-suggestions
      - weather
      - configuration
    bugs:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1908397
    data_reviews:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1911664
    notification_emails:
      - disco-team@mozilla.com
      - bdk@mozilla.com
    expires: "never"
    data_sensitivity:
      - technical

  ingest_download_time:
    type: labeled_timing_distribution
    description: Download time for ingestion, labelled by record type
    time_unit: microsecond
    labels:
      - icon
      - amp
      - wikipedia
      - amo-suggestions
      - yelp-suggestions
      - mdn-suggestions
      - weather
      - configuration
    bugs:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1908397
    data_reviews:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1911664
    notification_emails:
      - disco-team@mozilla.com
      - bdk@mozilla.com
    expires: "never"
    data_sensitivity:
      - technical

  query_time:
    type: labeled_timing_distribution
    description: Time executing queries, labelled by provider type
    time_unit: microsecond
    labels:
      - amp
      - wikipedia
      - amo
      - yelp
      - mdn
      - weather
    bugs:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1908397
    data_reviews:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1911664
    notification_emails:
      - disco-team@mozilla.com
      - bdk@mozilla.com
    expires: "never"
    data_sensitivity:
      - technical

# Relevance scoring & ranking metrics for Firefox Suggest.
# This feature is still in the experimentation phase and all the metrics are
# set to expire by 136 for now.
suggest_relevance:
  status:
    type: labeled_counter
    description: >
      Count the successful / failed attempts of relevance scoring in
      Firefox Suggest.
    labels:
      - success
      - failure
    bugs:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1926315
    data_reviews:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1926315
    notification_emails:
      - disco-team@mozilla.com
      - najiang@mozilla.com
    expires: 160
    data_sensitivity:
      - technical
  outcome:
    type: labeled_counter
    description: >
      For each successful scoring, count whether the relevance score gets
      boosted or decreased over the original score. Note that given how the
      score is calculated, it's practically impossible to have the two scores
      tied. If that's the case anyhow, it will increment the "boosted" counter.
    labels:
      - boosted
      - decreased
    bugs:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1926315
    data_reviews:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=1926315
    notification_emails:
      - disco-team@mozilla.com
      - najiang@mozilla.com
    expires: 160
    data_sensitivity:
      - technical

urlbar.trending:
  block:
    type: counter
    description: >
      User has blocked seeing trending results.
      This metric was generated to correspond to the Legacy Telemetry
      scalar urlbar.trending.block.
    bugs:
      - https://bugzil.la/1848048
    data_reviews:
      - https://bugzil.la/1848048
    notification_emails:
      - fx-search-telemetry@mozilla.com
    expires: never
    telemetry_mirror: URLBAR_TRENDING_BLOCK

urlbar.persistedsearchterms:
  revert_by_popup_count:
    type: counter
    description: >
      The count of the number of times search terms were removed from the
      urlbar due to a shown PopupNotification. This event can happen when
      a user loads a SERP and a PopupNotification is shown, as well as
      when a user switches away from a tab on a SERP showing a
      PopupNotification and switches back to it.
      This metric was generated to correspond to the Legacy Telemetry
      scalar urlbar.persistedsearchterms.revert_by_popup_count.
    bugs:
      - https://bugzil.la/1815971
    data_reviews:
      - https://bugzil.la/1815971
    notification_emails:
      - fx-search-telemetry@mozilla.com
    expires: never
    telemetry_mirror: URLBAR_PERSISTEDSEARCHTERMS_REVERT_BY_POPUP_COUNT

  view_count:
    type: counter
    description: >
      The count of the number of times search terms persisted in the
      Urlbar. This gets recorded after a user loads a SERP that persists
      search terms, or switches back to an existing tab that should be
      showing the persisted search terms in the Urlbar, regardless of
      whether PopupNotification cleared the search terms from the Urlbar.
      This metric was generated to correspond to the Legacy Telemetry
      scalar urlbar.persistedsearchterms.view_count.
    bugs:
      - https://bugzil.la/1815971
    data_reviews:
      - https://bugzil.la/1815971
    notification_emails:
      - fx-search-telemetry@mozilla.com
    expires: never
    telemetry_mirror: URLBAR_PERSISTEDSEARCHTERMS_VIEW_COUNT

urlbar.zeroprefix:
  abandonment:
    type: counter
    description: >
      Counts how many times the zero-prefix urlbar results panel was
      abandoned.
      This metric was generated to correspond to the Legacy Telemetry
      scalar urlbar.zeroprefix.abandonment.
    bugs:
      - https://bugzil.la/1806765
    data_reviews:
      - https://bugzil.la/1806765
    notification_emails:
      - fx-search-telemetry@mozilla.com
    expires: never
    telemetry_mirror: URLBAR_ZEROPREFIX_ABANDONMENT

  engagement:
    type: counter
    description: >
      Counts how many times a result was picked in the zero-prefix urlbar
      results panel.
      This metric was generated to correspond to the Legacy Telemetry
      scalar urlbar.zeroprefix.engagement.
    bugs:
      - https://bugzil.la/1806765
    data_reviews:
      - https://bugzil.la/1806765
    notification_emails:
      - fx-search-telemetry@mozilla.com
    expires: never
    telemetry_mirror: URLBAR_ZEROPREFIX_ENGAGEMENT

  exposure:
    type: counter
    description: >
      Counts how many times the zero-prefix urlbar results panel was shown
      to the user.
      This metric was generated to correspond to the Legacy Telemetry
      scalar urlbar.zeroprefix.exposure.
    bugs:
      - https://bugzil.la/1806765
    data_reviews:
      - https://bugzil.la/1806765
    notification_emails:
      - fx-search-telemetry@mozilla.com
    expires: never
    telemetry_mirror: URLBAR_ZEROPREFIX_EXPOSURE

urlbar.quickaction:
  picked:
    type: labeled_counter
    description: >
      Counts how many times quickaction results were selected. The key is
      the in the form "actionkey-N" where N is the number of characters
      the user typed to be shown the action.
      This metric was generated to correspond to the Legacy Telemetry
      scalar quickaction.picked.
    bugs:
      - https://bugzil.la/1783155
    data_reviews:
      - https://bugzil.la/1783155
    notification_emails:
      - fx-search-telemetry@mozilla.com
    expires: never
    telemetry_mirror: QUICKACTION_PICKED

urlbar.unifiedsearchbutton:
  opened:
    type: counter
    description: >
      Counts how many times Unified Search Button popup is opened.
      This metric was generated to correspond to the Legacy Telemetry
      scalar urlbar.unifiedsearchbutton.opened.
    bugs:
      - https://bugzil.la/1936673
    data_reviews:
      - https://bugzil.la/1936673
    notification_emails:
      - fx-search-telemetry@mozilla.com
    expires: never
    telemetry_mirror: URLBAR_UNIFIEDSEARCHBUTTON_OPENED

  picked:
    type: labeled_counter
    description: >
      Counts how many times Unified Search Button items were selected.
      The key is followings.
      * builtin_search: Builtin search engine.
      * addon_search: Addon search engine.
      * local_search: Local search engine such as Bookmarks.
      * settings: Settings menu.
      This metric was generated to correspond to the Legacy Telemetry
      scalar urlbar.unifiedsearchbutton.picked.
    bugs:
      - https://bugzil.la/1936673
    data_reviews:
      - https://bugzil.la/1936673
    notification_emails:
      - fx-search-telemetry@mozilla.com
    expires: never
    telemetry_mirror: URLBAR_UNIFIEDSEARCHBUTTON_PICKED

urlbar.autofill:
  reintegration:
    type: labeled_counter
    description: >
      Counts how many times a blocked autofill result was reintegrated
      (unblocked) because the user picked the same URL as a non-autofill
      history result.
    labels:
      - origin
      - url
    bugs:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=2019719
    data_reviews:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=2019719
    notification_emails:
      - fx-search-telemetry@mozilla.com
    expires: never
    data_sensitivity:
      - interaction

  reintegration_after_backspace:
    type: labeled_timing_distribution
    description: >
      Time elapsed between a backspace-induced autofill block and the user
      re-integrating the same destination by picking it as a non-autofill
      history result in the same session. Only samples re-integrations of
      blocks that were set via consecutive backspaces on an autofilled
      value, blocks set via the result menu Dismiss action do not
      contribute samples. Labeled by whether the cleared block was at the
      origin or page-URL level.
    time_unit: millisecond
    labels:
      - origin
      - url
    bugs:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=2037177
    data_reviews:
      - https://bugzilla.mozilla.org/show_bug.cgi?id=2037177
    notification_emails:
      - fx-search-telemetry@mozilla.com
    expires: never
    data_sensitivity:
      - interaction

urlbar.merino:
  latency_by_response_status:
    type: labeled_timing_distribution
    description: >
      Duration from when the client sends a request to Merino to when the client
      receives a response, labeled by response status code. Labels are dynamic.
      For non-OHTTP requests, labels are simply the numeric status code, e.g.,
      "200". For OHTTP requests, labels are `${status}_ohttp`, e.g., "200_ohttp".
    time_unit: millisecond
    bugs:
      - https://bugzil.la/1971448
    data_reviews:
      - https://bugzil.la/1971448
    notification_emails:
      - fx-search-telemetry@mozilla.com
      - disco-team@mozilla.com
    expires: never
