Ad targeting
Targeting enables passing user and context data to display more relevant ads. Below is an example using the current Yandex Mobile Ads SDK API.
For all ad formats, use AdRequest with optional AdTargeting.
Example of targeting (Dart)
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),
),
);
Pass adRequest to loadAd (or to the banner builder) as shown in the ad format guides.
|
Parameter |
Description |
|
|
User's age as a number (for example, |
|
|
Gender: |
|
|
User location determined by the app. Before using this feature, obtain user consent and call |
|
|
The user's search query in the app. |
|
|
The keywords from the page the user was viewing. |
Was the article helpful?
Previous
Next