---
metadata:
  - name: generator
    content: Diplodoc Platform v5.57.3
alternate:
  - https://boost.yandex.ru/doc/en/ad-monetization/dev/react-native/target.md
  - https://boost.yandex.ru/doc/ru/ad-monetization/dev/react-native/target.md
  - href: en/ad-monetization/dev/react-native/target.md
    type: text/markdown
    title: Markdown version
  - href: llms.txt
    type: text/markdown
    title: llms.txt
---
> **Documentation Index:** Fetch the complete configuration index at https://boost.yandex.ru/doc/en/llms.txt

# Ad targeting

You can use the Yandex Mobile Ads SDK API to add extra user information. Adding context data to the request can significantly enhance the quality of advertising and increase your revenue.

## Set up targeting {#setup}

To pass extra details about users, specify `AdTargeting` in `AdRequest`.

You can provide the following user information:

#|
|| **Parameter** | **Description** || 
|| `age` | The user's age in string format, for example: `"14"`, `"18"`. ||
|| `contextQuery` | The user's search query in the app. 

For instance, if the user searched for a car, this parameter might look like this: `"Buy a used car in Moscow"`. ||
|| `contextTags` | The keywords from the page the user was viewing. These can be the page's title, parts of its content, tags, and other elements. 

For a page with a car search, this parameter might look like: `"Buy a car"`, `"used car"`, `"in Moscow"`. ||
|| `gender` | User's gender: accepts values from the `Gender` enumeration. Acceptable values: `Gender.Male`, `Gender.Female`. ||
|| `location` | User location represented by an instance of the `Location` class, which contains latitude and longitude values. For example: `new Location(55.734202, 37.588063)`. ||
|#

## Examples of targeting {#examples}

#### Adaptive inline and sticky banners

```ts
let adRequest = new AdRequest({
    age: '20',
    contextQuery: 'context-query',
    contextTags: ['context-tag'],
    gender: Gender.Male,
    location: new Location(55.734202, 37.588063)
});
```

##### Interstitial ads, rewarded ads, and app open ads

```ts
let adRequest = new AdRequest({
    adUnitId: 'your_block_id',
    age: '20',
    contextQuery: 'context-query',
    contextTags: ['context-tag'],
    gender: Gender.Female,
    location: new Location(55.734202, 37.588063)
});
```
