omnibox_event.proto 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451
  1. // Copyright 2014 The Chromium Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style license that can be
  3. // found in the LICENSE file.
  4. syntax = "proto2";
  5. option optimize_for = LITE_RUNTIME;
  6. option java_package = "org.chromium.components.metrics";
  7. option java_outer_classname = "OmniboxEventProtos";
  8. package metrics;
  9. import "omnibox_input_type.proto";
  10. // Stores information about an omnibox interaction.
  11. // Next tag: 23
  12. message OmniboxEventProto {
  13. // The timestamp for the event, in seconds.
  14. // This value comes from Chromium's TimeTicks::Now(), which is an abstract
  15. // time value that is guaranteed to always be non-decreasing (regardless of
  16. // Daylight Saving Time or any other changes to the system clock).
  17. // These numbers are only comparable within a session. To sequence events
  18. // across sessions, order by the |session_id| from the
  19. // ChromeUserMetricsExtension message.
  20. optional int64 time_sec = 1;
  21. // The id of the originating tab for this omnibox interaction.
  22. // This is the current tab *unless* the user opened the target in a new tab.
  23. // In those cases, this is unset. Tab ids are unique for a given session_id
  24. // (in the containing protocol buffer ChromeUserMetricsExtensionProto).
  25. optional int32 tab_id = 2;
  26. // The number of characters the user had typed before autocompleting.
  27. optional int32 typed_length = 3;
  28. // Whether the user deleted text immediately before selecting an omnibox
  29. // suggestion. This is usually the result of pressing backspace or delete.
  30. optional bool just_deleted_text = 11;
  31. // The number of terms that the user typed in the omnibox.
  32. optional int32 num_typed_terms = 4;
  33. // The index of the item that the user selected in the omnibox popup list.
  34. // This corresponds the index of the |suggestion| below.
  35. optional int32 selected_index = 5;
  36. // Whether the user selected the option to switch tabs (or ignored it
  37. // and navigated). If true, one or more |Suggestions| will have
  38. // |has_tab_match| set as well, which must include the |selected_index|.
  39. optional bool selected_tab_match = 17;
  40. // DEPRECATED. Whether or not the top match was hidden in the omnibox
  41. // suggestions dropdown.
  42. optional bool DEPRECATED_is_top_result_hidden_in_dropdown = 14
  43. [deprecated = true];
  44. // Whether the omnibox popup is open. It can be closed if, for instance,
  45. // the user clicks in the omnibox and hits return to reload the same page.
  46. // If the popup is closed, the suggestion list will contain only one item
  47. // and selected_index will be 0 (pointing to that single item). Because
  48. // paste-and-search/paste-and-go actions ignore the current content of the
  49. // omnibox dropdown (if it is open) when they happen, we pretend the
  50. // dropdown is closed when logging these.
  51. optional bool is_popup_open = 15;
  52. // True if this is a paste-and-search or paste-and-go action. (The codebase
  53. // refers to both these types as paste-and-go.)
  54. optional bool is_paste_and_go = 16;
  55. // The length of the inline autocomplete text in the omnibox.
  56. // The sum |typed_length| + |completed_length| gives the full length of the
  57. // user-visible text in the omnibox.
  58. // This field is only set for suggestions that are allowed to be the default
  59. // match and omitted otherwise. The first suggestion is always allowed to
  60. // be the default match. (This is an enforced constraint.) Hence, if
  61. // |selected_index| == 0, then this field will always be set.
  62. optional int32 completed_length = 6;
  63. // The amount of time, in milliseconds, since the user first began modifying
  64. // the text in the omnibox. If at some point after modifying the text, the
  65. // user reverts the modifications (thus seeing the current web page's URL
  66. // again), then writes in the omnibox again, this elapsed time should start
  67. // from the time of the second series of modification.
  68. optional int64 typing_duration_ms = 7;
  69. // The amount of time, in milliseconds, since the last time the default
  70. // (inline) match changed. This may be longer than the time since the
  71. // last keystroke. (The last keystroke may not have changed the default
  72. // match.) It may also be shorter than the time since the last keystroke
  73. // because the default match might have come from an asynchronous
  74. // provider. Regardless, it should always be less than or equal to
  75. // the field |typing_duration_ms|.
  76. optional int64 duration_since_last_default_match_update_ms = 13;
  77. // The type of page the user was on when they used the omnibox. Or the type of
  78. // page for which suggestions were prefetched from the server.
  79. enum PageClassification {
  80. // An invalid URL; shouldn't happen.
  81. INVALID_SPEC = 0;
  82. // chrome://newtab/. For modern versions of Chrome, this is only reported
  83. // when an extension is replacing the new tab page. Otherwise, new tab
  84. // page interactions will be reported as NTP_REALBOX,
  85. // INSTANT_NTP_WITH_FAKEBOX_AS_STARTING_FOCUS or
  86. // INSTANT_NTP_WITH_OMNIBOX_AS_STARTING_FOCUS.
  87. // For old versions of Chrome, this was reported for the default New Tab
  88. // Page.
  89. NTP = 1;
  90. // about:blank.
  91. BLANK = 2;
  92. // The user's home page. Note that if the home page is set to any
  93. // of the new tab page versions or to about:blank, then we'll
  94. // classify the page into those categories, not HOME_PAGE.
  95. HOME_PAGE = 3;
  96. // The catch-all entry of everything not included somewhere else
  97. // on this list.
  98. OTHER = 4;
  99. // The instant new tab page.
  100. OBSOLETE_INSTANT_NTP = 5; // DEPRECATED on August 2, 2013.
  101. // The user is on a search result page that does search term replacement.
  102. // This means the search terms are shown in the omnibox instead of the URL.
  103. // In other words: Query in Omnibox is Active for this SRP.
  104. SEARCH_RESULT_PAGE_DOING_SEARCH_TERM_REPLACEMENT = 6;
  105. // The new tab page in which this omnibox interaction first started
  106. // with the user having focus in the omnibox.
  107. INSTANT_NTP_WITH_OMNIBOX_AS_STARTING_FOCUS = 7;
  108. // The new tab page in which this omnibox interaction first started with the
  109. // user having focus in the fakebox. This is replaced by NTP_REALBOX.
  110. // DEPRECATED on Aug 17, 2020.
  111. INSTANT_NTP_WITH_FAKEBOX_AS_STARTING_FOCUS = 8;
  112. // The user is on a search result page that does not do search term
  113. // replacement. This means the URL of the SRP is shown in the omnibox.
  114. // In other words: Query in Omnibox is Inactive for this SRP.
  115. SEARCH_RESULT_PAGE_NO_SEARCH_TERM_REPLACEMENT = 9;
  116. // The user is on the home screen.
  117. APP_HOME = 10;
  118. // The user is in the search app.
  119. APP_SEARCH = 11;
  120. // The user is in the maps app.
  121. APP_MAPS = 12;
  122. // This omnibox interaction started with the user tapping the search button.
  123. SEARCH_BUTTON_AS_STARTING_FOCUS = 13;
  124. // This interaction started with the user focusing or typing in the search
  125. // box of the ChromeOS app list (a.k.a., launcher).
  126. CHROMEOS_APP_LIST = 14;
  127. // The new tab page in which this omnibox interaction started with the user
  128. // having focus in the realbox.
  129. NTP_REALBOX = 15;
  130. // Android's Search Widget started directly from Launcher.
  131. ANDROID_SEARCH_WIDGET = 16;
  132. // Android's Start surface homepage.
  133. START_SURFACE_HOMEPAGE = 17; // DEPRECATED on Jun 17, 2022.
  134. // New Tab with Omnibox focused with Android's start surface finale enabled.
  135. START_SURFACE_NEW_TAB = 18; // DEPRECATED on Jun 17, 2022.
  136. // Android's improved Search Widget with new suggestions.
  137. ANDROID_SHORTCUTS_WIDGET = 19;
  138. // The New Tab Page zero-prefix suggestion prefetch.
  139. // Used for prefetching suggestions and should never appear in an
  140. // OmniboxEventProto or any of its derived histograms. (PageClassification
  141. // enum is used in other places too, and not only OmniboxEventProto.)
  142. NTP_ZPS_PREFETCH = 20;
  143. // Android's auxiliary search backend.
  144. ANDROID_AUXILIARY_SEARCH = 21;
  145. // The Search Results Page zero-prefix suggestion prefetch.
  146. // Used for prefetching suggestions and should never appear in an
  147. // OmniboxEventProto or any of its derived histograms. (PageClassification
  148. // enum is used in other places too, and not only OmniboxEventProto.)
  149. SRP_ZPS_PREFETCH = 22;
  150. // The catch-all zero-prefix suggestion prefetch for everything other than
  151. // NTP and SRP.
  152. // Used for prefetching suggestions and should never appear in an
  153. // OmniboxEventProto or any of its derived histograms. (PageClassification
  154. // enum is used in other places too, and not only OmniboxEventProto.)
  155. OTHER_ZPS_PREFETCH = 23;
  156. // When adding new classifications, please consider adding them in
  157. // chromium's chrome/browser/resources/omnibox/omnibox.html
  158. // so that these new options are displayed on about:omnibox.
  159. }
  160. optional PageClassification current_page_classification = 10;
  161. enum ModeType {
  162. // Unknown type (should not be reported).
  163. UNKNOWN_MODE = 0;
  164. // This user is in web mode when looking for suggestions.
  165. WEB_MODE = 1;
  166. // This user is in image mode when looking for suggestions.
  167. IMAGE_MODE = 2;
  168. }
  169. optional ModeType mode_type = 18;
  170. optional OmniboxInputType input_type = 8;
  171. // An enum used in multiple places below.
  172. enum ProviderType {
  173. UNKNOWN_PROVIDER = 0; // Unknown provider (should not reach here)
  174. HISTORY_URL = 1; // URLs in history, or user-typed URLs
  175. HISTORY_CONTENTS = 2; // Matches for page contents of pages in history
  176. HISTORY_QUICK = 3; // Matches for recently or frequently visited pages
  177. // in history
  178. SEARCH = 4; // Search suggestions for the default search engine
  179. KEYWORD = 5; // Keyword-triggered searches
  180. BUILTIN = 6; // Built-in URLs, such as chrome://version
  181. SHORTCUTS = 7; // Recently selected omnibox suggestions
  182. EXTENSION_APPS = 8; // DEPRECATED. Suggestions from extensions or apps
  183. CONTACT = 9; // DEPRECATED. The user's contacts
  184. BOOKMARK = 10; // The user's bookmarks
  185. ZERO_SUGGEST = 11; // Suggestions based on the current page
  186. // This enum value is currently only used by Android GSA. It represents
  187. // a suggestion from the phone powered by go/icing.
  188. ON_DEVICE = 12;
  189. // This enum value is currently only used by Android GSA. It represents
  190. // a suggestion powered by a Chrome content provider.
  191. ON_DEVICE_CHROME = 13;
  192. CLIPBOARD = 14; // Suggestion coming from clipboard.
  193. PHYSICAL_WEB = 15; // DEPRECATED. Suggestions triggered by URLs broadcast
  194. // by nearby devices.
  195. DOCUMENT = 16; // Suggestions for documents in a cloud corpus.
  196. // Non personalized query suggestions generated from a lightweight on device
  197. // head model.
  198. ON_DEVICE_HEAD = 17;
  199. // Zero-prefix query suggestions based on device local history.
  200. ZERO_SUGGEST_LOCAL_HISTORY = 18;
  201. // Only used by Android Chrome. Represents a suggestion showing query tiles
  202. // that users can tap on for bulding queries.
  203. QUERY_TILE = 19;
  204. // Clusters generated on-device from the user's Chrome history.
  205. HISTORY_CLUSTER = 20;
  206. // Suggestions from history derived from input with automatic corrections.
  207. HISTORY_FUZZY = 21;
  208. // URLs amongst the user's currently open tabs.
  209. OPEN_TAB = 22;
  210. }
  211. // The result set displayed on the completion popup
  212. // Next tag: 10
  213. message Suggestion {
  214. // Where does this result come from?
  215. optional ProviderType provider = 1;
  216. // What kind of result this is.
  217. // This corresponds to the AutocompleteMatch::Type enumeration in
  218. // components/omnibox/autocomplete_match.h
  219. // (except for Android GSA result types).
  220. enum ResultType {
  221. UNKNOWN_RESULT_TYPE = 0; // Unknown type (should not reach here)
  222. URL_WHAT_YOU_TYPED = 1; // The input as a URL
  223. HISTORY_URL = 2; // A past page whose URL contains the input
  224. HISTORY_TITLE = 3; // A past page whose title contains the input
  225. HISTORY_BODY = 4; // DEPRECATED. A past page whose body
  226. // contains the input
  227. HISTORY_KEYWORD = 5; // A past page whose keyword contains the
  228. // input
  229. NAVSUGGEST = 6; // A suggested URL
  230. //
  231. // result_subtype_identifier is currently used
  232. // for contextual zero-suggest suggestions
  233. // provided by the experimental service (note
  234. // that not all NAVSUUGGEST suggestions come
  235. // from the experimental service).
  236. // For subtype definitions, please contact
  237. // gcomanici@chromium.org.
  238. SEARCH_WHAT_YOU_TYPED = 7; // The input as a search query (with the
  239. // default engine)
  240. SEARCH_HISTORY = 8; // A past search (with the default engine)
  241. // containing the input
  242. SEARCH_SUGGEST = 9; // A suggested search (with the default
  243. // engine) for a query.
  244. SEARCH_OTHER_ENGINE = 10; // A search with a non-default engine
  245. EXTENSION_APP = 11; // DEPRECATED. An Extension App with a
  246. // title/url that contains the input.
  247. CONTACT = 12; // One of the user's contacts
  248. BOOKMARK_TITLE = 13; // A bookmark with a title/url that contains
  249. // the input.
  250. SEARCH_SUGGEST_ENTITY = 14; // A suggested search for an entity.
  251. SEARCH_SUGGEST_TAIL = 15; // A suggested search to complete the tail of
  252. // the query.
  253. SEARCH_SUGGEST_PERSONALIZED = 16; // A personalized suggested search.
  254. SEARCH_SUGGEST_PROFILE = 17; // A personalized suggested search for a
  255. // Google+ profile.
  256. APP_RESULT = 18; // Result from an installed app
  257. // (eg: a gmail email).
  258. // Used by Android GSA for on-device
  259. // suggestion logging.
  260. APP = 19; // An app result (eg: the gmail app).
  261. // Used by Android GSA for on-device
  262. // suggestion logging.
  263. LEGACY_ON_DEVICE = 20; // An on-device result from a legacy
  264. // provider. That is, this result is not
  265. // from the on-device suggestion provider
  266. // (go/icing). This field is
  267. // used by Android GSA for on-device
  268. // suggestion logging.
  269. NAVSUGGEST_PERSONALIZED = 21; // A personalized url.
  270. SEARCH_SUGGEST_ANSWER = 22; // DEPRECATED. Answers no longer have their
  271. // own type but instead can be attached to
  272. // suggestions of any type.
  273. CALCULATOR = 23; // A calculator answer.
  274. CLIPBOARD_URL = 24; // An URL based on the clipboard.
  275. PHYSICAL_WEB = 25; // DEPRECATED. A Physical Web nearby URL.
  276. PHYSICAL_WEB_OVERFLOW = 26; // DEPRECATED. An item representing multiple
  277. // Physical Web nearby URLs.
  278. DOCUMENT = 27; // An item representing a cloud document
  279. // suggestion.
  280. CLIPBOARD_TEXT = 28; // Text based on the clipboard.
  281. CLIPBOARD_IMAGE = 29; // An image based on the clipboard.
  282. TILE_SUGGESTION = 30; // A search query from Chrome Query Tiles
  283. // feature. Only used by Android.
  284. HISTORY_CLUSTER = 31; // A past page that is a member of a cluster
  285. // (an aggregation of related searches and
  286. // URLs from the user's history) that
  287. // contains the input (the input might or
  288. // might not also match the title or URL of
  289. // this page).
  290. OPEN_TAB = 32; // A currently open tab whose URL contains the input.
  291. }
  292. optional ResultType result_type = 2;
  293. // The relevance score for this suggestion.
  294. optional int32 relevance = 3;
  295. // How many times this result was typed in / selected from the omnibox.
  296. // Only set for some providers and result_types. At the time of
  297. // writing this comment, it is only set for HistoryURL and
  298. // HistoryQuickProvider matches.
  299. optional int32 typed_count = 5;
  300. // Whether this item is starred (bookmarked) or not.
  301. optional bool is_starred = 4 [deprecated = true];
  302. // Whether this item is disabled in the UI (not clickable).
  303. optional bool is_disabled = 6;
  304. // Used to identify the specific source / type for suggestions by the
  305. // suggest server. The meaning of individual values is determined by the
  306. // provider of each suggestion type and is different for every suggestion
  307. // type. See enum ResultType above for more details.
  308. optional int32 result_subtype_identifier = 7;
  309. // Whether the suggestion presented in the match, regardless of type,
  310. // matched an open tab.
  311. optional bool has_tab_match = 8;
  312. // Whether this suggestion came associated with a keyword. Does not include
  313. // suggestions that came from the default search engine unless the search
  314. // engine was explicitly invoked. As two common examples,
  315. // |is_keyword_suggestion| will be true for suggestions from explicitly-
  316. // invoked suggestions (whether from a search engine or an extension). It
  317. // will also be true for suggestions from a keyword that wasn't explicitly
  318. // requested. For example, if a user has Google as their default search
  319. // engine, the input "bing testing" will often show a suggestion to "Search
  320. // Bing for testing" in the dropdown. This suggestion will be marked as
  321. // |is_keyword_suggestion|.
  322. optional bool is_keyword_suggestion = 9;
  323. }
  324. repeated Suggestion suggestion = 9;
  325. // A data structure that holds per-provider information, general information
  326. // not associated with a particular result.
  327. // Next tag: 6
  328. message ProviderInfo {
  329. // Which provider generated this ProviderInfo entry.
  330. optional ProviderType provider = 1;
  331. // The provider's done() value, i.e., whether it's completed processing
  332. // the query. Providers which don't do any asynchronous processing
  333. // will always be done.
  334. optional bool provider_done = 2;
  335. // The set of field trials that have triggered in the most recent query,
  336. // possibly affecting the shown suggestions. Each element is a hash
  337. // of the corresponding field trial name.
  338. // See chrome/browser/autocomplete/search_provider.cc for a specific usage
  339. // example.
  340. repeated fixed32 field_trial_triggered = 3;
  341. // Same as above except that the set of field trials is a union of all field
  342. // trials that have triggered within the current omnibox session including
  343. // the most recent query.
  344. // See AutocompleteController::ResetSession() for more details on the
  345. // definition of a session.
  346. // See chrome/browser/autocomplete/search_provider.cc for a specific usage
  347. // example.
  348. repeated fixed32 field_trial_triggered_in_session = 4;
  349. // The number of times this provider returned a non-zero number of
  350. // suggestions during this omnibox session.
  351. // Note that each provider may define a session differently for its
  352. // purposes.
  353. optional int32 times_returned_results_in_session = 5;
  354. }
  355. // A list of diagnostic information about each provider. Providers
  356. // will appear at most once in this list.
  357. repeated ProviderInfo provider_info = 12;
  358. // Whether the Omnibox was in keyword mode, however it was entered.
  359. optional bool in_keyword_mode = 19;
  360. // How the Omnibox got into keyword mode. Not present if not in keyword
  361. // mode.
  362. enum KeywordModeEntryMethod {
  363. INVALID = 0;
  364. TAB = 1; // Select a suggestion that provides a keyword hint
  365. // and press Tab.
  366. SPACE_AT_END = 2; // Type a complete keyword and press Space.
  367. SPACE_IN_MIDDLE = 3; // Press Space in the middle of an input in order to
  368. // separate it into a keyword and other text.
  369. KEYBOARD_SHORTCUT = 4; // Press ^K.
  370. QUESTION_MARK = 5; // Press Question-mark without any other input.
  371. CLICK_HINT_VIEW = 6; // Select a suggestion that provides a keyword hint
  372. // and click the reminder that one can press Tab.
  373. TAP_HINT_VIEW = 7; // Select a suggestion that provides a keyword hint
  374. // and touch the reminder that one can press Tab.
  375. SELECT_SUGGESTION = 8; // Select a keyword suggestion, such as by arrowing
  376. // or tabbing to it.
  377. }
  378. optional KeywordModeEntryMethod keyword_mode_entry_method = 20;
  379. // Whether the omnibox input is a search query that is started
  380. // by clicking on a image tile.
  381. optional bool is_query_started_from_tile = 21;
  382. // The set of features that triggered within the current omnibox session.
  383. // Each element is a value of |OmniboxTriggeredFeatureService::Features| enum
  384. // in components/omnibox/browser/omnibox_triggered_feature_service.h .
  385. // See AutocompleteController::ResetSession() for more details on the
  386. // definition of a session.
  387. repeated int32 feature_triggered_in_session = 22;
  388. }