Identifier for Advertisers (IDFA) support

The User Messaging Platform (UMP) SDK lets you present an IDFA message to your users before requesting their consent for App Tracking Transparency (ATT). The IDFA message shows your users how your app uses the identifier.

This guide covers using the UMP SDK to present an IDFA message.

Prerequisites

Before you begin, make sure you've done the following:

Update Info.plist

To show a custom alert message, do the following:

  1. Open the Info.plist file.
  2. Add the NSUserTrackingUsageDescription key with a custom message that describes the usage:
<key>NSUserTrackingUsageDescription</key>
<string>This identifier will be used to deliver personalized ads to you.</string>

The usage description appears as part of the IDFA ATT alert when you present the consent form:

Then, link the AppTrackingTransparency framework:

Your app then shows an IDFA message before the ATT alert.

Testing

While testing, remember that the ATT alert only appears a single time since requestTrackingAuthorization is a one-time request. The UMP SDK only has a form available to load if the authorization status is ATTrackingManagerAuthorizationStatusNotDetermined.

To make the alert appear a second time, you must uninstall and reinstall your app on your test device.

Request ads with or without IDFA

If a user denies ATT, continue to request ads using your ad format's APIs. The Google Mobile Ads SDK doesn't send IDFA in the ad request. For more details see, Select an ad format.