Skip to main content

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.
  • Contextual 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

UID is hashed with SHA-256 before transmission. Do not pass personal information (email, phone number, etc.) directly.

Audience Targeting

Collect user property information to display ads to specific user groups.

Setting Properties

Use the AdropMetrics.setProperty() method to collect user property information.

Parameters

  • Property key is limited to 64 characters maximum.
  • String values are limited to 256 characters maximum.
  • Numeric values are limited to 9007199254740991 maximum.
  • Up to 256 properties can be set.

Default Properties

The Adrop SDK provides default properties for targeting. Use the AdropKey and AdropValue classes to set values.

Age (Birthday)

When birthday information is provided, age is automatically calculated.
Date Format Constants

Gender

Gender Value Constants

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.
Custom property names must exactly match the names defined in the console. Case-sensitive.

Property Usage Example

Example of updating properties when a user enters a specific screen in the app.

Contextual Targeting

Display ads based on content context (category, topic, etc.). Use the contextId property in banner ads and native ads.

Setting in XML

Setting in Code

Native Ads

Native ads can set contextId 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.

Event Tracking

Track user behavior events to build audiences based on user actions. Use AdropMetrics.sendEvent() to send events.
logEvent() is deprecated. Use sendEvent() instead.

Sending Events

Multi-Item Events

For events that involve multiple items (e.g., purchase, begin_checkout), use putItems() to attach an item list.

Supported Event Examples

  • Event name must be 1–64 characters.
  • Parameter key must be 1–64 characters.
  • String parameter values are limited to 1024 characters.
  • Duplicate events with the same name and parameters are throttled within a 500ms window.

Best Practices

1. Set UID Before Loading Ads

2. Use Meaningful Context IDs

3. Update Properties Whenever They Change


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

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.
Property data is reflected in the console within up to 24 hours after collection. If data is not displayed:
  1. Verify that properties are correctly defined in the console.
  2. Verify that property keys passed from SDK exactly match the console (case-sensitive).
  3. Verify that AdropMetrics.setProperty() is called before loading ads.
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"
Set it to match the context targeting category defined in the console.
No, array values are not directly supported. setProperty accepts String, Int, Double, Long, Boolean, and null values only. To store multiple values, use a JSON string:
Pass null to the property value to delete that property: