Skip to main content

🔐 User identity

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 email & name.

Identify your users

Tags: ReactNative

To effectively manage your contacts, we advise using Gleap.identify() each time a user signs in or registers. This practice ensures accurate identification of your contacts from the outset. Additionally, for scenarios where contact information needs to be updated during active usage – such as when a user subscribes to a new plan or modifies their existing data – we recommend utilizing Gleap.updateContact(). This method allows for seamless real-time updates to contact details.

Identify your user by calling the following method.

Gleap.identify("12334", {
name: "Franzi",
email: "[email protected]",
phone: "+1 (902) 123123",
plan: "Pro plan",
companyName: "ACME inc.",
companyId: "19382",
value: 199.95,
customData: {
key1: "Test",
key2: "ACME",
},
});
info

When transmitting custom data, only primitive numeric and string values are supported for later use in segment filters. Please note that you can send only 15 custom data keys with an identify call.

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 are 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.identifyWithUserHash(
"12334",
{
name: "Franz",
email: "[email protected]",
phone: "+1 (902) 123123",
plan: "Pro plan",
companyName: "ACME inc.",
companyId: "19382",
value: 199.95,
customData: {
key1: "Test",
key2: "ACME",
},
},
"GENERATED_USER_HASH"
);

Click here to learn how to generate the user hash.

Update contact properties

To effectively manage your contacts, we advise using Gleap.identify() each time a user signs in or registers. This practice ensures accurate identification of your contacts from the outset. Additionally, for scenarios where contact information needs to be updated during active usage – such as when a user subscribes to a new plan or modifies their existing data – we recommend utilizing Gleap.updateContact(). This method allows for seamless real-time updates to contact details.

Gleap.updateContact({
value: 199.95,
plan: "Pro plan",
});

The updateContact method takes in the same contact parameters as the identify method. Partial updates are possible.

Gleap.updateContact({
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,
},
});

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.

const isIdentified = await Gleap.isUserIdentified();

Get the current user identity

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

const identity = await Gleap.getIdentity();