Compare commits

...

4 Commits

Author SHA1 Message Date
Steven Tran
e1774c6b48 using james approach of setting it on the indentify call 2026-06-01 19:11:33 -07:00
Steven Tran
c9b6cc9323 test(telemetry): assert people.set_once is called and remove expectation 2026-06-01 14:41:09 -07:00
Steven Tran
29b2a209d9 telemetry: set first_auth_at via PostHog people API and disable telemetry during E2E 2026-06-01 13:51:56 -07:00
Nav Singh
71e5276c8e fix(telemetry): set first_auth_at person property via $set_once on auth
Closes MAR-172.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-26 21:14:57 -07:00
2 changed files with 10 additions and 2 deletions

View File

@@ -137,7 +137,13 @@ describe('PostHogTelemetryProvider', () => {
const callback = hoisted.mockOnUserResolved.mock.calls[0][0]
callback({ id: 'user-123' })
expect(hoisted.mockIdentify).toHaveBeenCalledWith('user-123')
expect(hoisted.mockIdentify).toHaveBeenCalledWith(
'user-123',
undefined,
expect.objectContaining({
first_auth_at: expect.any(String)
})
)
})
})

View File

@@ -121,7 +121,9 @@ export class PostHogTelemetryProvider implements TelemetryProvider {
useCurrentUser().onUserResolved((user) => {
if (this.posthog && user.id) {
this.posthog.identify(user.id)
this.posthog.identify(user.id, undefined, {
first_auth_at: new Date().toISOString()
})
this.setSubscriptionProperties()
}
})