Identify Users

Link Beacon sessions to your logged-in users.

By default, Beacon treats every visitor as anonymous. Calling identify upgrades the session to a known contact so Rian and your agents can see who they're talking to and reference past conversations.

When to call identify

Call it immediately after a user logs in — before they might open the widget.

Script tag

window.Beacon.identify({
  name: user.name,
  email: user.email,
  phone: user.phone,         // optional
  external_id: user.id       // your internal user ID — strongly recommended
});

React

Pass the identity prop to BeaconWidget:

<BeaconWidget
  workspaceId="YOUR_WORKSPACE_ID"
  identity={{
    name: user.name,
    email: user.email,
    external_id: user.id
  }}
/>

Or call it imperatively via the hook:

const beacon = useBeacon({ workspaceId: 'YOUR_WORKSPACE_ID' });
 
// After login:
beacon.identify({ name: user.name, email: user.email, external_id: user.id });

Angular

Pass identity to BeaconService.boot():

this.beacon.boot({
  workspaceId: 'YOUR_WORKSPACE_ID',
  identity: { name: user.name, email: user.email, external_id: user.id }
});

On logout

Call shutdown() to clear the session so the next visitor starts fresh:

window.Beacon.shutdown();
// React hook: beacon.shutdown()

Identity fields

FieldTypeNotes
namestringDisplay name shown to agents
emailstringUsed to match existing contacts
phonestringOptional
external_idstringYour internal user ID; used to link conversations across sessions

On this page