mirror of
https://github.com/umami-software/umami.git
synced 2026-02-09 15:17:23 +01:00
add distinct id to saves and fix schema mapping
This commit is contained in:
parent
c5efc27c07
commit
de54290af6
6 changed files with 32 additions and 7 deletions
|
|
@ -39,6 +39,7 @@ export async function saveEvent(args: {
|
|||
region?: string;
|
||||
city?: string;
|
||||
tag?: string;
|
||||
distinctId?: string;
|
||||
createdAt?: Date;
|
||||
}) {
|
||||
return runQuery({
|
||||
|
|
@ -182,6 +183,7 @@ async function clickhouseQuery(data: {
|
|||
region?: string;
|
||||
city?: string;
|
||||
tag?: string;
|
||||
distinctId?: string;
|
||||
createdAt?: Date;
|
||||
}) {
|
||||
const {
|
||||
|
|
@ -211,6 +213,7 @@ async function clickhouseQuery(data: {
|
|||
region,
|
||||
city,
|
||||
tag,
|
||||
distinctId,
|
||||
createdAt,
|
||||
...args
|
||||
} = data;
|
||||
|
|
@ -247,6 +250,7 @@ async function clickhouseQuery(data: {
|
|||
event_type: eventName ? EVENT_TYPE.customEvent : EVENT_TYPE.pageView,
|
||||
event_name: eventName ? eventName?.substring(0, EVENT_NAME_LENGTH) : null,
|
||||
tag: tag,
|
||||
distinct_id: distinctId,
|
||||
created_at: getUTCString(createdAt),
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue