Bug 1465704 - Add follow_urlbar_link event telemetry for Savant Shield study; r=adw
These probes will register and record (for the duration of the study only):
* When the user clicks on a history link displayed by the urlbar
* When the user clicks on a bookmark link displayed by the urlbar
It should be noted that the same site can be multiple result types at the same time, so there will be times when a bookmark and/or history selection is captured as a result type other than bookmark or history (e.g. 'switchtab', 'autofill' or 'visiturl').
MozReview-Commit-ID: FEKVoaTIkiH
--- a/browser/modules/BrowserUsageTelemetry.jsm
+++ b/browser/modules/BrowserUsageTelemetry.jsm
@@ -301,16 +301,20 @@ let urlbarListener = {
// Otherwise you'll break our data.
if (actionType in URLBAR_SELECTED_RESULT_TYPES) {
Services.telemetry
.getHistogramById("FX_URLBAR_SELECTED_RESULT_TYPE")
.add(URLBAR_SELECTED_RESULT_TYPES[actionType]);
Services.telemetry
.getKeyedHistogramById("FX_URLBAR_SELECTED_RESULT_INDEX_BY_TYPE")
.add(actionType, idx);
+ if (actionType === "bookmark" || actionType === "history") {
+ Services.telemetry.recordEvent("savant", "follow_urlbar_link", actionType, null,
+ { subcategory: "navigation" });
+ }
} else {
Cu.reportError("Unknown FX_URLBAR_SELECTED_RESULT_TYPE type: " +
actionType);
}
},
QueryInterface: ChromeUtils.generateQI([Ci.nsIObserver,
Ci.nsISupportsWeakReference]),
--- a/toolkit/components/telemetry/Events.yaml
+++ b/toolkit/components/telemetry/Events.yaml
@@ -169,16 +169,29 @@ savant:
This is recorded any time a bookmark is visited.
bug_numbers: [1457226, 1465703]
notification_emails:
- "bdanforth@mozilla.com"
- "shong@mozilla.com"
expiry_version: "65"
extra_keys:
subcategory: The broad event category for this probe. E.g. navigation
+ follow_urlbar_link:
+ objects: ["bookmark", "history"]
+ release_channel_collection: opt-out
+ record_in_processes: ["main"]
+ description: >
+ This is recorded when the user selects a urlbar bookmark or history result.
+ bug_numbers: [1457226, 1465704]
+ notification_emails:
+ - "bdanforth@mozilla.com"
+ - "shong@mozilla.com"
+ expiry_version: "65"
+ extra_keys:
+ subcategory: The broad event category for this probe. E.g. navigation
# This category contains event entries used for Telemetry tests.
# They will not be sent out with any pings.
telemetry.test:
test:
methods: ["test1", "test2"]
objects: ["object1", "object2"]
bug_numbers: [1286606]