Overview
Through targeting configuration, you can display customized ads to specific user groups. The Adrop SDK provides two targeting methods:- Audience Targeting: Displays ads based on user properties (attributes).
- Contextual Targeting: Displays ads based on content context (category, topic, etc.). Available in SDK 1.17.0 or later.
To collect targeting data, you must set properties before loading ads.
UID Setup (Optional)
Set a user identifier (UID) to share targeting data across platforms. UID is optional and is not required for property-based or event-based targeting.Usage
Parameters
When logging out, pass an empty string (
'') to reset the UID.Audience Targeting
Collect user property information to display ads to specific user groups.Setting Properties
Use theAdropMetrics.setProperty() method to collect user property information.
Parameters
Default Properties
The Adrop SDK provides default properties for targeting.Age (Birth Date)
When you pass birth date information, age is automatically calculated.Gender
Setting Age Directly
You can also set age directly instead of birth date.You only need to set either
BIRTH or AGE. If both are set, BIRTH takes precedence.Custom Properties
You can set custom properties that fit your service. Custom properties must be defined first in the Property menu of Ad Control Console.Contextual Targeting
Display ads based on content context (category, topic, etc.). PasscontextId when you create a banner or native ad. Available in SDK 1.17.0 or later.
First, create contextual targeting in the Ad Control console. See Creating Context Targeting.
Context targeting applies only to banner and native ad requests that include a Context ID (banner and native ads in the Android and iOS SDKs and in the Flutter and React Native SDKs 1.17.0 or later, the Web SDK, and the REST API). Interstitial, rewarded, popup, and splash ads, as well as Flutter and React Native SDKs earlier than 1.17.0, do not send a Context ID. If an ad product that contains these placements uses context targeting, campaigns that include context options are not shown in those placements, and context exclusions are not applied there.
Banner Ads
Native 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.
Event Tracking
You can send events to track user behavior.Sending Events
Parameters
You can set up to 20 parameters per event.
Retrieving Properties
You can retrieve all stored properties.Usage Examples
Setting Properties on Login
Resetting on Logout
Updating Properties
Best Practices
1. Set Properties Before Loading Ads
2. Update Properties When Changed
3. Reset Properties on Logout
Related Documentation
Create Audience Targeting
Create audience targeting in the console
Sell Targeting
Configure targeting category sales
Banner Ads
Implement banner ads
Native Ads
Implement native ads
FAQ
Will targeted ads not be displayed if I don't set UID?
Will targeted ads not be displayed if I don't set UID?
UID is optional. Property-based and event-based targeting work normally without setting UID. UID is used for sharing targeting data across platforms.
I set properties but don't see data in the console.
I set properties but don't see data in the console.
Property data is reflected in the console within 24 hours after collection. If data is not showing:
- Check that the property is correctly defined in the console.
- Verify that the property key passed in the SDK exactly matches the console (case-sensitive).
- Confirm that
AdropMetrics.setProperty()is called before ad loading.
How do I delete property values?
How do I delete property values?
Pass
null to the property value to delete that property:Are there type restrictions for property values?
Are there type restrictions for property values?
Supported types are
String, int, double, and bool. Arrays and complex objects are not supported. Convert to string if needed.