Bug 1371232 - Add scalars to record the times of credit card filling type. r=lchang
MozReview-Commit-ID: IyUKrjF99oK
--- a/browser/extensions/formautofill/FormAutofillParent.jsm
+++ b/browser/extensions/formautofill/FormAutofillParent.jsm
@@ -418,19 +418,26 @@ FormAutofillParent.prototype = {
},
async _onCreditCardSubmit(creditCard, target) {
// We'll show the credit card doorhanger if:
// - User applys autofill and changed
// - User fills form manually
if (creditCard.guid &&
Object.keys(creditCard.record).every(key => creditCard.untouchedFields.includes(key))) {
+ // Add probe to record credit card autofill(without modification).
+ Services.telemetry.scalarAdd("formautofill.creditCards.fill_type_autofill", 1);
return;
}
+ // Add the probe to record credit card manual filling or autofill but modified case.
+ let ccScalar = creditCard.guid ? "formautofill.creditCards.fill_type_autofill_modified" :
+ "formautofill.creditCards.fill_type_manual";
+ Services.telemetry.scalarAdd(ccScalar, 1);
+
let state = await FormAutofillDoorhanger.show(target, "creditCard");
if (state == "cancel") {
return;
}
if (state == "disable") {
Services.prefs.setBoolPref("extensions.formautofill.creditCards.enabled", false);
return;
--- a/toolkit/components/telemetry/Scalars.yaml
+++ b/toolkit/components/telemetry/Scalars.yaml
@@ -925,16 +925,59 @@ formautofill.addresses:
notification_emails:
- autofill@lists.mozilla.org
- jcheng@mozilla.com
- chsiang@mozilla.com
release_channel_collection: opt-out
record_in_processes:
- 'main'
+formautofill.creditCards:
+ fill_type_manual:
+ bug_numbers:
+ - 1371232
+ description: Count at submission time whether the submitted credit card form was filled manually.
+ expires: never
+ kind: uint
+ notification_emails:
+ - autofill@lists.mozilla.org
+ - jcheng@mozilla.com
+ - chsiang@mozilla.com
+ release_channel_collection: opt-out
+ record_in_processes:
+ - 'main'
+ fill_type_autofill:
+ bug_numbers:
+ - 1371232
+ description: Count at submission time whether the submitted credit card form was autofilled.
+ expires: never
+ kind: uint
+ notification_emails:
+ - autofill@lists.mozilla.org
+ - jcheng@mozilla.com
+ - chsiang@mozilla.com
+ release_channel_collection: opt-out
+ record_in_processes:
+ - 'main'
+ fill_type_autofill_modified:
+ bug_numbers:
+ - 1371232
+ description: >
+ Count at submission time whether the submitted credit card form was autofilled but
+ the data in form is changed.
+ expires: never
+ kind: uint
+ notification_emails:
+ - autofill@lists.mozilla.org
+ - jcheng@mozilla.com
+ - chsiang@mozilla.com
+ release_channel_collection: opt-out
+ record_in_processes:
+ - 'main'
+
# The following section is for probes for tcp protocol.
network.tcp:
overlapped_io_canceled_before_finished:
bug_numbers:
- 1363372
description: >
Count the number of sockets that use overlapped io and are canceled before
the overlapped io finishes. (We only use overlapped io for connectEx when