mirror of
https://github.com/umami-software/umami.git
synced 2026-02-08 06:37:18 +01:00
Merge branch 'dev' into jajaja
# Conflicts: # pnpm-lock.yaml # src/queries/sql/getWebsiteStats.ts # src/queries/sql/pageviews/getPageviewMetrics.ts # src/queries/sql/sessions/getWebsiteSessionStats.ts # src/queries/sql/sessions/getWebsiteSessions.ts # src/queries/sql/sessions/getWebsiteSessionsWeekly.ts
This commit is contained in:
commit
2f7f8911cd
7 changed files with 96 additions and 25 deletions
|
|
@ -146,18 +146,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') {
|
||||
|
|
@ -168,6 +168,9 @@ async function clickhouseQuery(
|
|||
select g.t as x,
|
||||
uniq(s) as y
|
||||
from (
|
||||
select session_id s,
|
||||
${columnQuery} as t
|
||||
from website_event_stats_hourly website_event
|
||||
select ${columnQuery} as t
|
||||
from website_event_stats_hourly as website_event
|
||||
${cohortQuery}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue