mirror of
https://github.com/umami-software/umami.git
synced 2026-02-07 14:17:13 +01:00
change pagestable to visitors and update clickhouse hostname column to array
This commit is contained in:
parent
195619aeed
commit
2dcb9e21bd
8 changed files with 296 additions and 29 deletions
|
|
@ -17,7 +17,6 @@ async function relationalQuery(websiteId: string, sessionId: string) {
|
|||
select id,
|
||||
distinct_id as "distinctId",
|
||||
website_id as "websiteId",
|
||||
hostname,
|
||||
browser,
|
||||
os,
|
||||
device,
|
||||
|
|
@ -37,7 +36,6 @@ async function relationalQuery(websiteId: string, sessionId: string) {
|
|||
session.distinct_id,
|
||||
website_event.visit_id,
|
||||
session.website_id,
|
||||
website_event.hostname,
|
||||
session.browser,
|
||||
session.os,
|
||||
session.device,
|
||||
|
|
@ -54,8 +52,8 @@ 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}}
|
||||
group by session.session_id, session.distinct_id, visit_id, session.website_id, website_event.hostname, session.browser, session.os, session.device, session.screen, session.language, session.country, session.region, session.city) t
|
||||
group by id, distinct_id, website_id, hostname, browser, os, device, screen, language, country, region, city;
|
||||
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;
|
||||
`,
|
||||
{ websiteId, sessionId },
|
||||
).then(result => result?.[0]);
|
||||
|
|
@ -69,7 +67,6 @@ async function clickhouseQuery(websiteId: string, sessionId: string) {
|
|||
select id,
|
||||
websiteId,
|
||||
distinctId,
|
||||
hostname,
|
||||
browser,
|
||||
os,
|
||||
device,
|
||||
|
|
@ -89,7 +86,6 @@ async function clickhouseQuery(websiteId: string, sessionId: string) {
|
|||
distinct_id as distinctId,
|
||||
visit_id,
|
||||
website_id as websiteId,
|
||||
hostname,
|
||||
browser,
|
||||
os,
|
||||
device,
|
||||
|
|
@ -105,8 +101,8 @@ async function clickhouseQuery(websiteId: string, sessionId: string) {
|
|||
from website_event_stats_hourly
|
||||
where website_id = {websiteId:UUID}
|
||||
and session_id = {sessionId:UUID}
|
||||
group by session_id, distinct_id, visit_id, website_id, hostname, browser, os, device, screen, language, country, region, city) t
|
||||
group by id, websiteId, distinctId, hostname, browser, os, device, screen, language, country, region, city;
|
||||
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;
|
||||
`,
|
||||
{ websiteId, sessionId },
|
||||
).then(result => result?.[0]);
|
||||
|
|
|
|||
|
|
@ -27,7 +27,6 @@ async function relationalQuery(websiteId: string, filters: QueryFilters, pagePar
|
|||
select
|
||||
session.session_id as "id",
|
||||
session.website_id as "websiteId",
|
||||
website_event.hostname,
|
||||
session.browser,
|
||||
session.os,
|
||||
session.device,
|
||||
|
|
@ -58,7 +57,6 @@ async function relationalQuery(websiteId: string, filters: QueryFilters, pagePar
|
|||
}
|
||||
group by session.session_id,
|
||||
session.website_id,
|
||||
website_event.hostname,
|
||||
session.browser,
|
||||
session.os,
|
||||
session.device,
|
||||
|
|
@ -84,7 +82,6 @@ async function clickhouseQuery(websiteId: string, filters: QueryFilters, pagePar
|
|||
select
|
||||
session_id as id,
|
||||
website_id as websiteId,
|
||||
hostname,
|
||||
browser,
|
||||
os,
|
||||
device,
|
||||
|
|
@ -112,7 +109,7 @@ async function clickhouseQuery(websiteId: string, filters: QueryFilters, pagePar
|
|||
or (positionCaseInsensitive(device, {search:String}) > 0))`
|
||||
: ''
|
||||
}
|
||||
group by session_id, website_id, hostname, browser, os, device, screen, language, country, region, city
|
||||
group by session_id, website_id, browser, os, device, screen, language, country, region, city
|
||||
order by lastAt desc
|
||||
`,
|
||||
{ ...params, search },
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue