mirror of
https://github.com/kremalicious/umami.git
synced 2024-11-15 17:55:08 +01:00
allow event data CH
This commit is contained in:
parent
f3312732dc
commit
7c05a54ffe
@ -94,7 +94,7 @@ CREATE TABLE event
|
||||
created_at DateTime('UTC'),
|
||||
url String,
|
||||
event_name String,
|
||||
event_data String
|
||||
event_data JSON
|
||||
)
|
||||
engine = MergeTree PRIMARY KEY (event_uuid, created_at)
|
||||
ORDER BY (event_uuid, created_at)
|
||||
|
@ -31,15 +31,19 @@ async function relationalQuery(website_id, { session_id, url, event_name, event_
|
||||
});
|
||||
}
|
||||
|
||||
async function clickhouseQuery(website_id, { event_uuid, session_uuid, url, event_name }) {
|
||||
async function clickhouseQuery(
|
||||
website_id,
|
||||
{ event_uuid, session_uuid, url, event_name, event_data },
|
||||
) {
|
||||
const { getDateFormat, sendMessage } = kafka;
|
||||
const params = {
|
||||
event_uuid: event_uuid,
|
||||
website_id: website_id,
|
||||
session_uuid: session_uuid,
|
||||
event_uuid,
|
||||
website_id,
|
||||
session_uuid,
|
||||
created_at: getDateFormat(new Date()),
|
||||
url: url?.substring(0, URL_LENGTH),
|
||||
event_name: event_name?.substring(0, EVENT_NAME_LENGTH),
|
||||
event_data: JSON.stringify(event_data),
|
||||
};
|
||||
|
||||
await sendMessage(params, 'event');
|
||||
|
Loading…
Reference in New Issue
Block a user