Skip to content

Send name and email with the user_created event - #491

Merged
tnkuehne merged 2 commits into
mainfrom
user-created-person-properties
Nov 29, 2026
Merged

tnkuehne merged 2 commits into
mainfrom
user-created-person-properties

Conversation

@tnkuehne

@tnkuehne tnkuehne commented Nov 29, 2026 •

Copy link
Copy Markdown
Contributor

The browser identifies a new user with name and email only after sign-up. The server's user_created event therefore reached PostHog before the person profile had either, so:

  • PostHog destinations triggered by user_created (for example a chat message using {person.name}) showed the user:<id> distinct ID instead of the name.
  • Test-account filters on person.properties.email did not match user_created, so internal sign-ups were not filtered.

ObservationEvent gets an optional person with name and email, which product analytics sends as $set with the event. PostHog applies an event's own $set to the person properties that destinations and filters read for that event. Both user creation paths (Better Auth sign-up and installation owner setup) fill it; other events are unchanged.

With product analytics configured, the server now sends the new user's name and email at account creation. This includes users who never open the control plane in a browser, such as an installation owner created by the initialization command from a bootstrap file; before, only browser identification sent these fields.

Validation: pnpm check and the analytics, observation and email-setup tests pass locally.

The browser identifies a new user only after sign-up, so the user_created
event reached the person profile before it had a name or email. PostHog
destinations triggered by the event showed the distinct ID instead of the
name, and test-account filters on email did not match.
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Nov 29, 2026 •

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
✅ Deployment successful!
View logs
widefleet-docs d821d38 Nov 29 2026, 12:33 PM

@tnkuehne
tnkuehne merged commit 287a4a2 into main Nov 29, 2026
26 of 28 checks passed
@tnkuehne
tnkuehne deleted the user-created-person-properties branch November 29, 2026 15:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant