Bug 1961161: Additional metrics for closing tabs within groups r=dwalker,fxview-reviewers,tabbrowser-reviewers,nsharpley

Differential Revision: https://phabricator.services.mozilla.com/D248438
This commit is contained in:
Jeremy Swinarton
2025-05-22 22:00:34 +00:00
committed by jswinarton@mozilla.com
parent 44151f9298
commit 1f70d01002
12 changed files with 482 additions and 152 deletions

View File

@@ -1269,13 +1269,16 @@ export let BrowserUsageTelemetry = {
_onTabClosed(event) {
const group = event.target?.group;
const isUserTriggered = event.detail?.isUserTriggered;
const source = event.detail?.telemetrySource;
if (group) {
if (group && isUserTriggered) {
if (source == lazy.TabMetrics.METRIC_SOURCE.TAB_STRIP) {
Glean.tabgroup.tabInteractions.close_tabstrip.add();
} else if (source == lazy.TabMetrics.METRIC_SOURCE.TAB_OVERFLOW_MENU) {
Glean.tabgroup.tabInteractions.close_tabmenu.add();
} else {
Glean.tabgroup.tabInteractions.close_tab_other.add();
}
}
},