-
Notifications
You must be signed in to change notification settings - Fork 919
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ads team ppa testing (fix #14839) #14850
base: main
Are you sure you want to change the base?
Changes from all commits
ce5cb80
4527984
c4dfca4
96e0930
b02abd1
14ae117
dcf1ba1
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
/* | ||
* This Source Code Form is subject to the terms of the Mozilla Public | ||
* License, v. 2.0. If a copy of the MPL was not distributed with this | ||
* file, You can obtain one at https://mozilla.org/MPL/2.0/. | ||
*/ | ||
|
||
if (/\sFirefox/.test(navigator.userAgent)) { | ||
const links = document.getElementsByClassName('js-fxa-product-button'); | ||
Array.from(links).forEach((link) => { | ||
'use strict'; | ||
|
||
link.addEventListener('click', () => { | ||
navigator.privateAttribution.measureConversion({ | ||
task: 'task_id', // Unique task ID. Supplied by Mozilla. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Has this been provided yet? I assume our unique task ID is not actually There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Both |
||
histogramSize: 5, // Supplied by Mozilla | ||
lookbackDays: 30, | ||
impression: 'click', | ||
ads: ['moz-mdn-test-2'], | ||
sources: ['mozilla.org'] | ||
}); | ||
}); | ||
}); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will this throw an error in older Firefox versions? It might be worth wrapping in a try/catch if so?