implement UTM filters and fields
This commit is contained in:
@@ -33,6 +33,7 @@ async function relationalQuery(websiteId: string, filters: QueryFilters) {
|
||||
${joinSessionQuery}
|
||||
where website_event.website_id = {{websiteId::uuid}}
|
||||
and website_event.created_at between {{startDate}} and {{endDate}}
|
||||
and website_event.event_type != 2
|
||||
${filterQuery}
|
||||
group by time
|
||||
order by 1
|
||||
@@ -59,8 +60,10 @@ async function clickhouseQuery(websiteId: string, filters: QueryFilters) {
|
||||
count(distinct session_id) as value
|
||||
from website_event
|
||||
${cohortQuery}
|
||||
${excludeBounceQuery}
|
||||
where website_id = {websiteId:UUID}
|
||||
and created_at between {startDate:DateTime64} and {endDate:DateTime64}
|
||||
and event_type != 2
|
||||
${filterQuery}
|
||||
group by time
|
||||
order by time
|
||||
@@ -75,6 +78,7 @@ async function clickhouseQuery(websiteId: string, filters: QueryFilters) {
|
||||
${excludeBounceQuery}
|
||||
where website_id = {websiteId:UUID}
|
||||
and created_at between {startDate:DateTime64} and {endDate:DateTime64}
|
||||
and event_type != 2
|
||||
${filterQuery}
|
||||
group by time
|
||||
order by time
|
||||
|
||||
@@ -71,7 +71,7 @@ async function relationalQuery(
|
||||
website_event.session_id, website_event.visit_id
|
||||
) as t
|
||||
group by ${parseFieldsByName(fields)}
|
||||
order by 1 desc, 2 desc
|
||||
order by 2 desc, 1 desc
|
||||
limit 500
|
||||
`,
|
||||
queryParams,
|
||||
@@ -119,7 +119,7 @@ async function clickhouseQuery(
|
||||
session_id, visit_id
|
||||
) as t
|
||||
group by ${parseFieldsByName(fields)}
|
||||
order by 1 desc, 2 desc
|
||||
order by 2 desc, 1 desc
|
||||
limit 500
|
||||
`,
|
||||
queryParams,
|
||||
|
||||
Reference in New Issue
Block a user