mirror of
https://github.com/umami-software/umami.git
synced 2026-02-07 14:17:13 +01:00
route to view or raw table based on filters
This commit is contained in:
parent
2dcb9e21bd
commit
954404f8df
7 changed files with 102 additions and 26 deletions
|
|
@ -142,18 +142,18 @@ async function clickhouseQuery(
|
|||
`;
|
||||
} else {
|
||||
let groupByQuery = '';
|
||||
let columnQuery = `session_id s, arrayJoin(${column})`;
|
||||
let columnQuery = `arrayJoin(${column})`;
|
||||
|
||||
if (column === 'referrer_domain') {
|
||||
excludeDomain = `and t != ''`;
|
||||
}
|
||||
|
||||
if (type === 'entry') {
|
||||
columnQuery = `session_id s, argMinMerge(entry_url)`;
|
||||
columnQuery = `argMinMerge(entry_url)`;
|
||||
}
|
||||
|
||||
if (type === 'exit') {
|
||||
columnQuery = `session_id s, argMaxMerge(exit_url)`;
|
||||
columnQuery = `argMaxMerge(exit_url)`;
|
||||
}
|
||||
|
||||
if (type === 'entry' || type === 'exit') {
|
||||
|
|
@ -164,7 +164,8 @@ async function clickhouseQuery(
|
|||
select g.t as x,
|
||||
uniq(s) as y
|
||||
from (
|
||||
select ${columnQuery} as t
|
||||
select session_id s,
|
||||
${columnQuery} as t
|
||||
from website_event_stats_hourly website_event
|
||||
${cohortQuery}
|
||||
where website_id = {websiteId:UUID}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue