Refactored referrer logic. Display stats for no referrers.

This commit is contained in:
Mike Cao 2022-07-21 01:11:10 -07:00
parent 0026b4b1ea
commit be8291c856
92 changed files with 687 additions and 450 deletions

View file

@ -6,14 +6,6 @@ export function removeWWW(url) {
return url && url.length > 1 && url.startsWith('www.') ? url.slice(4) : url;
}
export function getDomainName(str) {
try {
return new URL(str).hostname;
} catch (e) {
return str;
}
}
export function getQueryString(params = {}) {
const map = Object.keys(params).reduce((arr, key) => {
if (params[key] !== undefined) {