Skip to main content
Version:

User Data

Our SDK provides user data tranfer for better ad targeting and higher eCPM. All parameters are optional.

Set User Id

To assign an ID to a user, please call this method before Appodeal initialization:

Appodeal.setUserId("userId")

caution

For data privacy and GDPR-compliance reasons, you may NOT use email address, phone number, real name or any other personally identifiable information in the user ID you set with this call.

Custom Segment Matching

If the logic of your application allows specifying user's characteristics, then you can pass specific parameters to the Appodeal SDK. You can use Segments in the future.

  • For gender use kAppodealUserGenderKey.
  • For age use kAppodealUserAgeKey.
Appodeal.setCustomStateValue("SOME_VALUE", forKey: "SOME_KEY")

// age
Appodeal.setCustomStateValue(AppodealUserGender.male.rawValue, forKey: kAppodealUserGenderKey)

// gender
Appodeal.setCustomStateValue(40, forKey: kAppodealUserAgeKey)

Location

The Appodeal SDK reads the device location only if your app has already obtained the OS location permission from the user. The SDK does not request the location permission itself — your app is responsible for requesting authorization via Core Location (and providing the NSLocationWhenInUseUsageDescription Info.plist entry).

To opt out of location collection, do not request the location permission (and omit the NSLocationWhenInUseUsageDescription key). If the permission is missing, no location is collected.

With NSLocationWhenInUse/Always granted, the SDK may collect precise or approximate location depending on the accuracy the user allowed. Declare this in your App Privacy Details on the App Store.

Send Extra Data

You can send key-value data to Appodeal. 

Appodeal.setExtrasValue("SOME_VALUE", forKey: "SOME_KEY")

To send the device identifier from a mobile attribution service and match it with the Appodeal user id, use "attribution_id" as a key and a unique identifier from your attribution service as a value and if you use this method for attribution, call it before Appodeal SDK initialization.