зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1573837 - Add utm_* params to the "View full report on Firefox Monitor" link. r=johannh
Differential Revision: https://phabricator.services.mozilla.com/D42144 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
cd5788b20f
Коммит
6de8405695
|
@ -1616,7 +1616,8 @@ pref("browser.contentblocking.report.lockwise.enabled", true);
|
|||
// Enable Protections report's Monitor card by default.
|
||||
pref("browser.contentblocking.report.monitor.enabled", true);
|
||||
|
||||
pref("browser.contentblocking.report.monitor.url", "https://monitor.firefox.com");
|
||||
pref("browser.contentblocking.report.monitor.url", "https://monitor.firefox.com/?entrypoint=protection_report_monitor&utm_source=about-protections");
|
||||
pref("browser.contentblocking.report.monitor.sign_in_url", "https://monitor.firefox.com/oauth/init?entrypoint=protection_report_monitor&utm_source=about-protections&email=");
|
||||
pref("browser.contentblocking.report.lockwise.url", "https://lockwise.firefox.com/");
|
||||
pref("browser.contentblocking.report.manage_devices.url", "https://accounts.firefox.com/settings/clients");
|
||||
|
||||
|
|
|
@ -4,10 +4,14 @@
|
|||
|
||||
/* eslint-env mozilla/frame-script */
|
||||
|
||||
const MONITOR_SIGN_IN_URL = RPMGetStringPref(
|
||||
const MONITOR_URL = RPMGetStringPref(
|
||||
"browser.contentblocking.report.monitor.url",
|
||||
""
|
||||
);
|
||||
const MONITOR_SIGN_IN_URL = RPMGetStringPref(
|
||||
"browser.contentblocking.report.monitor.sign_in_url",
|
||||
""
|
||||
);
|
||||
const HOW_IT_WORKS_URL_PREF = RPMGetFormatURLPref(
|
||||
"browser.contentblocking.report.monitor.how_it_works.url"
|
||||
);
|
||||
|
@ -19,7 +23,7 @@ export default class MonitorClass {
|
|||
|
||||
init() {
|
||||
const monitorLinkTag = this.doc.getElementById("monitor-inline-link");
|
||||
monitorLinkTag.href = MONITOR_SIGN_IN_URL;
|
||||
monitorLinkTag.href = MONITOR_URL;
|
||||
|
||||
RPMAddMessageListener("SendUserLoginsData", ({ data }) => {
|
||||
// Wait for monitor data and display the card.
|
||||
|
@ -99,16 +103,7 @@ export default class MonitorClass {
|
|||
* @return URL to Monitor website.
|
||||
*/
|
||||
buildMonitorUrl(email = null) {
|
||||
let url = MONITOR_SIGN_IN_URL;
|
||||
|
||||
if (email) {
|
||||
url += `/oauth/init?email=${email}&entrypoint=protection_report_monitor&utm_source=about-protections`;
|
||||
} else {
|
||||
url +=
|
||||
"/?entrypoint=protection_report_monitor&utm_source=about-protections";
|
||||
}
|
||||
|
||||
return url;
|
||||
return email ? `${MONITOR_SIGN_IN_URL}${email}` : MONITOR_URL;
|
||||
}
|
||||
|
||||
renderContentForUserWithLogins(monitorData) {
|
||||
|
|
|
@ -14,6 +14,7 @@ add_task(async function setup() {
|
|||
["browser.contentblocking.report.proxy.enabled", true],
|
||||
// Change the endpoints to prevent non-local network connections when landing on the page.
|
||||
["browser.contentblocking.report.monitor.url", ""],
|
||||
["browser.contentblocking.report.monitor.sign_in_url", ""],
|
||||
["browser.contentblocking.report.lockwise.url", ""],
|
||||
],
|
||||
});
|
||||
|
|
|
@ -67,6 +67,7 @@ let RPMAccessManager = {
|
|||
"browser.contentblocking.category",
|
||||
"browser.contentblocking.report.lockwise.url",
|
||||
"browser.contentblocking.report.monitor.url",
|
||||
"browser.contentblocking.report.monitor.sign_in_url",
|
||||
"browser.contentblocking.report.manage_devices.url",
|
||||
],
|
||||
getFormatURLPref: [
|
||||
|
|
Загрузка…
Ссылка в новой задаче