Bug 1465704 - Add follow_urlbar_link event telemetry for Savant Shield study; r=adw
authorBianca Danforth <bdanforth@mozilla.com>
Wed, 06 Jun 2018 03:51:01 -0700
changeset 421971 674d58c3a8f3769ae863cf56092cb1a552eb27f0
parent 421970 2b65a8f996222369279cc2152ecaa7eaee93898a
child 421972 4bc90c7b3b4b595b7ff37502b589006c1bfc87dc
push id34113
push userbtara@mozilla.com
push dateSat, 09 Jun 2018 12:05:46 +0000
treeherdermozilla-central@21bc698a4d9c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersadw
bugs1465704
milestone62.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
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
browser/modules/BrowserUsageTelemetry.jsm
toolkit/components/telemetry/Events.yaml
--- 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]