> ## Documentation Index
> Fetch the complete documentation index at: https://docs.encorekit.com/llms.txt
> Use this file to discover all available pages before exploring further.

# UserAttributes

> The player attributes Encore uses to pick offers, passed when you identify the player or later.

Every field is optional and defaults to null, and an object with no fields set changes nothing. To set the language, call [`SetLanguage()`](https://docs.encorekit.com/publishers/unity/sdk-reference/set-language). `DateOfBirth` is used on the device to work out `Age`, and the date is never sent.

> [!WARNING]
>
> Only pass what you have a lawful basis to share, such as the player's consent. A player under 18 is still served offers, from age-appropriate inventory only and with no per-user personalization. Encore's servers do this filtering, so your game doesn't filter offers itself. See [Sending an age](https://docs.encorekit.com/publishers/offers-api/reference/user-attributes.md#sending-an-age).

## Structure

```csharp theme={null}
public sealed class UserAttributes
{
    public string Email;
    public string FirstName;
    public string LastName;
    public string PhoneNumber;
    public string PostalCode;
    public string City;
    public string State;
    public string CountryCode;        // ISO country code, such as "US"
    public string Latitude;
    public string Longitude;
    public int? Age;                  // whole years, 0 to 120
    public string DateOfBirth;        // "YYYY-MM-DD" or an ISO 8601 date-time with a zone; used on the device to work out Age, never sent
    public string Gender;
    public string SubscriptionTier;
    public string MonthsSubscribed;
    public string BillingCycle;
    public string LastPaymentAmount;
    public string LastActiveDate;
    public string TotalSessions;
    public Dictionary<string, string> Custom = new Dictionary<string, string>(); // your own keys
}
```

## Field reference

| Field | Type | Description |
| - | - | - |
| `Email`, `FirstName`, `LastName`, `PhoneNumber` | `string` | The player's contact details |
| `PostalCode`, `City`, `State` | `string` | The player's address |
| `CountryCode` | `string` | ISO 3166-1 alpha-2 country code, such as `US` |
| `Latitude`, `Longitude` | `string` | Decimal degrees, such as `37.7749` |
| `Age` | `int?` | Whole years, 0 to 120. Any other value is dropped with a warning. If you hold only a range, pass its lowest end. A player under 18 is served age-appropriate offers with no per-user personalization. Sent only in the launch you set it (on WebGL, the page load) and not saved, so pass `DateOfBirth`, or set `Age` on every launch |
| `DateOfBirth` | `string` | `YYYY-MM-DD`, or an ISO 8601 date-time with a zone. Anything else is dropped with a warning. Used on the device to work out `Age`, and the date is never sent. With `Age` set too, the lower age is sent |
| `Gender` | `string` | The player's gender. Accepted only from a game rated 18+ in its store listing |
| `SubscriptionTier`, `MonthsSubscribed`, `BillingCycle`, `LastPaymentAmount` | `string` | The player's plan in your game, such as `pro` and `monthly` |
| `LastActiveDate` | `string` | ISO 8601, such as `2026-01-15T10:30:00Z` |
| `TotalSessions` | `string` | How many sessions the player has had |
| `Custom` | `Dictionary<string, string>` | Your own keys, for attributes no other field covers |

## Example

```csharp theme={null}
Encore.Identify(playerId, new UserAttributes
{
    CountryCode = "US",
    Age = 29,
    Custom = { ["favorite_mode"] = "arcade" },
});
```

Used by [`Identify()`](https://docs.encorekit.com/publishers/unity/sdk-reference/identify) and [`SetUserAttributes()`](https://docs.encorekit.com/publishers/unity/sdk-reference/set-user-attributes).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.