mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 972936 - Overall impressions metrics for New Tab [r=adw]
Add a histogram for each of the 3 directory link types and count how many were shown.
This commit is contained in:
parent
62f73aea50
commit
5ceba98a3e
@ -90,11 +90,29 @@ let gPage = {
|
||||
if (this.allowBackgroundCaptures) {
|
||||
Services.telemetry.getHistogramById("NEWTAB_PAGE_SHOWN").add(true);
|
||||
|
||||
// Initialize type counting with the types we want to count
|
||||
let directoryCount = {};
|
||||
for (let type of DirectoryLinksProvider.linkTypes) {
|
||||
directoryCount[type] = 0;
|
||||
}
|
||||
|
||||
for (let site of gGrid.sites) {
|
||||
if (site) {
|
||||
site.captureIfMissing();
|
||||
let {type} = site.link;
|
||||
if (type in directoryCount) {
|
||||
directoryCount[type]++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Record how many directory sites were shown, but place counts over the
|
||||
// default 9 in the same bucket
|
||||
for (let [type, count] of Iterator(directoryCount)) {
|
||||
let shownId = "NEWTAB_PAGE_DIRECTORY_" + type.toUpperCase() + "_SHOWN";
|
||||
let shownCount = Math.min(10, count);
|
||||
Services.telemetry.getHistogramById(shownId).add(shownCount);
|
||||
}
|
||||
}
|
||||
});
|
||||
this._mutationObserver.observe(document.documentElement, {
|
||||
|
@ -4041,6 +4041,24 @@
|
||||
"n_values": 10,
|
||||
"description": "Track click count on about:newtab tiles per index (0-8). For non-default row or column configurations all clicks into the '9' bucket."
|
||||
},
|
||||
"NEWTAB_PAGE_DIRECTORY_AFFILIATE_SHOWN": {
|
||||
"expires_in_version": "35",
|
||||
"kind": "enumerated",
|
||||
"n_values": 11,
|
||||
"description": "Number of affiliate directory links shown on about:newtab. For non-default row or column configurations, extra links fall into the '10' bucket."
|
||||
},
|
||||
"NEWTAB_PAGE_DIRECTORY_ORGANIC_SHOWN": {
|
||||
"expires_in_version": "35",
|
||||
"kind": "enumerated",
|
||||
"n_values": 11,
|
||||
"description": "Number of organic directory links shown on about:newtab. For non-default row or column configurations, extra links fall into the '10' bucket."
|
||||
},
|
||||
"NEWTAB_PAGE_DIRECTORY_SPONSORED_SHOWN": {
|
||||
"expires_in_version": "35",
|
||||
"kind": "enumerated",
|
||||
"n_values": 11,
|
||||
"description": "Number of sponsored directory links shown on about:newtab. For non-default row or column configurations, extra links fall into the '10' bucket."
|
||||
},
|
||||
"NEWTAB_PAGE_DIRECTORY_TYPE_CLICKED": {
|
||||
"expires_in_version": "35",
|
||||
"kind": "enumerated",
|
||||
|
Loading…
Reference in New Issue
Block a user