Overview
Through targeting settings, you can display customized ads to specific user groups. The Adrop SDK provides two targeting methods:- Audience Targeting: Display ads based on user properties.
- Context Targeting: Display ads based on content context (category, topic, etc.).
To collect targeting data, UID and properties must be set before loading ads.
UID Setting
Set a user identifier (UID) to distinguish users. UID is the foundation for targeted advertising.Usage
Parameters
| Parameter | Type | Description |
|---|---|---|
uid | String | User unique identifier (e.g., service member ID) |
Pass an empty string (
"") on logout 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
| Parameter | Type | Description |
|---|---|---|
key | String | Property key (max 64 characters) |
value | Any? | Property value (String, Int, Double, Long, Boolean, null) |
Default Properties
The Adrop SDK provides default properties for targeting. Use theAdropKey and AdropValue classes to set values.
Age (Birthday)
When birthday information is provided, age is automatically calculated.| Constant | Value | Description |
|---|---|---|
AdropValue.AdropBirth.formatYear | "yyyy" | Year only (e.g., “1990”) |
AdropValue.AdropBirth.formatYearMonth | "yyyyMM" | Year and month (e.g., “199003”) |
AdropValue.AdropBirth.formatYearMonthDay | "yyyyMMdd" | Year, month, and day (e.g., “19900315”) |
Gender
| Constant | Value | Description |
|---|---|---|
AdropValue.AdropGender.MALE | "M" | Male |
AdropValue.AdropGender.FEMALE | "F" | Female |
AdropValue.AdropGender.OTHER | "O" | Other |
AdropValue.UNKNOWN | "U" | Unknown |
Setting Age Directly
You can also set age directly instead of birthday.You only need to set either
BIRTH or AGE. If both are set, BIRTH takes precedence.Custom Properties
You can set custom properties for your service. Custom properties must first be defined in the Targeting menu of the Adrop console.Property Usage Example
Example of updating properties when a user enters a specific screen in the app.Context Targeting
Display ads based on content context (category, topic, etc.). Use thecontextId property in banner ads and native ads.
Banner Ads
Setting in XML
Setting in Code
Native Ads
Native ads can setcontextId in the constructor.
Context ID Usage Example
Example of displaying ads based on article category in a news app.Context ID must match the context targeting category defined in the console.
Best Practices
1. Set UID Before Loading Ads
2. Use Meaningful Context IDs
3. Update Properties Whenever They Change
4. Reset UID on Logout
Related Documentation
Create Audience Targeting
Create audience targeting in console
Create Context Targeting
Create context targeting in console
Sell Targeting
Set up targeting category sales
Banner Ads
Implement banner ads
Native Ads
Implement native ads
Reference
Classes, listeners, error codes
FAQ
Will targeted ads not be displayed if UID is not set?
Will targeted ads not be displayed if UID is not set?
Ads will still be displayed even without setting UID, but audience targeting won’t be applied. Only basic targeting (country, language, etc.) will be used. Setting UID is essential for sophisticated targeting.
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 up to 24 hours after collection. If data is not displayed:
- Verify that properties are correctly defined in the console.
- Verify that property keys passed from SDK exactly match the console (case-sensitive).
- Verify that
AdropMetrics.setProperty()is called before loading ads.
What format should Context ID be in?
What format should Context ID be in?
Context ID should be a meaningful string representing the content context. For example:
- News app:
"article_sports","article_tech","article_entertainment" - Shopping app:
"category_fashion","category_electronics" - Video app:
"video_drama","video_comedy"
Can I set array type properties?
Can I set array type properties?
Yes, string arrays, numeric arrays, and boolean arrays are all supported. For example, you can pass user interests as an array:
How do I delete a property value?
How do I delete a property value?
Pass
null to the property value to delete that property: