For the complete documentation index, see llms.txt. This page is also available as Markdown.

Identify users

Identify your users to better understand your dashboard data and prevent duplicate users.

At Jimo, we care for the privacy of your users. Therefore, it's not required to identify them before giving feedback. But from your side, this can be annoying to receive feedback from an anonymous user.

Jimo allows you to identify users by passing a unique identifier in order to:

  • Know who has interacted with experiences

  • Prevent duplicate users

  • Unlock segmentation, targeting, and content personalization based on your own user data

The identify command

To identify users, make sure to have the SDK installed on your web app, then use the following command:

window['jimo'].push(['do', 'identify', [userId]]);

Call it when the user authenticates (login), and on app load if a session is already active.

How commands are processed (command buffering)

The Jimo snippet creates a global command queue (window.jimo = []) before the script itself loads. You can push commands to this queue at any time, even before Jimo has finished initializing.

When the script initializes, it reads the queue and processes it in a fixed order:

  1. The identify command runs first and initializes the user profile.

  2. Every other queued command (set calls, etc.) is held back and executed once the profile is ready.

This guarantees that your user data is always attached to the right profile, in a predictable order, no matter when the script actually finishes loading.

Push your set commands first, and finish with the identify call:

Why this order works best:

  • identify triggers the authentication logic and initializes (or switches) the profile.

  • set commands are enrichment: they wait until the profile is initialized, then apply to it.

  • By pushing the set calls before identify, everything is already sitting in the buffer when the profile initializes. Nothing runs in parallel with the authentication, so every command is applied in order, to the right user.

The same pattern applies in a SPA or when Jimo is already loaded: queue the user data, then identify.

Legacy: the identify callback

Older integrations pass a callback as the second argument of identify and run their set calls inside it:

This pattern is still supported for backward compatibility, but it is no longer the recommended approach: the callback execution timing is not guaranteed in every situation, while buffered commands are always applied in a predictable order. For new integrations, use the set first, identify last pattern above.

If you use Identify Verification, the signed identifier stays in third position and the callback slot is simply set to null.

Avoid repeated identify calls

Calling identify with a different user ID triggers a full profile switch: the script re-initializes entirely for the new user. This is expected when a user logs out and another logs in, but you should not call identify repeatedly in your app flow.

  • Call identify once per session, typically at login.

  • To update user data afterwards, use set commands: they enrich the current profile without re-initializing anything.

Force Identify

If you want to guarantee that no anonymous user is ever created, enable the Force Identify option in Settings > Installation > Identification. Jimo will not initialize until an identify call is received; any command pushed in the meantime stays buffered and is applied automatically once ready. See Installation for details.

Examples

See below a screenshot of a profile without identification and one with an id (b7b8c565...) and a user name (Sam) pushed.

Without identify
With identify

Here is the code used to identify the profile:

Last updated