AI-generated Key Takeaways
-
The User Messaging Platform (UMP) SDK is used to present an IDFA message to users before requesting their consent for App Tracking Transparency (ATT).
-
Before implementing, ensure you have completed the Get Started guide and created an IDFA message in the Ad Manager UI.
-
To show a custom alert message, you need to update your
Info.plist
file with theNSUserTrackingUsageDescription
key and link theAppTrackingTransparency
framework. -
For testing purposes, you need to uninstall and reinstall your app on your test device to see the ATT alert more than once.
-
If a user denies ATT, the Google Mobile Ads SDK will not send IDFA in the ad request when you continue to request ads.
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:
- Complete the Get started guide.
- Create an IDFA message in the Ad Manager UI.
Update Info.plist
To show a custom alert message, do the following:
- Open the
Info.plist
file. - 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.