Refactored referrer logic. Display stats for no referrers.

This commit is contained in:
Mike Cao committed 2022-07-21 01:11:10 -07:00
1 parent 0026b4b1ea
commit be8291c856
92 files changed
+687 -450

No files matched your search

-8
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) {