Skip to main content

Overview

Targeting settings allow you to show personalized ads to specific user groups. The Adrop SDK provides audience targeting.
  • Audience Targeting: Display ads based on user attributes (properties).
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

import { Adrop } from 'adrop-ads-react-native'

// After user login (optional)
Adrop.setUID("user_123")

// On user logout
Adrop.setUID("")

Parameters

ParameterTypeDescription
uidstringUnique user identifier (e.g., service member ID)
UID is transmitted hashed with SHA-256. Do not pass personal information (email, phone number, etc.) directly.
Pass an empty string ("") on logout to reset the UID.

Audience Targeting

Collect user attribute information (properties) to show ads to specific user groups.

Setting Properties

Use the AdropMetrics.setProperty() method to collect user attribute information.
import { AdropMetrics } from 'adrop-ads-react-native'

// String property
AdropMetrics.setProperty("membership_level", "premium")

// Number property
AdropMetrics.setProperty("booking_count", 15)

// Boolean property
AdropMetrics.setProperty("is_subscriber", true)

// Pass null (remove property)
AdropMetrics.setProperty("membership_level", null)

Retrieving Properties

Use AdropMetrics.properties() to retrieve all currently set properties.
import { AdropMetrics } from 'adrop-ads-react-native'

const currentProperties = await AdropMetrics.properties()
console.log(currentProperties)
// { membership_level: "premium", booking_count: 15, ... }
properties()
() => Promise<Record<string, any>>
Returns all currently set properties as a key-value object. Returns an empty object if no properties are set.

Parameters

ParameterTypeDescription
keystringProperty key (max 64 characters)
valueanyProperty value (string, number, boolean, null)
  • Property keys can be up to 64 characters.
  • String values can be up to 256 characters.
  • Number values can be up to 9007199254740991.
  • A maximum of 256 properties can be set.

Built-in Properties

The Adrop SDK provides built-in properties for targeting. Use AdropProperties and AdropGender enums to set values.

Age (Birthday)

When you pass birthday information, age is automatically calculated.
import { AdropMetrics } from 'adrop-ads-react-native'
import { AdropProperties } from 'adrop-ads-react-native'

// Year only (yyyy)
AdropMetrics.setProperty(AdropProperties.BIRTH, "1990")

// Year and month (yyyyMM)
AdropMetrics.setProperty(AdropProperties.BIRTH, "199003")

// Full date (yyyyMMdd)
AdropMetrics.setProperty(AdropProperties.BIRTH, "19900315")
Date Formats
FormatExampleDescription
yyyy”1990”Year only
yyyyMM”199003”Year and month
yyyyMMdd”19900315”Full date

Gender

import { AdropMetrics } from 'adrop-ads-react-native'
import { AdropProperties, AdropGender } from 'adrop-ads-react-native'

// Male
AdropMetrics.setProperty(AdropProperties.GENDER, AdropGender.MALE)

// Female
AdropMetrics.setProperty(AdropProperties.GENDER, AdropGender.FEMALE)

// Other
AdropMetrics.setProperty(AdropProperties.GENDER, AdropGender.OTHER)

// Unknown
AdropMetrics.setProperty(AdropProperties.GENDER, AdropGender.UNKNOWN)
Gender Constants
ConstantValueDescription
AdropGender.MALE"M"Male
AdropGender.FEMALE"F"Female
AdropGender.OTHER"O"Other
AdropGender.UNKNOWN"U"Unknown

Setting Age Directly

You can also set age directly instead of birthday.
import { AdropMetrics } from 'adrop-ads-react-native'
import { AdropProperties } from 'adrop-ads-react-native'

AdropMetrics.setProperty(AdropProperties.AGE, 30)
You only need to set one of BIRTH or AGE. If both are set, BIRTH takes priority.

Custom Properties

You can set custom properties for your service. Custom properties must be defined first in the Ad Control Console under the Targeting menu.
import { AdropMetrics } from 'adrop-ads-react-native'

// Local activity app example
AdropMetrics.setProperty("region", "Seoul")
AdropMetrics.setProperty("booking_count", 5)

// Shopping mall app example
AdropMetrics.setProperty("membership_tier", "gold")
AdropMetrics.setProperty("total_purchase_amount", 1500000)

// Media app example
AdropMetrics.setProperty("favorite_genre", "drama")
AdropMetrics.setProperty("is_premium_subscriber", true)
Custom property names must exactly match the names defined in the console. Case-sensitive.

Property Usage Example

Example of setting properties when a user logs into the app.
import React, { useEffect } from 'react'
import { AdropMetrics } from 'adrop-ads-react-native'
import { AdropProperties, AdropGender } from 'adrop-ads-react-native'

const ProfileScreen = () => {
  useEffect(() => {
    // Get user info
    const user = getUserInfo()

    // Set built-in properties
    AdropMetrics.setProperty(AdropProperties.BIRTH, user.birthDate)
    AdropMetrics.setProperty(AdropProperties.GENDER, user.gender)

    // Set custom properties
    AdropMetrics.setProperty("membership_level", user.membershipLevel)
    AdropMetrics.setProperty("total_booking_count", user.bookingCount)
  }, [])

  return (
    // Screen component
  )
}

export default ProfileScreen

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

import { AdropMetrics } from 'adrop-ads-react-native'

// Simple event (no parameters)
AdropMetrics.sendEvent('app_open')

// Event with parameters
AdropMetrics.sendEvent('view_item', {
  item_id: 'SKU-123',
  item_name: 'Widget',
  item_category: 'Electronics',
  brand: 'BrandX',
  price: 29900,
})

Multi-Item Events

For events that involve multiple items (e.g., purchase, begin_checkout), pass an items array in the parameters.
import { AdropMetrics } from 'adrop-ads-react-native'

AdropMetrics.sendEvent('purchase', {
  tx_id: 'TXN-20240101-001',
  currency: 'KRW',
  items: [
    {
      item_id: 'SKU-001',
      item_name: 'Product A',
      item_category: 'Electronics',
      brand: 'BrandX',
      price: 29900,
      quantity: 1,
    },
    {
      item_id: 'SKU-002',
      item_name: 'Product B',
      price: 15000,
      quantity: 2,
    },
  ],
})

Supported Event Examples

Event NameDescriptionCommon Parameters
app_openApp opened
sign_upUser signed upmethod
push_clicksPush notification clickedcampaign_id
page_viewPage viewedpage_id, page_category, page_url
clickElement clickedelement_id, element_type, target_url
view_itemViewed itemitem_id, item_name, item_category, brand, price
view_contentViewed contentcontent_id, content_name, content_type
add_to_wishlistAdded to wishlistitem_id, item_name, item_category, brand, price
add_to_cartAdded to cartitem_id, item_name, item_category, brand, price, quantity, value, currency
begin_lead_formBegan lead formform_id, form_name, form_type, form_destination
generate_leadLead generatedform_id, form_name, form_type, form_destination, value, currency
begin_checkoutBegan checkoutcurrency, items
purchasePurchase completedtx_id, currency, items
  • Event name must be 1–64 characters.
  • Parameter key must be 1–64 characters.
  • String parameter values are limited to 1024 characters.

Best Practices

1. Set Properties Before Loading Ads

// Correct
AdropMetrics.setProperty("membership_level", "premium")
// Load ads...

// Wrong
// Load ads...
AdropMetrics.setProperty("membership_level", "premium") // Setting after ad load means targeting won't apply

2. Update Properties When They Change

import { AdropMetrics } from 'adrop-ads-react-native'

const App = () => {
  useEffect(() => {
    // Set initial properties at app start
    updateUserProperties()
  }, [])

  const onUserPurchaseComplete = (purchaseAmount: number) => {
    // Update property on purchase completion
    const currentTotal = getCurrentTotalPurchase()
    AdropMetrics.setProperty("total_purchase_amount", currentTotal + purchaseAmount)
  }

  const onMembershipUpgrade = (newTier: string) => {
    // Update property on membership upgrade
    AdropMetrics.setProperty("membership_tier", newTier)
  }

  // ...
}

3. Reset Properties on Logout

import { AdropMetrics } from 'adrop-ads-react-native'

const onUserLogout = () => {
  // Reset properties if needed
  AdropMetrics.setProperty("membership_level", null)
  AdropMetrics.setProperty("total_booking_count", null)
}

Create Audience Targeting

Create audience targeting in the console

Sell Targeting

Set up targeting category sales

Banner Ads

Implementing banner ads

Native Ads

Implementing native ads

FAQ

Ads will still be shown without setting a UID. UID is optional and used for sharing targeting data across platforms. Property-based and event-based targeting work without UID.
Property data is reflected in the console within 24 hours of collection. If data is not showing:
  1. Verify the property is correctly defined in the console.
  2. Check that the property key passed from the SDK exactly matches the console (case-sensitive).
  3. Verify AdropMetrics.setProperty() is called before loading ads.
Pass null as the property value to delete it:
AdropMetrics.setProperty("membership_level", null)
The React Native SDK does not currently support array types directly. If needed, convert to a string or split into multiple individual properties.