1. Home
  2. Docs
  3. Publisher
  4. Required Actions On Your Side
  5. On Mobile: Mobile Advertising User ID

On Mobile: Mobile Advertising User ID

When the player is embedded in a mobile application it is necessary to pass idfa or gaid parameter.

iOS Identifier for Advertising (idfa)

On iOS 6+ devices use:

NSString *idfaString = [[[ASIdentifierManager sharedManager] advertisingIdentifier] UUIDString];

Note that the user can opt-out from the iOS Device Advertising ID, so the application must handle cases where this ID is not available and send an empty ID.

https://developer.apple.com/documentation/adsupport/asidentifiermanager

Google Advertising ID (gaid)

Google Advertising ID can be retrieved from Google Play services. Please follow official documentation:

https://developers.google.com/android/reference/com/google/android/gms/ads/identifier/Advertisin gIdClient

Note that the user can opt-out from the Google Device Advertising ID, so the application must handle cases where the ID is not available and send an empty ID.

Was this article helpful to you? Yes No 1

How can we help?