mirror of
https://github.com/umami-software/umami.git
synced 2026-02-04 04:37:11 +01:00
Fix filter issue for metrics. Closes #1268
This commit is contained in:
parent
25d97fca95
commit
ba1e28f082
4 changed files with 37 additions and 10 deletions
|
|
@ -2,6 +2,7 @@ import { getPageviewMetrics, getSessionMetrics, getWebsiteById, getPageviewParam
|
|||
import { ok, methodNotAllowed, unauthorized, badRequest } from 'lib/response';
|
||||
import { allowQuery } from 'lib/auth';
|
||||
import { useCors } from 'lib/middleware';
|
||||
import { FILTER_IGNORED } from 'lib/constants';
|
||||
|
||||
const sessionColumns = ['browser', 'os', 'device', 'screen', 'country', 'language'];
|
||||
const pageviewColumns = ['url', 'referrer'];
|
||||
|
|
@ -130,7 +131,7 @@ export default async (req, res) => {
|
|||
const filters = {
|
||||
domain,
|
||||
url: type !== 'url' && table !== 'event' ? url : undefined,
|
||||
referrer: type !== 'referrer' ? referrer : true,
|
||||
referrer: type !== 'referrer' && table !== 'event' ? referrer : FILTER_IGNORED,
|
||||
os: type !== 'os' ? os : undefined,
|
||||
browser: type !== 'browser' ? browser : undefined,
|
||||
device: type !== 'device' ? device : undefined,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue