Added session data display.

This commit is contained in:
Mike Cao 2024-07-30 21:22:19 -07:00
parent f32bf0a2e0
commit b3e6e52473
23 changed files with 239 additions and 34 deletions

View file

@ -37,9 +37,9 @@ async function clickhouseQuery(websiteId: string, sessionId: string) {
city,
min(created_at) as firstAt,
max(created_at) as lastAt,
uniq(visit_id) as "visits",
sumIf(1, event_type = 1) as "views",
sumIf(1, event_type = 2) as "events"
uniq(visit_id) as visits,
sumIf(1, event_type = 1) as views,
sumIf(1, event_type = 2) as events
from website_event
where website_id = {websiteId:UUID}
and session_id = {sessionId:UUID}