Skip to main content

🔐 User identity

Tags: JavaScript, React, Vue, Angular, Website, Web App

The Gleap Identify call lets you tie a user to their feedback items. It includes a unique User ID and optional meta information such as their email and name.

Identify your users​

Identify your user by calling the following method. Usually you would do so after the login process of your app.

Gleap.identify("19283", {
name: "Franz",
email: "[email protected]",
phone: "+1 (902) 123123",
value: 199.95,
plan: "Pro plan",
companyId: "12398958484",
companyName: "ACME inc.",
customData: {
key1: "awesome",
key2: true,
},
});
info

When transmitting custom data, only primitive numeric and string values are supported for later use in segment filters.

info

Gleap defaults to guest sessions when feedback items get reported without calling the identify method first. All feedback items of an existing guest session will be merged with the user session once you've identified it.

Enforce identity verification​

Enforce identity verification to prevent third parties from impersonating logged-in users. Get started here.

Gleap.identify(
"19283",
{
name: "Franz",
email: "[email protected]",
phone: "+1 (902) 123123",
value: 199.95,
plan: "Pro plan",
companyId: "12398958484",
companyName: "ACME inc.",
customData: {
key1: "awesome",
key2: true,
},
},
"GENERATED_USER_HASH"
);

Click here to learn how to generate the user hash.

Clear the identity on logout​

We recommend to clear the identity once the user logs out. Clearing the identity will automatically detach the current session and create a new guest session.

Gleap.clearIdentity();

Get the identification status of a user​

With the following method, you can get the status of the current user identity.

Gleap.isUserIdentified();

Get the current user identity​

With the following method, you can get the current user identity.

Gleap.getIdentity();