iOS 14 Ads tracking message templates
Starting from iOS 14, there are changes in the Advertising, and using the IDFA now requires user consent. You can read more in the iOS 14 Updates article.
We have created two new message templates:
- Ads Pre-Permission (message)
- Register for Ads Tracking (action)
GitHub repo
The code of the templates is available in GitHub:
Swift
Objective-C
Prerequisites
Both templates require iOS 14 and Xcode 12. The templates must be synced to the Dashboard in order to appear there.
If you request advertising authorization, you must add the NSUserTrackingUsageDescription (Privacy - Tracking Usage Description) key in your Info.plist file describing why you need access to this tracking. The description entered there will also be shown in the prompt displayed to the user.
Both templates will change the device id to IDFA.
Ads Pre-Permission
This message is similar to the Push Pre-Permission template that we have for requesting Notification permissions. It has the same UI and fields that you can configure from the Dashboard.
The message serves as a soft-ask for Ads Tracking. If accepted, the message will open the Apple System Prompt for Advertising Tracking permission.
The message will only be shown (and the View event tracked) if the user has not been asked already i.e the current Advertising status of the user is Not Determined - the user has neither Accepted nor Declined the permission.
If desired, the user can be navigated to the Settings of the App, if they have declined the tracking, so it can be enabled. See the code of the Register for Ads Tracking action for an example.
Register for Ads Tracking
This action calls directly the Apple System Prompt for Advertising Tracking permission.
In that template, we show the prompt only if the user has not already been asked for permission.
If the user has declined the Ads tracking, we open the Settings for the App, so they can enable it.
Feel free to change the functionality based on your preferences.
You can use it as a standalone message or as a chained message of another one. For example, you can add this action on a button click of a Confirm or a Rich Interstitial message. Note that the main message will be displayed no matter the current Ads tracking authorization status.