mirror of
https://github.com/umami-software/umami.git
synced 2026-02-08 06:37:18 +01:00
implement pageviews, events, and channels queries
This commit is contained in:
parent
c1cad16cb9
commit
0a0c1f27c6
24 changed files with 521 additions and 86 deletions
|
|
@ -90,7 +90,11 @@ function mapFilter(column: string, operator: string, name: string, type: string
|
|||
function getFilterQuery(filters: Record<string, any>, options: QueryOptions = {}) {
|
||||
const query = filtersToArray(filters, options).reduce((arr, { name, column, operator }) => {
|
||||
if (column) {
|
||||
arr.push(`and ${mapFilter(column, operator, name)}`);
|
||||
if (name === 'eventType') {
|
||||
arr.push(`and ${mapFilter(column, operator, name, 'UInt32')}`);
|
||||
} else {
|
||||
arr.push(`and ${mapFilter(column, operator, name)}`);
|
||||
}
|
||||
|
||||
if (name === 'referrer') {
|
||||
arr.push(`and referrer_domain != hostname`);
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ export const EVENT_COLUMNS = [
|
|||
'query',
|
||||
'event',
|
||||
'tag',
|
||||
'host',
|
||||
'hostname',
|
||||
];
|
||||
|
||||
export const SESSION_COLUMNS = [
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue