mirror of
https://github.com/umami-software/umami.git
synced 2026-02-06 13:47:15 +01:00
Cohort selection.
This commit is contained in:
parent
05f9a67727
commit
bab4f8ebcc
32 changed files with 841 additions and 655 deletions
|
|
@ -40,8 +40,8 @@ async function relationalQuery(
|
|||
): Promise<AttributionResult> {
|
||||
const { model, type, currency } = parameters;
|
||||
const { rawQuery, parseFilters } = prisma;
|
||||
const eventType = type === 'page' ? EVENT_TYPE.pageView : EVENT_TYPE.customEvent;
|
||||
const column = type === 'page' ? 'url_path' : 'event_name';
|
||||
const eventType = type === 'path' ? EVENT_TYPE.pageView : EVENT_TYPE.customEvent;
|
||||
const column = type === 'path' ? 'url_path' : 'event_name';
|
||||
const { filterQuery, joinSessionQuery, cohortQuery, queryParams } = parseFilters({
|
||||
...filters,
|
||||
...parameters,
|
||||
|
|
@ -266,8 +266,8 @@ async function clickhouseQuery(
|
|||
): Promise<AttributionResult> {
|
||||
const { model, type, currency } = parameters;
|
||||
const { rawQuery, parseFilters } = clickhouse;
|
||||
const eventType = type === 'page' ? EVENT_TYPE.pageView : EVENT_TYPE.customEvent;
|
||||
const column = type === 'page' ? 'url_path' : 'event_name';
|
||||
const eventType = type === 'path' ? EVENT_TYPE.pageView : EVENT_TYPE.customEvent;
|
||||
const column = type === 'path' ? 'url_path' : 'event_name';
|
||||
const { filterQuery, cohortQuery, queryParams } = parseFilters({
|
||||
...filters,
|
||||
...parameters,
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@ async function relationalQuery(
|
|||
(pv, cv, i) => {
|
||||
const levelNumber = i + 1;
|
||||
const startSum = i > 0 ? 'union ' : '';
|
||||
const isURL = cv.type === 'page';
|
||||
const isURL = cv.type === 'path';
|
||||
const column = isURL ? 'url_path' : 'event_name';
|
||||
|
||||
let operator = '=';
|
||||
|
|
@ -161,7 +161,7 @@ async function clickhouseQuery(
|
|||
const levelNumber = i + 1;
|
||||
const startSum = i > 0 ? 'union all ' : '';
|
||||
const startFilter = i > 0 ? 'or' : '';
|
||||
const isURL = cv.type === 'page';
|
||||
const isURL = cv.type === 'path';
|
||||
const column = isURL ? 'url_path' : 'event_name';
|
||||
|
||||
let operator = '=';
|
||||
|
|
|
|||
|
|
@ -29,8 +29,8 @@ async function relationalQuery(
|
|||
) {
|
||||
const { startDate, endDate, type, value } = parameters;
|
||||
const { rawQuery, parseFilters } = prisma;
|
||||
const eventType = type === 'page' ? EVENT_TYPE.pageView : EVENT_TYPE.customEvent;
|
||||
const column = type === 'page' ? 'url_path' : 'event_name';
|
||||
const eventType = type === 'path' ? EVENT_TYPE.pageView : EVENT_TYPE.customEvent;
|
||||
const column = type === 'path' ? 'url_path' : 'event_name';
|
||||
const { filterQuery, dateQuery, joinSessionQuery, cohortQuery, queryParams } = parseFilters({
|
||||
...filters,
|
||||
websiteId,
|
||||
|
|
@ -71,8 +71,8 @@ async function clickhouseQuery(
|
|||
) {
|
||||
const { startDate, endDate, type, value } = parameters;
|
||||
const { rawQuery, parseFilters } = clickhouse;
|
||||
const eventType = type === 'page' ? EVENT_TYPE.pageView : EVENT_TYPE.customEvent;
|
||||
const column = type === 'page' ? 'url_path' : 'event_name';
|
||||
const eventType = type === 'path' ? EVENT_TYPE.pageView : EVENT_TYPE.customEvent;
|
||||
const column = type === 'path' ? 'url_path' : 'event_name';
|
||||
const { filterQuery, dateQuery, cohortQuery, queryParams } = parseFilters({
|
||||
...filters,
|
||||
websiteId,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue