mirror of
https://github.com/umami-software/umami.git
synced 2026-02-04 12:47:13 +01:00
build mysql funnel params
This commit is contained in:
parent
5a0908964c
commit
70367ffcc4
2 changed files with 50 additions and 27 deletions
|
|
@ -36,16 +36,20 @@ async function relationalQuery(
|
|||
> {
|
||||
const { windowMinutes, startDate, endDate, urls } = criteria;
|
||||
const { rawQuery, getFunnelQuery, toUuid } = prisma;
|
||||
const { levelQuery, sumQuery, urlFilterQuery } = getFunnelQuery(urls, windowMinutes);
|
||||
const { levelQuery, sumQuery, urlParams } = getFunnelQuery(
|
||||
urls,
|
||||
endDate,
|
||||
websiteId,
|
||||
windowMinutes,
|
||||
);
|
||||
|
||||
const params: any = [websiteId, startDate, endDate, ...urls];
|
||||
const params: any = [websiteId, startDate, endDate, ...urlParams];
|
||||
|
||||
return rawQuery(
|
||||
`WITH level1 AS (
|
||||
select distinct session_id, created_at
|
||||
from website_event
|
||||
where url_path in (${urlFilterQuery})
|
||||
and website_id = $1${toUuid()}
|
||||
where website_id = $1${toUuid()}
|
||||
and created_at between $2 and $3
|
||||
and url_path = $4)
|
||||
${levelQuery}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue