Fix boolean event data.
This commit is contained in:
@@ -30,6 +30,8 @@ export function TestConsole() {
|
||||
window.umami.track('track-event-with-data', {
|
||||
data: {
|
||||
test: 'test-data',
|
||||
boolean: true,
|
||||
booleanError: 'true',
|
||||
time: new Date(),
|
||||
number: 1,
|
||||
time2: new Date().toISOString(),
|
||||
|
||||
@@ -49,6 +49,7 @@ function createKey(key, value, acc: { keyValues: any[]; parentKey: string }) {
|
||||
break;
|
||||
case 'boolean':
|
||||
eventDataType = EVENT_DATA_TYPE.boolean;
|
||||
value = value ? 'true' : 'false';
|
||||
break;
|
||||
case 'date':
|
||||
eventDataType = EVENT_DATA_TYPE.date;
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
import prisma from 'lib/prisma';
|
||||
import clickhouse from 'lib/clickhouse';
|
||||
import { runQuery, CLICKHOUSE, PRISMA } from 'lib/db';
|
||||
import { EVENT_TYPE } from 'lib/constants';
|
||||
import { CLICKHOUSE, PRISMA, runQuery } from 'lib/db';
|
||||
import prisma from 'lib/prisma';
|
||||
|
||||
export function getEvents(...args: [websiteId: string, startAt: Date, eventType: number]) {
|
||||
return runQuery({
|
||||
|
||||
Reference in New Issue
Block a user