Skip to content

Commit 7e16879

Browse files
committed
fix: allow tracking on development, fix port
1 parent 10e44ae commit 7e16879

File tree

2 files changed

+9
-6
lines changed

2 files changed

+9
-6
lines changed

apps/dashboard/app/layout.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ export default function RootLayout({
117117
>
118118
<Databuddy
119119
apiUrl={
120-
isLocalhost ? 'http://localhost:4001' : 'https://basket.databuddy.cc'
120+
isLocalhost ? 'http://localhost:4000' : 'https://basket.databuddy.cc'
121121
}
122122
clientId={
123123
isLocalhost

packages/validation/src/schemas/analytics.ts

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -61,11 +61,14 @@ export const analyticsEventSchema = z.object({
6161
sessionId: z.string().nullable().optional(),
6262
timestamp: timestampSchema,
6363
sessionStartTime: timestampSchema,
64-
referrer: z
65-
.union([
66-
z.url({ protocol: /^https?$/, hostname: z.regexes.domain }),
67-
z.literal('direct'),
68-
])
64+
referrer: (process.env.NODE_ENV === 'development'
65+
? z.any()
66+
: z
67+
.union([
68+
z.url({ protocol: /^https?$/, hostname: z.regexes.domain }),
69+
z.literal('direct'),
70+
])
71+
)
6972
.nullable()
7073
.optional(),
7174
path: z.union([

0 commit comments

Comments
 (0)