Skip to content

feat(tracking): add user identification methods and enhance event tra… #310

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
May 24, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
fix(tracking): remove redundant comment on user_id field in tracking …
…payload schema
  • Loading branch information
goldflag committed May 24, 2025
commit 68b4afa47cae596bdeb88ba0f30db1dd3701233d
4 changes: 2 additions & 2 deletions server/src/tracker/trackEvent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export const trackingPayloadSchema = z.discriminatedUnion("type", [
referrer: z.string().max(2048).optional(),
event_name: z.string().max(256).optional(),
properties: z.string().max(2048).optional(),
user_id: z.string().max(255).optional(), // Add custom user ID field
user_id: z.string().max(255).optional(),
}),
z.object({
type: z.literal("custom_event"),
Expand Down Expand Up @@ -60,7 +60,7 @@ export const trackingPayloadSchema = z.discriminatedUnion("type", [
{ message: "Properties must be a valid JSON string" }
)
.optional(), // Optional but must be valid JSON if present
user_id: z.string().max(255).optional(), // Add custom user ID field
user_id: z.string().max(255).optional(),
}),
]);

Expand Down