mirror of
https://github.com/umami-software/umami.git
synced 2026-02-17 11:05:36 +01:00
clean-up session api endpoints and queries
This commit is contained in:
parent
f98e683979
commit
533a42eb2e
10 changed files with 64 additions and 43 deletions
|
|
@ -98,6 +98,7 @@ async function clickhouseQuery(websiteId: string, filters: QueryFilters) {
|
|||
select
|
||||
session_id as id,
|
||||
website_id as websiteId,
|
||||
hostname,
|
||||
browser,
|
||||
os,
|
||||
device,
|
||||
|
|
@ -117,7 +118,7 @@ async function clickhouseQuery(websiteId: string, filters: QueryFilters) {
|
|||
${dateQuery}
|
||||
${filterQuery}
|
||||
${searchQuery}
|
||||
group by session_id, website_id, browser, os, device, screen, language, country, region, city
|
||||
group by session_id, website_id, hostname, browser, os, device, screen, language, country, region, city
|
||||
order by lastAt desc
|
||||
`;
|
||||
} else {
|
||||
|
|
@ -125,7 +126,7 @@ async function clickhouseQuery(websiteId: string, filters: QueryFilters) {
|
|||
select
|
||||
session_id as id,
|
||||
website_id as websiteId,
|
||||
hostname,
|
||||
arrayFirst(x -> 1, hostname) hostname,
|
||||
browser,
|
||||
os,
|
||||
device,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue