mirror of
https://github.com/umami-software/umami.git
synced 2026-02-09 23:27:12 +01:00
Refactored referrer logic. Display stats for no referrers.
This commit is contained in:
parent
0026b4b1ea
commit
be8291c856
92 changed files with 687 additions and 450 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue