> For the complete documentation index, see [llms.txt](https://aatkit.gitbook.io/ios-integration/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://aatkit.gitbook.io/ios-integration/advanced/targeting/user-targeting.md).

# User Targeting

Pass user targeting information to ad requests

### General Information <a href="#general-information" id="general-information"></a>

Some networks support adding additional information to improve the ads for the current app context. In addition to [key-value targeting](/ios-integration/advanced/targeting/key-value-targeting.md), AATKit supports [user targeting](https://docs.gravite.net/aatkit/ios/docs/documentation/aatkit/aatusertargeting), allowing to pass information like:

* User ID
* Gender
* Year of birth
* List of keywords

{% hint style="info" %}
Setting the user targeting must be done after initializing AATKit.
{% endhint %}

#### Usage <a href="#usage" id="usage"></a>

{% tabs %}
{% tab title="Swift" %}

```swift
let userTargeting = AATUserTargeting(userId: "USER_ID", gender: .male, yearOfBirth: 1990, keywords: ["keyword1", "keyword2"])
AATSDK.setUserTargeting(userTargeting: userTargeting)
```

{% endtab %}

{% tab title="Objective-C" %}

```objectivec
AATUserTargeting *userTargeting = [[AATUserTargeting alloc] initWithUserId:@""
                                                                    gender:AATGenderMale
                                                               yearOfBirth:@1999
                                                                  keywords:@[@"keyword1", @"keyword2"]];
[AATSDK setUserTargetingWithUserTargeting:userTargeting];
```

{% endtab %}
{% endtabs %}

* The year of birth must be a 4-digit number
* Each field in `AATUserTargeting` is optional.
