finished metrics

This commit is contained in:
Abhinav Adduri 2017-07-20 15:16:00 -07:00
parent 76a6f02eb7
commit 99477774cf
9 changed files with 542 additions and 173 deletions

View file

@ -69,9 +69,35 @@ function gcmCompliant() {
}
}
function findMetric(href) {
switch(href) {
case 'https://www.mozilla.org/':
return 'mozilla';
case 'https://www.mozilla.org/about/legal':
return 'legal';
case 'https://testpilot.firefox.com/about':
return 'about';
case 'https://testpilot.firefox.com/privacy':
return 'privacy';
case 'https://testpilot.firefox.com/terms':
return 'terms';
case 'https://www.mozilla.org/en-US/privacy/websites/#cookies':
return 'cookies';
case 'https://github.com/mozilla/send':
return 'github';
case 'https://twitter.com/FxTestPilot':
return 'twitter';
case 'https://www.mozilla.org/firefox/new/?scene=2':
return 'download-firefox';
default:
return 'other';
}
}
module.exports = {
arrayToHex,
hexToArray,
notify,
gcmCompliant
gcmCompliant,
findMetric
};