mirror of
https://github.com/umami-software/umami.git
synced 2026-02-08 14:47:14 +01:00
implement filtering and cohorts to all relevant queries
This commit is contained in:
parent
789b8b36d8
commit
2f1f704728
34 changed files with 311 additions and 167 deletions
|
|
@ -31,6 +31,7 @@ async function relationalQuery(websiteId: string, filters: QueryFilters) {
|
|||
website_id as "websiteId",
|
||||
session_id as "sessionId",
|
||||
created_at as "createdAt",
|
||||
hostname,
|
||||
url_path as "urlPath",
|
||||
url_query as "urlQuery",
|
||||
referrer_path as "referrerPath",
|
||||
|
|
@ -46,6 +47,7 @@ async function relationalQuery(websiteId: string, filters: QueryFilters) {
|
|||
event_name as "eventName"
|
||||
from website_event
|
||||
${cohortQuery}
|
||||
join session on website_event.session_id = session.session_id
|
||||
where website_id = {{websiteId::uuid}}
|
||||
${dateQuery}
|
||||
${filterQuery}
|
||||
|
|
@ -77,6 +79,7 @@ async function clickhouseQuery(websiteId: string, filters: QueryFilters) {
|
|||
website_id as websiteId,
|
||||
session_id as sessionId,
|
||||
created_at as createdAt,
|
||||
hostname,
|
||||
url_path as urlPath,
|
||||
url_query as urlQuery,
|
||||
referrer_path as referrerPath,
|
||||
|
|
@ -84,13 +87,13 @@ async function clickhouseQuery(websiteId: string, filters: QueryFilters) {
|
|||
referrer_domain as referrerDomain,
|
||||
country as country,
|
||||
city as city,
|
||||
device as device,
|
||||
device as device,
|
||||
os as os,
|
||||
browser as browser,
|
||||
page_title as pageTitle,
|
||||
event_type as eventType,
|
||||
event_name as eventName,
|
||||
event_id IN (SELECT event_id FROM event_data) AS hasData
|
||||
event_id IN (SELECT event_id FROM event_data) as hasData
|
||||
from website_event
|
||||
${cohortQuery}
|
||||
where website_id = {websiteId:UUID}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue