mirror of
https://github.com/kremalicious/umami.git
synced 2024-11-22 09:57:00 +01:00
Merge branch 'dev' into analytics
This commit is contained in:
commit
0e44ce31a1
@ -20,7 +20,7 @@ export function LanguageSetting() {
|
|||||||
|
|
||||||
const handleReset = () => saveLocale(DEFAULT_LOCALE);
|
const handleReset = () => saveLocale(DEFAULT_LOCALE);
|
||||||
|
|
||||||
const renderValue = (value: string | number) => languages[value].label;
|
const renderValue = (value: string | number) => languages?.[value]?.label;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Flexbox gap={10}>
|
<Flexbox gap={10}>
|
||||||
|
@ -99,12 +99,13 @@ function parseParameters(data: any[]) {
|
|||||||
|
|
||||||
for (const [key, value] of searchParams) {
|
for (const [key, value] of searchParams) {
|
||||||
if (key.match(/^utm_(\w+)$/)) {
|
if (key.match(/^utm_(\w+)$/)) {
|
||||||
|
const name = decodeURIComponent(value);
|
||||||
if (!obj[key]) {
|
if (!obj[key]) {
|
||||||
obj[key] = { [value]: +num };
|
obj[key] = { [name]: +num };
|
||||||
} else if (!obj[key][value]) {
|
} else if (!obj[key][name]) {
|
||||||
obj[key][value] = +num;
|
obj[key][name] = +num;
|
||||||
} else {
|
} else {
|
||||||
obj[key][value] += +num;
|
obj[key][name] += +num;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user