Audience Targeting
You can target ads based on user properties.1. Create Targeting
First, create audience targeting in Ad Control Console.Create Targeting
Check how to create audience targeting in the console
2. Set User ID
You must setappKey and uid before rendering ads.
Complete the setup before entering the ad placement for targeted ads to work properly.
3. Set User Properties
Setting user properties enables more sophisticated targeting.Built-in Properties
App Properties
Device Properties (Auto-collected)
The SDK automatically collects the following device properties. You do not need to set these manually.Custom Properties
You can set additional properties registered in the console. Values must match the type defined in Ad Control Console. Property names must be 3–64 characters long and use only lowercase letters, numbers, and underscores (_). See Property Naming Rules.Contextual Targeting
You can target ads based on page or content context.1. Create Targeting
First, create contextual targeting in Ad Control Console.Create Contextual Targeting
Check how to create contextual targeting in the console
2. Set Value on Ad Placement
Pass the Context ID configured in the console when requesting ads.- Context IDs are case-sensitive and must exactly match a value entered in a context targeting option’s condition in the console.
- Do not use commas (,) in Context IDs, because a comma separates multiple values both in the console and in an ad request. When requesting ads, pass the value exactly as entered in the console, without leading or trailing spaces.
- To match more than one context in a single request, pass a comma-separated value such as
hiking,outdoor. The first 5 IDs are used, and exclusion takes precedence over inclusion. See Passing Multiple Context IDs. - If you don’t pass a Context ID, or pass a value that isn’t registered in the console, no error occurs. Only campaigns with context targeting are excluded, and other ads can still be served.
Data Attributes Method
renderAd Method
Dynamic Context Setting
You can set context dynamically based on page or content.Related Documentation
Reference > AdropConfig
Initialization option definitions
Reference > AdropAdRequest
Ad request parameter definitions