Appearance
Identifying users
When you install Capture on your application, you can identify which of your users reported each bug. This adds valuable context to bug reports - you'll see exactly who encountered the issue, making it easier to debug or reach out for more information.
Use the identify API to link bug reports to specific users in your application. The user's details will appear in the Capture dashboard and in any reports published to your integrations.
How to identify users
Call the identify method after initializing the Capture widget to associate the current session with a user:
js
Capture.identify({
identifier: "user-12345",
name: "John Smith",
email: "john.smith@mycompany.com",
avatarUrl: "https://cdn.myapp.com/images/avatar.jpeg",
});Any bug reports created after calling identify will be linked to that user.
Best practice: Call identify on page load as soon as user authentication information is available. This ensures all bug reports from that session are properly attributed.
Removing user identity
To clear a user's identity (for example, when they log out), pass null to Capture.identify:
js
Capture.identify(null);Future bug reports will no longer be associated with that user until identify is called again.
Identity fields
- identifier (required) – A unique value that identifies this user in your application. This could be a user ID, email address, or any other consistent identifier. Use the same identifier for the same user across sessions and page loads - this allows Capture to group all reports from a single user.
- name (optional) – The user's display name, shown in bug reports to help identify who reported the issue.
- email (optional) – Included in bug reports to make it easier to reach out to the user if needed.
- avatarUrl (optional) – A URL to the user's profile image. This image will appear in the Capture dashboard and bug reports.
Note: If you pass an invalid object to identify, bug reports will fail to send. Make sure the identifier field is always present.
Updating user information
You can call identify multiple times in a session - the most recent call takes precedence. If a user's information changes (like updating their name or avatar), simply call identify again with the updated details.
When a user creates a bug report, Capture uses their current identity information. As long as the identifier stays the same, historical reports will still be grouped together under that user.
Next steps
Want to include additional context beyond user identity? Learn how to add custom context to capture application state, feature flags, or other metadata specific to your app.