Index: chrome/browser/autofill/autofill_metrics.h |
diff --git a/chrome/browser/autofill/autofill_metrics.h b/chrome/browser/autofill/autofill_metrics.h |
index 22bd74b9d38a068df69e5da41f6768113563b658..6e316e1a1f98ca3ac9847d71c5c922290ec21278 100644 |
--- a/chrome/browser/autofill/autofill_metrics.h |
+++ b/chrome/browser/autofill/autofill_metrics.h |
@@ -79,6 +79,47 @@ class AutofillMetrics { |
NUM_SERVER_QUERY_METRICS |
}; |
+ // Each of these metrics is logged only for potentially autofillable forms, |
+ // i.e. forms with at least three fields, etc. |
+ // These are used to derive certain "user happiness" metrics. For example, we |
+ // can compute the ratio (USER_DID_EDIT_AUTOFILLED_FIELD / USER_DID_AUTOFILL) |
+ // to see how often users have to correct autofilled data. |
+ enum UserHappinessMetric { |
+ // Loaded a page containing forms. |
+ FORMS_LOADED, |
+ // Submitted a fillable form -- i.e. one with at least three field values |
+ // that match the user's stored Autofill data -- and all matching fields |
+ // were autofilled. |
+ SUBMITTED_FILLABLE_FORM_AUTOFILLED_ALL, |
+ // Submitted a fillable form and some (but not all) matching fields were |
+ // autofilled. |
+ SUBMITTED_FILLABLE_FORM_AUTOFILLED_SOME, |
+ // Submitted a fillable form and no fields were autofilled. |
+ SUBMITTED_FILLABLE_FORM_AUTOFILLED_NONE, |
+ // Submitted a non-fillable form. |
+ SUBMITTED_NON_FILLABLE_FORM, |
+ |
+ // User manually filled one of the form fields. |
+ USER_DID_TYPE, |
+ // We showed a popup containing Autofill suggestions. |
+ SUGGESTIONS_SHOWN, |
+ // Same as above, but only logged once per page load. |
+ SUGGESTIONS_SHOWN_ONCE, |
+ // User autofilled at least part of the form. |
+ USER_DID_AUTOFILL, |
+ // Same as above, but only logged once per page load. |
+ USER_DID_AUTOFILL_ONCE, |
+ // User edited a previously autofilled field. |
+ USER_DID_EDIT_AUTOFILLED_FIELD, |
+ // Same as above, but only logged once per page load. |
+ USER_DID_EDIT_AUTOFILLED_FIELD_ONCE, |
+ NUM_USER_HAPPINESS_METRICS |
+ }; |
+ |
+ // TODO(isherman): Add histograms to measure time elapsed between form load |
+ // form submission, comparing autofilled and non-autofilled forms. So that we |
+ // are measuring apples to apples, restrict just to fillable forms. |
+ |
AutofillMetrics(); |
virtual ~AutofillMetrics(); |
@@ -101,6 +142,8 @@ class AutofillMetrics { |
virtual void LogServerQueryMetric(ServerQueryMetric metric) const; |
+ virtual void LogUserHappinessMetric(UserHappinessMetric metric) const; |
+ |
// This should be called each time a page containing forms is loaded. |
virtual void LogIsAutofillEnabledAtPageLoad(bool enabled) const; |