exclude performance events from non-performance metrics/lists
This commit is contained in:
1 parent
88ccf5348e
commit
17e7a4a63a
16 files changed
+55
-8
No files matched your search
@@ -1,4 +1,5 @@
|
||||
import clickhouse from '@/lib/clickhouse';
|
||||
import { EVENT_TYPE } from '@/lib/constants';
|
||||
import { CLICKHOUSE, PRISMA, runQuery } from '@/lib/db';
|
||||
import prisma from '@/lib/prisma';
|
||||
|
||||
@@ -54,6 +55,7 @@ async function relationalQuery(websiteId: string, sessionId: string) {
|
||||
join website_event on website_event.session_id = session.session_id
|
||||
where session.website_id = {{websiteId::uuid}}
|
||||
and session.session_id = {{sessionId::uuid}}
|
||||
and website_event.event_type != ${EVENT_TYPE.performance}
|
||||
group by session.session_id, session.distinct_id, visit_id, session.website_id, session.browser, session.os, session.device, session.screen, session.language, session.country, session.region, session.city) t
|
||||
group by id, distinct_id, website_id, browser, os, device, screen, language, country, region, city;
|
||||
`,
|
||||
@@ -104,6 +106,7 @@ async function clickhouseQuery(websiteId: string, sessionId: string) {
|
||||
from website_event_stats_hourly
|
||||
where website_id = {websiteId:UUID}
|
||||
and session_id = {sessionId:UUID}
|
||||
and event_type != ${EVENT_TYPE.performance}
|
||||
group by session_id, distinct_id, visit_id, website_id, browser, os, device, screen, language, country, region, city) t
|
||||
group by id, websiteId, distinctId, browser, os, device, screen, language, country, region, city;
|
||||
`,
|
||||
|
||||
Reference in new issue
Block a user