mirror of
https://github.com/umami-software/umami.git
synced 2026-02-05 05:07:15 +01:00
fix total visitors query to exclude event_type
This commit is contained in:
parent
2489601ae6
commit
5ea58e2b30
1 changed files with 14 additions and 2 deletions
|
|
@ -40,6 +40,12 @@ async function relationalQuery(
|
|||
eventType,
|
||||
});
|
||||
|
||||
const excludeEventTypeFilterQuery = filterQuery
|
||||
.split('\n')
|
||||
.filter(filter => !filter.includes('event_type'))
|
||||
.join('\n')
|
||||
.trim();
|
||||
|
||||
return rawQuery(
|
||||
`
|
||||
select count(distinct website_event.session_id) as num,
|
||||
|
|
@ -50,7 +56,7 @@ async function relationalQuery(
|
|||
${joinSessionQuery}
|
||||
where website_event.website_id = {{websiteId::uuid}}
|
||||
${dateQuery}
|
||||
${filterQuery}
|
||||
${excludeEventTypeFilterQuery}
|
||||
) as total
|
||||
from website_event
|
||||
${cohortQuery}
|
||||
|
|
@ -82,6 +88,12 @@ async function clickhouseQuery(
|
|||
eventType,
|
||||
});
|
||||
|
||||
const excludeEventTypeFilterQuery = filterQuery
|
||||
.split('\n')
|
||||
.filter(filter => !filter.includes('event_type'))
|
||||
.join('\n')
|
||||
.trim();
|
||||
|
||||
return rawQuery(
|
||||
`
|
||||
select count(distinct session_id) as num,
|
||||
|
|
@ -91,7 +103,7 @@ async function clickhouseQuery(
|
|||
${cohortQuery}
|
||||
where website_id = {websiteId:UUID}
|
||||
${dateQuery}
|
||||
${filterQuery}
|
||||
${excludeEventTypeFilterQuery}
|
||||
) as total
|
||||
from website_event
|
||||
${cohortQuery}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue