Bug 1817203: Introduce go_button in engagement_type r=mak
Differential Revision: https://phabricator.services.mozilla.com/D171033
This commit is contained in:
@@ -944,8 +944,10 @@ class TelemetryEvent {
|
||||
startEventInfo.interactionType == "dropped" ? "drop_go" : "paste_go";
|
||||
} else if (event.type == "blur") {
|
||||
action = "blur";
|
||||
} else if (MouseEvent.isInstance(event)) {
|
||||
action = event.target.id == "urlbar-go-button" ? "go_button" : "click";
|
||||
} else {
|
||||
action = MouseEvent.isInstance(event) ? "click" : "enter";
|
||||
action = "enter";
|
||||
}
|
||||
|
||||
let method = action == "blur" ? "abandonment" : "engagement";
|
||||
@@ -982,6 +984,11 @@ class TelemetryEvent {
|
||||
return;
|
||||
}
|
||||
|
||||
if (action == "go_button") {
|
||||
// Fall back since the conventional telemetry dones't support "go_button" action.
|
||||
action = "click";
|
||||
}
|
||||
|
||||
let endTime = (event && event.timeStamp) || Cu.now();
|
||||
let startTime = startEventInfo.timeStamp || endTime;
|
||||
// Synthesized events in tests may have a bogus timeStamp, causing a
|
||||
|
||||
Reference in New Issue
Block a user