mirror of
https://github.com/umami-software/umami.git
synced 2026-02-17 02:55:38 +01:00
fix sorting on UTM queries, add more ads in case logic
This commit is contained in:
parent
40ca861c69
commit
3da61989b7
1 changed files with 8 additions and 3 deletions
|
|
@ -61,7 +61,7 @@ async function relationalQuery(
|
||||||
and we.session_id = m.session_id
|
and we.session_id = m.session_id
|
||||||
${currency ? '' : `where we.${utmColumn} != ''`}
|
${currency ? '' : `where we.${utmColumn} != ''`}
|
||||||
group by 1
|
group by 1
|
||||||
order by name desc
|
order by 2 desc
|
||||||
limit 20`;
|
limit 20`;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -269,7 +269,7 @@ async function clickhouseQuery(
|
||||||
and we.session_id = m.session_id
|
and we.session_id = m.session_id
|
||||||
${currency ? '' : `where we.${utmColumn} != ''`}
|
${currency ? '' : `where we.${utmColumn} != ''`}
|
||||||
group by 1
|
group by 1
|
||||||
order by name desc
|
order by 2 desc
|
||||||
limit 20`;
|
limit 20`;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -361,7 +361,12 @@ async function clickhouseQuery(
|
||||||
`
|
`
|
||||||
${currency ? revenueEventQuery : eventQuery}
|
${currency ? revenueEventQuery : eventQuery}
|
||||||
${getModelQuery(model)}
|
${getModelQuery(model)}
|
||||||
select multiIf(gclid != '', 'Google', fbclid != '', 'Facebook', '') name,
|
select multiIf(gclid != '', 'Google Ads',
|
||||||
|
fbclid != '', 'Facebook / Meta',
|
||||||
|
msclkid != '', 'Microsoft Ads',
|
||||||
|
ttclid != '', 'TikTok Ads',
|
||||||
|
li_fat_id != '', ' LinkedIn Ads',
|
||||||
|
twclid != '', 'Twitter Ads (X)','') name,
|
||||||
${currency ? 'sum(e.value)' : 'uniqExact(we.session_id)'} value
|
${currency ? 'sum(e.value)' : 'uniqExact(we.session_id)'} value
|
||||||
from events e
|
from events e
|
||||||
join model m
|
join model m
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue