mirror of
https://github.com/umami-software/umami.git
synced 2026-02-04 04:37:11 +01:00
add dropoff percentages to funnel report
This commit is contained in:
parent
94967d45e1
commit
858f465566
5 changed files with 15 additions and 7 deletions
|
|
@ -31,6 +31,7 @@ async function relationalQuery(
|
|||
{
|
||||
x: string;
|
||||
y: number;
|
||||
z: number;
|
||||
}[]
|
||||
> {
|
||||
const { windowMinutes, startDate, endDate, urls } = criteria;
|
||||
|
|
@ -60,8 +61,12 @@ async function relationalQuery(
|
|||
from levelCount;
|
||||
`,
|
||||
params,
|
||||
).then((a: { [key: string]: number }) => {
|
||||
return urls.map((b, i) => ({ x: b, y: a[0][`level${i + 1}`] || 0 }));
|
||||
).then(results => {
|
||||
return urls.map((a, i) => ({
|
||||
x: a,
|
||||
y: results[i]?.count || 0,
|
||||
z: results[i]?.drop_off || 0,
|
||||
}));
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue