mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-20 16:55:40 +00:00
Bug 1654293 - Remove URL matching from Top Site attribution request. r=mikedeboer
Differential Revision: https://phabricator.services.mozilla.com/D84365
This commit is contained in:
parent
04e1282606
commit
1e00a1d634
@ -376,7 +376,6 @@ export class TopSite extends React.PureComponent {
|
||||
type: at.TOP_SITES_ATTRIBUTION,
|
||||
data: {
|
||||
searchProvider: this.props.link.hostname,
|
||||
siteURL: this.props.link.url,
|
||||
source: "newtab",
|
||||
},
|
||||
})
|
||||
|
@ -10327,7 +10327,6 @@ class TopSite extends react__WEBPACK_IMPORTED_MODULE_4___default.a.PureComponent
|
||||
type: common_Actions_jsm__WEBPACK_IMPORTED_MODULE_0__["actionTypes"].TOP_SITES_ATTRIBUTION,
|
||||
data: {
|
||||
searchProvider: this.props.link.hostname,
|
||||
siteURL: this.props.link.url,
|
||||
source: "newtab"
|
||||
}
|
||||
}));
|
||||
|
@ -589,7 +589,6 @@ class UrlbarInput {
|
||||
searchProvider: result.payload.url.match(
|
||||
/^https?:\/\/(?:www.)?([^.]*)/
|
||||
)[1],
|
||||
siteURL: result.payload.url,
|
||||
source: "urlbar",
|
||||
});
|
||||
}
|
||||
|
@ -21,7 +21,7 @@ ChromeUtils.defineModuleGetter(
|
||||
);
|
||||
|
||||
var TopSiteAttribution = {
|
||||
async makeRequest({ searchProvider, siteURL, source }) {
|
||||
async makeRequest({ searchProvider, source }) {
|
||||
function record(objectString, value = "") {
|
||||
recordTelemetryEvent("search_override_exp", objectString, value, {
|
||||
searchProvider,
|
||||
@ -42,16 +42,7 @@ var TopSiteAttribution = {
|
||||
request.headers.set("X-Region", Region.home);
|
||||
request.headers.set("X-Source", source);
|
||||
const response = await fetch(request);
|
||||
|
||||
if (response.ok) {
|
||||
if (siteURL == response.responseText) {
|
||||
record("attribution", "success");
|
||||
} else {
|
||||
record("attribution", "url_mismatch");
|
||||
}
|
||||
} else {
|
||||
record("attribution", "failure");
|
||||
}
|
||||
record("attribution", response.ok ? "success" : "failure");
|
||||
},
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user