---
title: "Unity SDK: User identity"
description: "Identify customers and attach user information with the Gleap Unity SDK. Follow the integration code examples."
url: https://docs.gleap.ai/en/articles/665-unity-sdk-user-identity
collection: "Unity (Beta)"
updated: 2026-11-01
language: en
---

# Unity SDK: User identity

Identify customers and attach user information with the Gleap Unity SDK. Follow the integration code examples.

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

To effectively manage your contacts, we advise using `Gleap.IdentifyContactAsync()` each time a user signs in or registers. This practice ensures accurate identification of your contacts from the outset. 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 using `Gleap.UpdateContactAsync()` for seamless real-time updates.

Identify your user by calling the following method (`GleapUserProperty` lives in `GleapSDK.Models`).

```csharp
await Gleap.IdentifyContactAsync(
    "12345",
    new GleapUserProperty
    {
        Name = "Franz",
        Email = "franz@gleap.ai",
        Phone = "+1 (902) 123123",
        CompanyName = "ACME inc.",
        CompanyId = "19283",
        Plan = "Pro plan",
        Avatar = "https://.../avatar.png",
        Value = 199.95,
        CustomData = new Dictionary<string, object>
        {
            ["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 35 custom data keys with an identify call.
>
> We currently only allow JSON strings, numbers and boolean values as custom data.

> **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

> **Tip:** To also prove the user's email, pass a [signed identity token](https://gleap-developer-docs.gleap.help/en/articles/709-enforce-identity-verification#signed-identity-token-proves-the-email-too) in place of the user hash. Gleap can then [merge earlier conversations](https://gleap-developer-docs.gleap.help/en/articles/709-enforce-identity-verification#merge-contacts) with that email into the user.

Enforce identity verification to prevent third parties from impersonating logged-in users. [Learn how to generate the user hash](https://gleap-developer-docs.gleap.help/en/articles/709-enforce-identity-verification)

```csharp
await Gleap.IdentifyContactAsync(
    "12345",
    new GleapUserProperty
    {
        Name = "Franz",
        Email = "franz@gleap.ai",
    },
    userHash: "GENERATED_USER_HASH");
```

### Update contact properties

The `UpdateContactAsync` method takes the same contact parameters as identify. Partial updates are possible.

```csharp
await Gleap.UpdateContactAsync(
    new GleapUserProperty
    {
        Plan = "Pro plan",
        Value = 199.95,
    });
```

### Clear the identity on logout

We recommend clearing the identity once the user logs out. Clearing the identity automatically detaches the current session and creates a new guest session.

```csharp
await Gleap.ClearIdentityAsync();
```

### Get the identification status of a user

```csharp
Gleap.IsUserIdentified();
```

### Get the current user identity

```csharp
Gleap.GetIdentity();
```

## Related

- [Unity SDK setup](https://docs.gleap.ai/en/articles/664-unity-sdk-setup.md)
- [Unity SDK: Track events](https://docs.gleap.ai/en/articles/666-unity-sdk-track-events.md)
- [Unity SDK: Track pages](https://docs.gleap.ai/en/articles/667-unity-sdk-track-pages.md)
- [Unity SDK: Forms](https://docs.gleap.ai/en/articles/668-unity-sdk-forms.md)
- [Unity SDK: Frontend tools](https://docs.gleap.ai/en/articles/669-unity-sdk-frontend-tools.md)
