Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(271)

Side by Side Diff: chrome/browser/autofill/autofill_metrics.h

Issue 7747009: Add metrics to track Autofill "user happiness" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_AUTOFILL_AUTOFILL_METRICS_H_ 5 #ifndef CHROME_BROWSER_AUTOFILL_AUTOFILL_METRICS_H_
6 #define CHROME_BROWSER_AUTOFILL_AUTOFILL_METRICS_H_ 6 #define CHROME_BROWSER_AUTOFILL_AUTOFILL_METRICS_H_
7 #pragma once 7 #pragma once
8 8
9 #include <stddef.h> 9 #include <stddef.h>
10 #include <string> 10 #include <string>
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 // Our heuristics detected at least one auto-fillable field, and the server 72 // Our heuristics detected at least one auto-fillable field, and the server
73 // response overrode the type of at least one field. 73 // response overrode the type of at least one field.
74 QUERY_RESPONSE_OVERRODE_LOCAL_HEURISTICS, 74 QUERY_RESPONSE_OVERRODE_LOCAL_HEURISTICS,
75 75
76 // Our heuristics did not detect any auto-fillable fields, but the server 76 // Our heuristics did not detect any auto-fillable fields, but the server
77 // response did detect at least one. 77 // response did detect at least one.
78 QUERY_RESPONSE_WITH_NO_LOCAL_HEURISTICS, 78 QUERY_RESPONSE_WITH_NO_LOCAL_HEURISTICS,
79 NUM_SERVER_QUERY_METRICS 79 NUM_SERVER_QUERY_METRICS
80 }; 80 };
81 81
82 // Each of these metrics is logged only for potentially autofillable forms,
83 // i.e. forms with at least three fields, etc.
84 // These are used to derive certain "user happiness" metrics. For example, we
85 // can compute the ratio (USER_DID_EDIT_AUTOFILLED_FIELD / USER_DID_AUTOFILL)
86 // to see how often users have to correct autofilled data.
87 enum UserHappinessMetric {
88 // Loaded a page containing (potentially autofillable) forms.
dhollowa 2011/08/25 21:48:15 Can lose parenthetical comment.
Ilya Sherman 2011/08/26 00:23:32 Done.
89 FORMS_LOADED,
90 // Submitted a form that was never autofilled.
91 FORM_SUBMITTED_WITHOUT_AUTOFILL,
92 // Submitted a form for which at least some fields were autofilled.
93 FORM_SUBMITTED_AFTER_AUTOFILL,
dhollowa 2011/08/25 21:48:15 nix: WITHOUT and AFTER, in favor of ALL, SOME, NON
Ilya Sherman 2011/08/26 00:23:32 Done.
94 // Submitted a form with at least three field values that match the user's
95 // client'stored Autofill data.
dhollowa 2011/08/25 21:48:15 s/client'stored/stored/
Ilya Sherman 2011/08/26 00:23:32 Done.
96 SUBMITTED_FORM_COULD_HAVE_BEEN_AUTOFILLED,
dhollowa 2011/08/25 21:48:15 This is a "total" for three other possible happine
Ilya Sherman 2011/08/26 00:23:32 Done.
97
98 // User manually filled one of the form fields.
99 USER_DID_TYPE,
100 // We showed a popup containing Autofill suggestions.
101 SUGGESTIONS_SHOWN,
102 // Same as above, but only logged once per page load.
103 SUGGESTIONS_SHOWN_FIRST_TIME,
dhollowa 2011/08/25 21:48:15 s/FIRST_TIME/ONCE/
Ilya Sherman 2011/08/26 00:23:32 Done.
104 // User autofilled at least part of the form.
105 USER_DID_AUTOFILL,
106 // Same as above, but only logged once per page load.
107 USER_DID_AUTOFILL_FIRST_TIME,
dhollowa 2011/08/25 21:48:15 s/FIRST_TIME/ONCE/
Ilya Sherman 2011/08/26 00:23:32 Done.
108 // User edited a previously autofilled field.
109 USER_DID_EDIT_AUTOFILLED_FIELD,
dhollowa 2011/08/25 21:48:15 It would be interesting to have ONCE and non-ONCE
Ilya Sherman 2011/08/26 00:23:32 Done.
110 NUM_USER_HAPPINESS_METRICS
111 };
112
113 // TODO(isherman): Add histograms to measure time elapsed between form load
dhollowa 2011/08/25 21:48:15 Comparing "fillable filled" and "fillable un-fille
Ilya Sherman 2011/08/26 00:23:32 Done.
114 // form submission.
115
82 AutofillMetrics(); 116 AutofillMetrics();
83 virtual ~AutofillMetrics(); 117 virtual ~AutofillMetrics();
84 118
85 virtual void LogCreditCardInfoBarMetric(InfoBarMetric metric) const; 119 virtual void LogCreditCardInfoBarMetric(InfoBarMetric metric) const;
86 120
87 virtual void LogHeuristicTypePrediction( 121 virtual void LogHeuristicTypePrediction(
88 FieldTypeQualityMetric metric, 122 FieldTypeQualityMetric metric,
89 AutofillFieldType field_type, 123 AutofillFieldType field_type,
90 const std::string& experiment_id) const; 124 const std::string& experiment_id) const;
91 virtual void LogOverallTypePrediction( 125 virtual void LogOverallTypePrediction(
92 FieldTypeQualityMetric metric, 126 FieldTypeQualityMetric metric,
93 AutofillFieldType field_type, 127 AutofillFieldType field_type,
94 const std::string& experiment_id) const; 128 const std::string& experiment_id) const;
95 virtual void LogServerTypePrediction(FieldTypeQualityMetric metric, 129 virtual void LogServerTypePrediction(FieldTypeQualityMetric metric,
96 AutofillFieldType field_type, 130 AutofillFieldType field_type,
97 const std::string& experiment_id) const; 131 const std::string& experiment_id) const;
98 132
99 virtual void LogQualityMetric(QualityMetric metric, 133 virtual void LogQualityMetric(QualityMetric metric,
100 const std::string& experiment_id) const; 134 const std::string& experiment_id) const;
101 135
102 virtual void LogServerQueryMetric(ServerQueryMetric metric) const; 136 virtual void LogServerQueryMetric(ServerQueryMetric metric) const;
103 137
138 virtual void LogUserHappinessMetric(UserHappinessMetric metric) const;
139
104 140
105 // This should be called each time a page containing forms is loaded. 141 // This should be called each time a page containing forms is loaded.
106 virtual void LogIsAutofillEnabledAtPageLoad(bool enabled) const; 142 virtual void LogIsAutofillEnabledAtPageLoad(bool enabled) const;
107 143
108 // This should be called each time a new profile is launched. 144 // This should be called each time a new profile is launched.
109 virtual void LogIsAutofillEnabledAtStartup(bool enabled) const; 145 virtual void LogIsAutofillEnabledAtStartup(bool enabled) const;
110 146
111 // This should be called each time a new profile is launched. 147 // This should be called each time a new profile is launched.
112 virtual void LogStoredProfileCount(size_t num_profiles) const; 148 virtual void LogStoredProfileCount(size_t num_profiles) const;
113 149
114 // Log the number of Autofill suggestions presented to the user when filling a 150 // Log the number of Autofill suggestions presented to the user when filling a
115 // form. 151 // form.
116 virtual void LogAddressSuggestionsCount(size_t num_suggestions) const; 152 virtual void LogAddressSuggestionsCount(size_t num_suggestions) const;
117 153
118 // Logs the experiment id corresponding to a server query response. 154 // Logs the experiment id corresponding to a server query response.
119 virtual void LogServerExperimentIdForQuery( 155 virtual void LogServerExperimentIdForQuery(
120 const std::string& experiment_id) const; 156 const std::string& experiment_id) const;
121 157
122 // Logs the experiment id corresponding to an upload to the server. 158 // Logs the experiment id corresponding to an upload to the server.
123 virtual void LogServerExperimentIdForUpload( 159 virtual void LogServerExperimentIdForUpload(
124 const std::string& experiment_id) const; 160 const std::string& experiment_id) const;
125 161
126 private: 162 private:
127 DISALLOW_COPY_AND_ASSIGN(AutofillMetrics); 163 DISALLOW_COPY_AND_ASSIGN(AutofillMetrics);
128 }; 164 };
129 165
130 #endif // CHROME_BROWSER_AUTOFILL_AUTOFILL_METRICS_H_ 166 #endif // CHROME_BROWSER_AUTOFILL_AUTOFILL_METRICS_H_
OLDNEW
« no previous file with comments | « chrome/browser/autofill/autofill_manager.cc ('k') | chrome/browser/autofill/autofill_metrics.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698