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
You can pass user information in the ad request:
For all ad formats, use the AdRequest class with AdTargeting.
You can provide the following user information:
|
Parameter |
Description |
|
|
User's age: a number (for example, |
|
|
User's gender. Possible values: |
|
|
The user's location as detected by your app, passed using the To use location data, you must obtain the user's consent and then set |
|
|
User's search query in the app. For instance, if the user searched for a car, this parameter might look like this: |
|
|
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 |
Targeting examples
var adRequest = AdRequest(
adUnitId: 'your_block_id',
targeting: AdTargeting(
age: 20,
contextQuery: 'context-query',
contextTags: ['context-tag'],
gender: 'female',
location: const AdLocation(latitude: 55.734202, longitude: 37.588063, accuracy: 0.1),
),
);