New issue
Advanced search Search tips

Issue 907902 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Jan 11
Cc:
Components:
EstimatedDays: 2
NextAction: ----
OS: Linux , Android , Windows , iOS , Chrome , Mac
Pri: 1
Type: Bug



Sign in to add a comment

Add some missing metrics to the Autocomplete feature.

Project Member Reported by seblalancette@chromium.org, Nov 22

Issue description

We need to add two new metrics to help monitor the effectiveness of this feature:

- A metric measuring the Click-Through Ratio (CTR),
- A metric measuring “days since last use“ for Autocomplete entries.

These metrics are needed for M-72 since we need the data for some feature work in M-73.

 
Project Member

Comment 1 by bugdroid1@chromium.org, Nov 27

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/4a9a9f72d8a36ee42b5c7f1bbaafb008acbb53c7

commit 4a9a9f72d8a36ee42b5c7f1bbaafb008acbb53c7
Author: Sebastien Lalancette <seblalancette@chromium.org>
Date: Tue Nov 27 21:17:45 2018

Added Autocomplete metrics to measure Click-Through-Ratio:
- When suggestions are shown,
- When a suggestion has been selected.

Added UMA histograms, and extended unit test coverage of some metrics.

Also tested manually by looking at local histograms after playing around a test page.

Bug:  907902 
Change-Id: I5f7a363416d3c0c4b7e1b44a782d5205ed7a6787
Reviewed-on: https://chromium-review.googlesource.com/c/1352331
Reviewed-by: Sebastien Seguin-Gagnon <sebsg@chromium.org>
Reviewed-by: Jesse Doherty <jwd@chromium.org>
Reviewed-by: Fabio Tirelo <ftirelo@chromium.org>
Commit-Queue: Sebastien Lalancette <seblalancette@chromium.org>
Cr-Commit-Position: refs/heads/master@{#611326}
[modify] https://crrev.com/4a9a9f72d8a36ee42b5c7f1bbaafb008acbb53c7/components/autofill/core/browser/autocomplete_history_manager.h
[modify] https://crrev.com/4a9a9f72d8a36ee42b5c7f1bbaafb008acbb53c7/components/autofill/core/browser/autofill_manager.cc
[modify] https://crrev.com/4a9a9f72d8a36ee42b5c7f1bbaafb008acbb53c7/components/autofill/core/browser/autofill_manager_unittest.cc
[modify] https://crrev.com/4a9a9f72d8a36ee42b5c7f1bbaafb008acbb53c7/components/autofill/core/browser/autofill_metrics.cc
[modify] https://crrev.com/4a9a9f72d8a36ee42b5c7f1bbaafb008acbb53c7/components/autofill/core/browser/autofill_metrics.h
[modify] https://crrev.com/4a9a9f72d8a36ee42b5c7f1bbaafb008acbb53c7/components/autofill/core/browser/autofill_metrics_unittest.cc
[modify] https://crrev.com/4a9a9f72d8a36ee42b5c7f1bbaafb008acbb53c7/tools/metrics/histograms/enums.xml
[modify] https://crrev.com/4a9a9f72d8a36ee42b5c7f1bbaafb008acbb53c7/tools/metrics/histograms/histograms.xml

Project Member

Comment 2 by bugdroid1@chromium.org, Dec 17

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/ecaff4ddd80cde0e9663a65f58989714c9d070e5

commit ecaff4ddd80cde0e9663a65f58989714c9d070e5
Author: Sebastien Lalancette <seblalancette@chromium.org>
Date: Mon Dec 17 22:38:06 2018

Pulled-up AutocompleteHistoryManager to be a KeyedService.

Autocomplete suggestions are scoped under a Profile, but the
AutocompleteHistoryManager was living under a Frame context. Pulling it up to
live at the BrowserContext level makes it represent the reality better. It will
also allow us to run "one-time" initialization, such as logging metrics for
local data once on start-up.

To keep in mind:
- Since we don't want to load all autocomplete entries into memory,
  autocomplete suggestions are always fetched asynchronously.

Before:
- AutocompleteHistoryManager lived in AutofillManager,
- AutofillManager gave an instance of ExternalDelegate to
  AutocompleteHistoryManager,
- Whenever AutocompleteHistoryManager asynchronously received suggestions, it
  forwarded them to the given ExternalDelegate.
- All three instances are within the context of a Frame.

After:
- AutocompleteHistoryManager lives as a KeyedService, and is passed as a ctor
  parameter to AutofillManager.
- AutofillManager implements the AutocompleteHistoryManager::SuggestionsHandler
  interface.
- Whenever an AutofillManager instance wants to fetch autocomplete suggestions,
  it passes itself as an observer of the query.
- AutocompleteHistoryManager keeps a map of DB query IDs (unique) to observers,
  and updates them upon receiving the suggestions.
- When AutofillManager is invoked after receiving the suggestions, it forwards
  them to its ExternalDelegate instance, allowing per Frame rendering.

Bug:  915223 
Bug:  907902 
Change-Id: I9e3d257269e4918a6ce29bcbbb2ec961afccaab1
Reviewed-on: https://chromium-review.googlesource.com/c/1351434
Commit-Queue: Sebastien Lalancette <seblalancette@chromium.org>
Reviewed-by: Tao Bai <michaelbai@chromium.org>
Reviewed-by: Olivier Robin <olivierrobin@chromium.org>
Reviewed-by: Moe Ahmadi <mahmadi@chromium.org>
Reviewed-by: Fabio Tirelo <ftirelo@chromium.org>
Reviewed-by: Sebastien Seguin-Gagnon <sebsg@chromium.org>
Reviewed-by: Vadym Doroshenko <dvadym@chromium.org>
Cr-Commit-Position: refs/heads/master@{#617267}
[modify] https://crrev.com/ecaff4ddd80cde0e9663a65f58989714c9d070e5/android_webview/browser/aw_autofill_client.cc
[modify] https://crrev.com/ecaff4ddd80cde0e9663a65f58989714c9d070e5/android_webview/browser/aw_autofill_client.h
[modify] https://crrev.com/ecaff4ddd80cde0e9663a65f58989714c9d070e5/android_webview/browser/aw_browser_context.cc
[modify] https://crrev.com/ecaff4ddd80cde0e9663a65f58989714c9d070e5/android_webview/browser/aw_browser_context.h
[modify] https://crrev.com/ecaff4ddd80cde0e9663a65f58989714c9d070e5/chrome/browser/BUILD.gn
[add] https://crrev.com/ecaff4ddd80cde0e9663a65f58989714c9d070e5/chrome/browser/autofill/autocomplete_history_manager_factory.cc
[add] https://crrev.com/ecaff4ddd80cde0e9663a65f58989714c9d070e5/chrome/browser/autofill/autocomplete_history_manager_factory.h
[modify] https://crrev.com/ecaff4ddd80cde0e9663a65f58989714c9d070e5/chrome/browser/ui/autofill/chrome_autofill_client.cc
[modify] https://crrev.com/ecaff4ddd80cde0e9663a65f58989714c9d070e5/chrome/browser/ui/autofill/chrome_autofill_client.h
[modify] https://crrev.com/ecaff4ddd80cde0e9663a65f58989714c9d070e5/components/autofill/core/browser/BUILD.gn
[modify] https://crrev.com/ecaff4ddd80cde0e9663a65f58989714c9d070e5/components/autofill/core/browser/autocomplete_history_manager.cc
[modify] https://crrev.com/ecaff4ddd80cde0e9663a65f58989714c9d070e5/components/autofill/core/browser/autocomplete_history_manager.h
[modify] https://crrev.com/ecaff4ddd80cde0e9663a65f58989714c9d070e5/components/autofill/core/browser/autocomplete_history_manager_unittest.cc
[modify] https://crrev.com/ecaff4ddd80cde0e9663a65f58989714c9d070e5/components/autofill/core/browser/autofill_assistant_unittest.cc
[modify] https://crrev.com/ecaff4ddd80cde0e9663a65f58989714c9d070e5/components/autofill/core/browser/autofill_client.h
[modify] https://crrev.com/ecaff4ddd80cde0e9663a65f58989714c9d070e5/components/autofill/core/browser/autofill_external_delegate_unittest.cc
[modify] https://crrev.com/ecaff4ddd80cde0e9663a65f58989714c9d070e5/components/autofill/core/browser/autofill_manager.cc
[modify] https://crrev.com/ecaff4ddd80cde0e9663a65f58989714c9d070e5/components/autofill/core/browser/autofill_manager.h
[modify] https://crrev.com/ecaff4ddd80cde0e9663a65f58989714c9d070e5/components/autofill/core/browser/autofill_manager_unittest.cc
[modify] https://crrev.com/ecaff4ddd80cde0e9663a65f58989714c9d070e5/components/autofill/core/browser/autofill_metrics_unittest.cc
[modify] https://crrev.com/ecaff4ddd80cde0e9663a65f58989714c9d070e5/components/autofill/core/browser/credit_card_save_manager_unittest.cc
[modify] https://crrev.com/ecaff4ddd80cde0e9663a65f58989714c9d070e5/components/autofill/core/browser/local_card_migration_manager_unittest.cc
[add] https://crrev.com/ecaff4ddd80cde0e9663a65f58989714c9d070e5/components/autofill/core/browser/mock_autocomplete_history_manager.cc
[add] https://crrev.com/ecaff4ddd80cde0e9663a65f58989714c9d070e5/components/autofill/core/browser/mock_autocomplete_history_manager.h
[modify] https://crrev.com/ecaff4ddd80cde0e9663a65f58989714c9d070e5/components/autofill/core/browser/test_autofill_client.cc
[modify] https://crrev.com/ecaff4ddd80cde0e9663a65f58989714c9d070e5/components/autofill/core/browser/test_autofill_client.h
[modify] https://crrev.com/ecaff4ddd80cde0e9663a65f58989714c9d070e5/components/autofill/core/browser/test_autofill_manager.cc
[modify] https://crrev.com/ecaff4ddd80cde0e9663a65f58989714c9d070e5/components/autofill/core/browser/test_autofill_manager.h
[modify] https://crrev.com/ecaff4ddd80cde0e9663a65f58989714c9d070e5/components/password_manager/core/browser/password_form_manager_unittest.cc
[modify] https://crrev.com/ecaff4ddd80cde0e9663a65f58989714c9d070e5/ios/chrome/browser/autofill/BUILD.gn
[add] https://crrev.com/ecaff4ddd80cde0e9663a65f58989714c9d070e5/ios/chrome/browser/autofill/autocomplete_history_manager_factory.cc
[add] https://crrev.com/ecaff4ddd80cde0e9663a65f58989714c9d070e5/ios/chrome/browser/autofill/autocomplete_history_manager_factory.h
[modify] https://crrev.com/ecaff4ddd80cde0e9663a65f58989714c9d070e5/ios/chrome/browser/ui/autofill/chrome_autofill_client_ios.h
[modify] https://crrev.com/ecaff4ddd80cde0e9663a65f58989714c9d070e5/ios/chrome/browser/ui/autofill/chrome_autofill_client_ios.mm
[modify] https://crrev.com/ecaff4ddd80cde0e9663a65f58989714c9d070e5/ios/web_view/BUILD.gn
[modify] https://crrev.com/ecaff4ddd80cde0e9663a65f58989714c9d070e5/ios/web_view/internal/autofill/cwv_autofill_controller.mm
[add] https://crrev.com/ecaff4ddd80cde0e9663a65f58989714c9d070e5/ios/web_view/internal/autofill/web_view_autocomplete_history_manager_factory.cc
[add] https://crrev.com/ecaff4ddd80cde0e9663a65f58989714c9d070e5/ios/web_view/internal/autofill/web_view_autocomplete_history_manager_factory.h
[modify] https://crrev.com/ecaff4ddd80cde0e9663a65f58989714c9d070e5/ios/web_view/internal/autofill/web_view_autofill_client_ios.h
[modify] https://crrev.com/ecaff4ddd80cde0e9663a65f58989714c9d070e5/ios/web_view/internal/autofill/web_view_autofill_client_ios.mm

Project Member

Comment 3 by bugdroid1@chromium.org, Jan 11

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/0c677c29b3e1d25ca89f5d526bad1fd03ea0d660

commit 0c677c29b3e1d25ca89f5d526bad1fd03ea0d660
Author: Sebastien Lalancette <seblalancette@chromium.org>
Date: Fri Jan 11 15:30:02 2019

[AF] Added Autocomplete DaysSinceLastUse Metric On Select

This change updates Autocomplete code to log the number of days since an
Autocomplete entry was last used when a user selects it. To do so, the
data model retrieved from autofill_table had to change from a vector of
strings (values) to a vector of AutofillEntry.

Since we want to send only what the UI needs to the UI, then we needed to
cache the last batch of AutofillEntries sent so that we can map back the
user's selection and log our metric. The cache lives in
AutocompleteHistoryManager and is keyed by value.

Updated and added unit tests, tested manually and verified the logs at
chrome://histograms

Bug:  907902 
Change-Id: Iab7841c3e20193891c79f3ead5819959d6632399
Reviewed-on: https://chromium-review.googlesource.com/c/1388712
Commit-Queue: Sebastien Lalancette <seblalancette@chromium.org>
Reviewed-by: Olivier Robin <olivierrobin@chromium.org>
Reviewed-by: Sebastien Seguin-Gagnon <sebsg@chromium.org>
Reviewed-by: Jesse Doherty <jwd@chromium.org>
Reviewed-by: Peter Kasting <pkasting@chromium.org>
Cr-Commit-Position: refs/heads/master@{#622010}
[modify] https://crrev.com/0c677c29b3e1d25ca89f5d526bad1fd03ea0d660/components/autofill/core/browser/autocomplete_history_manager.cc
[modify] https://crrev.com/0c677c29b3e1d25ca89f5d526bad1fd03ea0d660/components/autofill/core/browser/autocomplete_history_manager.h
[modify] https://crrev.com/0c677c29b3e1d25ca89f5d526bad1fd03ea0d660/components/autofill/core/browser/autocomplete_history_manager_unittest.cc
[modify] https://crrev.com/0c677c29b3e1d25ca89f5d526bad1fd03ea0d660/components/autofill/core/browser/autofill_external_delegate.cc
[modify] https://crrev.com/0c677c29b3e1d25ca89f5d526bad1fd03ea0d660/components/autofill/core/browser/autofill_external_delegate_unittest.cc
[modify] https://crrev.com/0c677c29b3e1d25ca89f5d526bad1fd03ea0d660/components/autofill/core/browser/autofill_manager.cc
[modify] https://crrev.com/0c677c29b3e1d25ca89f5d526bad1fd03ea0d660/components/autofill/core/browser/autofill_manager.h
[modify] https://crrev.com/0c677c29b3e1d25ca89f5d526bad1fd03ea0d660/components/autofill/core/browser/autofill_manager_unittest.cc
[modify] https://crrev.com/0c677c29b3e1d25ca89f5d526bad1fd03ea0d660/components/autofill/core/browser/autofill_metrics.cc
[modify] https://crrev.com/0c677c29b3e1d25ca89f5d526bad1fd03ea0d660/components/autofill/core/browser/autofill_metrics.h
[modify] https://crrev.com/0c677c29b3e1d25ca89f5d526bad1fd03ea0d660/components/autofill/core/browser/mock_autocomplete_history_manager.h
[modify] https://crrev.com/0c677c29b3e1d25ca89f5d526bad1fd03ea0d660/components/autofill/core/browser/test_autofill_client.h
[modify] https://crrev.com/0c677c29b3e1d25ca89f5d526bad1fd03ea0d660/components/autofill/core/browser/webdata/autofill_table.cc
[modify] https://crrev.com/0c677c29b3e1d25ca89f5d526bad1fd03ea0d660/components/autofill/core/browser/webdata/autofill_table.h
[modify] https://crrev.com/0c677c29b3e1d25ca89f5d526bad1fd03ea0d660/components/autofill/core/browser/webdata/autofill_table_unittest.cc
[modify] https://crrev.com/0c677c29b3e1d25ca89f5d526bad1fd03ea0d660/components/autofill/core/browser/webdata/autofill_webdata_backend_impl.cc
[modify] https://crrev.com/0c677c29b3e1d25ca89f5d526bad1fd03ea0d660/components/autofill/core/browser/webdata/web_data_service_unittest.cc
[modify] https://crrev.com/0c677c29b3e1d25ca89f5d526bad1fd03ea0d660/components/webdata/common/web_data_results.h
[modify] https://crrev.com/0c677c29b3e1d25ca89f5d526bad1fd03ea0d660/ios/chrome/browser/autofill/autofill_controller_unittest.mm
[modify] https://crrev.com/0c677c29b3e1d25ca89f5d526bad1fd03ea0d660/tools/metrics/histograms/histograms.xml

Status: Fixed (was: Started)
Autocomplete feature should still work normally.

Sign in to add a comment