diff --git a/browser/components/aboutlogins/LoginBreaches.jsm b/browser/components/aboutlogins/LoginBreaches.jsm index 076f4285d1c8..cb3bf2f6fca6 100644 --- a/browser/components/aboutlogins/LoginBreaches.jsm +++ b/browser/components/aboutlogins/LoginBreaches.jsm @@ -116,6 +116,8 @@ this.LoginBreaches = { } let breachAlertURL = new URL(breach.Name, baseBreachAlertURL); + breachAlertURL.searchParams.set("utm_campaign", "Desktop"); + breachAlertURL.searchParams.set("utm_medium", "InProduct"); breach.breachAlertURL = breachAlertURL.href; breachesByLoginGUID.set(login.guid, breach); } diff --git a/browser/components/aboutlogins/tests/unit/test_getPotentialBreachesByLoginGUID.js b/browser/components/aboutlogins/tests/unit/test_getPotentialBreachesByLoginGUID.js index 8f9309fb6c70..eecd2ceecce4 100644 --- a/browser/components/aboutlogins/tests/unit/test_getPotentialBreachesByLoginGUID.js +++ b/browser/components/aboutlogins/tests/unit/test_getPotentialBreachesByLoginGUID.js @@ -121,7 +121,6 @@ add_task(async function test_notBreachedLogin() { add_task(async function test_breachedLogin() { Services.logins.addLogin(BREACHED_LOGIN); - const breachesByLoginGUID = await LoginBreaches.getPotentialBreachesByLoginGUID( [NOT_BREACHED_LOGIN, BREACHED_LOGIN], TEST_BREACHES @@ -131,6 +130,11 @@ add_task(async function test_breachedLogin() { 1, "Should be 1 breached login: " + BREACHED_LOGIN.origin ); + Assert.strictEqual( + breachesByLoginGUID.get(BREACHED_LOGIN.guid).breachAlertURL, + "https://monitor.firefox.com/breach-details/Breached?utm_campaign=Desktop&utm_medium=InProduct", + "Breach alert link should be equal to the breachAlertURL" + ); }); add_task(async function test_notBreachedSubdomain() {