Repository navigation
Identify signed-in visitors on pages outside a workspace - #391
Merged
Merged
Conversation
The browser linked its anonymous visit to the account only on workspace pages. A person who signed in and stopped on the organization chooser or the CLI approval page stayed a separate anonymous person in product analytics. The root layout now passes the signed-in user, so every signed-in page identifies the person. Workspace pages still add the organization group and role.
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
widefleet-docs | 6f3778a | Nov 25 2026, 01:12 PM |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The browser linked its anonymous visit to the account only on workspace pages (
updateClientContextreturned beforeidentifywithout an organization). A person who signed in and stopped on a signed-in page outside a workspace, such as the organization chooser (/organizations) or the CLI approval page (/device), was never identified. Their visit stayed a separate anonymous person, so product analytics counted one signed-in person twice and could not attribute the visit to the account.Change
id,name,email) when analytics is configured.updateClientContext, so every signed-in page callsidentify.updateClientContextidentifies as soon as a user is known and adds the organization group and role only when an organization is present. Workspace pages behave as before.Email-code sign-in navigates with
invalidateAll, so the root layout load reruns and the first signed-in page already identifies. Social and company sign-in return through a full page load. Sign-out still resets the client before the next anonymous page.Verification
pnpm checktests/analytics-client.test.tscovers identification without an organization, without a group or role registration.

Confidence Score: 5/5
The PR appears safe to merge.Summary
Links signed-in visits to an account before the user enters a workspace.
No actionable issues found. Tests were not run during this review.
Reviews (1) · Last reviewed commit: "Identify signed-in visitors on pages out..." · Reviewed by Greptile