Identifying Users
Genesis lets you link feature requests to users in your app so you can track who requested what.
Genesis.identify()
Section titled “Genesis.identify()”Call this method when you know who the logged-in user is:
Genesis.identify({ id: 'usr_12345', email: 'jane@example.com', name: 'Jane Smith'});All three fields are optional. You can call identify() at any time — before or after the widget loads. The identity is applied to all subsequent submissions.
In a single-page app
Section titled “In a single-page app”// After your auth flow resolvesasync function onLogin(user) { Genesis.identify({ id: user.id, email: user.email, name: user.displayName });}Via data attributes
Section titled “Via data attributes”For server-rendered pages where the user is known at page load:
<script src="https://widget.usegenesis.dev/genesis.js" data-key="YOUR_API_KEY" data-user-id="<%= current_user.id %>" data-user-email="<%= current_user.email %>" data-user-name="<%= current_user.name %>"></script>What gets stored
Section titled “What gets stored”| Field | Source | Stored As |
|---|---|---|
id | Your system’s user ID | submitter_id on the feature request |
email | User’s email | submitter_email — also pre-fills the email field |
name | User’s display name | submitter_name |
The submitter_id is indexed, so you can filter requests by user in the dashboard.