Merge branch 'heatmaps' into dev

# Conflicts:
#	db/clickhouse/schema.sql
This commit is contained in:
Mike Cao committed 2026-05-07 14:49:21 -07:00
commit 9b18511af0
23 files changed
+1702 -10

No files matched your search

+6
View File
@@ -119,6 +119,11 @@ export const EVENT_TYPE = {
performance: 5,
} as const;
export const HEATMAP_EVENT_TYPE = {
click: 1,
scroll: 2,
} as const;
export const ENTITY_TYPE = {
website: 1,
link: 2,
@@ -271,6 +276,7 @@ export const BROWSERS = {
aol: 'AOL',
bb10: 'BlackBerry 10',
beaker: 'Beaker',
browser: 'Unknown',
chrome: 'Chrome',
'chromium-webview': 'Chrome (webview)',
crios: 'Chrome (iOS)',
+18 -7
View File
@@ -131,6 +131,7 @@ export const reportTypeParam = z.enum([
'breakdown',
'funnel',
'goal',
'heatmap',
'journey',
'performance',
'retention',
@@ -159,13 +160,12 @@ export const operatorParam = z.enum([
export const goalReportSchema = z.object({
type: z.literal('goal'),
parameters: z
.object({
startDate: z.coerce.date(),
endDate: z.coerce.date(),
type: z.string(),
value: z.string(),
}),
parameters: z.object({
startDate: z.coerce.date(),
endDate: z.coerce.date(),
type: z.string(),
value: z.string(),
}),
});
export const funnelReportSchema = z.object({
@@ -268,6 +268,16 @@ export const breakdownReportSchema = z.object({
}),
});
export const heatmapReportSchema = z.object({
type: z.literal('heatmap'),
parameters: z.object({
startDate: z.coerce.date(),
endDate: z.coerce.date(),
urlPath: z.string().max(500).optional(),
mode: z.enum(['click', 'scroll']).optional(),
}),
});
export const reportBaseSchema = z.object({
websiteId: z.uuid(),
type: reportTypeParam,
@@ -286,6 +296,7 @@ export const reportTypeSchema = z.discriminatedUnion('type', [
revenueReportSchema,
attributionReportSchema,
breakdownReportSchema,
heatmapReportSchema,
]);
export const reportSchema = reportBaseSchema;