added missing exit event cases
This commit is contained in:
parent
493bf8dc89
commit
16aa7983ed
@ -41,6 +41,11 @@ function urlToMetric(url) {
|
|||||||
return 'twitter';
|
return 'twitter';
|
||||||
case 'https://www.mozilla.org/firefox/new/?scene=2':
|
case 'https://www.mozilla.org/firefox/new/?scene=2':
|
||||||
return 'download-firefox';
|
return 'download-firefox';
|
||||||
|
case 'https://qsurvey.mozilla.com/s3/txp-firefox-send':
|
||||||
|
return 'survey';
|
||||||
|
case 'https://testpilot.firefox.com/':
|
||||||
|
case 'https://testpilot.firefox.com/experiments/send':
|
||||||
|
return 'testpilot';
|
||||||
default:
|
default:
|
||||||
return 'other';
|
return 'other';
|
||||||
}
|
}
|
||||||
@ -198,7 +203,7 @@ function exitEvent(target) {
|
|||||||
function addExitHandlers() {
|
function addExitHandlers() {
|
||||||
const links = Array.from(document.querySelectorAll('a'));
|
const links = Array.from(document.querySelectorAll('a'));
|
||||||
links.forEach(l => {
|
links.forEach(l => {
|
||||||
if (/^http/.test(l.href)) {
|
if (/^http/.test(l.getAttribute('href'))) {
|
||||||
l.addEventListener('click', exitEvent);
|
l.addEventListener('click', exitEvent);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user