mirror of
https://github.com/umami-software/umami.git
synced 2026-02-10 15:47:13 +01:00
Feat/um 49 query builder api (#1573)
* add uuid to event. add indexes * eventdata api * add event data * remove test data * update list
This commit is contained in:
parent
9c36dc485e
commit
ba31f48f1a
32 changed files with 690 additions and 64 deletions
|
|
@ -12,13 +12,14 @@ export async function saveEvent(...args) {
|
|||
|
||||
async function relationalQuery(
|
||||
{ websiteId },
|
||||
{ session: { id: sessionId }, url, eventName, eventData },
|
||||
{ session: { id: sessionId }, eventUuid, url, eventName, eventData },
|
||||
) {
|
||||
const data = {
|
||||
websiteId,
|
||||
sessionId,
|
||||
url: url?.substring(0, URL_LENGTH),
|
||||
eventName: eventName?.substring(0, EVENT_NAME_LENGTH),
|
||||
eventUuid,
|
||||
};
|
||||
|
||||
if (eventData) {
|
||||
|
|
@ -47,7 +48,7 @@ async function clickhouseQuery(
|
|||
created_at: getDateFormat(new Date()),
|
||||
url: url?.substring(0, URL_LENGTH),
|
||||
event_name: eventName?.substring(0, EVENT_NAME_LENGTH),
|
||||
event_data: JSON.stringify(eventData),
|
||||
event_data: eventData ? JSON.stringify(eventData) : null,
|
||||
...sessionArgs,
|
||||
country: country ? country : null,
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue