[iOS] 2. Working with ATT (App Tracking Transparency / iOS)
Since iOS 14 Apple introduced the Apple Tracking Transparency framework, which requires that every app needs to expose which tracking data it uses. The ATT framework on its own is not compliant with the IAB TCF/GDPR, etc. and is only an apple specific version for asking user consent for tracking data. To enable the user a better experience we support a solution to synchronise the consents between the CMP SDK and the ATT interface . The SDK offers two different solutions for this.
Passing ATT signals to the consentmanager iOS SDK
Depending on your workflow you can either call the ATT screen via your code logic or have the consentmanager iOS SDK do the call for you.
If you are passing the ATT signals manually, your code could look like this:
func requestPermission() {
if #available(iOS 14, *) {
ATTrackingManager.requestTrackingAuthorization(completionHandler: { status in
switch status {
case .authorized:
// Tracking authorization dialog was shown and accepted
// TODO custom code here:
case .denied:
// Tracking authorization dialog was shown and permission is denied
// TODO custom code here:
case .notDetermined:
// Tracking authorization dialog has not been shown
// TODO custom code here:
case .restricted:
// Tracking authorization dialog has not been shown app is restricted for tracking
// TODO custom code here:
}
// After determination of the att status, pass the information to the cmp sdk
CmpConfig.setAppleTrackingStatus(status.rawValue);
})
}
}
The permission request could look like this. The important line of code is 19 where the information is passed to the CMP SDK. Depending on the ATT Status the CMP SDK sets predefined consent information.
We're recommending this integration. You're still able to get full control of the ATT interface and implement your customised process depending of the user.
Letting the SDK query ATT automatically
If you do not want to add your own logic (see above), you can have the consentmanager iOS SDK automatically ask for permission for ATT.
The developer activates the the automatic apple tracking. The CMP SDK handles the request with a default protocol. The status then will be handled by the CMP SDK. Afterwards it's possible to get the ATT status by the developer custom actions should be nevertheless handled on request like in option 1. You can activate the automatic ATT request with:
This will show the ATT layer from the operating system.
CmpConfig.setAutoAppleTracking(true);
Make sure to activate this function before instantiation of the CMP SDK.
If you not using ATT, you may have to take a note for the automatic Apple Review. Since the Apple ATT is integrated as an option but not used. Apple might not approve the Application automatically.
Customizing the consent layer for ATT
In case when the user rejects the ATT request, the CMP can show a different message, vendorlist or purposelist. We recommend using a message that is customized for ATT and that does not include wording that leads the user to believe that tracking or advertising (or any other data processing for which ATT is relevant) is used.
The goal should be to avoid confusion in cases when the user already rejected tracking via ATT. In this case the user should not be confronted with a message or choice that could potentially (re-)enable tracking.
Customizing the text for ATT rejection
In order to customize the texts when the user rejected ATT, please go to Menu > Designs > Texts > (choose a language) and fill field "Text (ATT)". If the field is no-empty, the CMP will display this text instead of the original text in case when the user rejected ATT.
Disabling or removing purposes & vendors
In addition to the text changes we recommend to also disable or hide purposes and vendors that require ATT consent. In order to do so, please go to Menu > CMPs > Edit > Other settings > Privacy APIs and set the setting "ATT support" to "Disable selected purposes" or "Hide selected purposes". Once changed, please choose the purposes that should be hidden/disabled.
In addition to the purposes you could also hide/disable affected vendors via the setting "Vendor logic".
We recommend doing both: Hiding vendors and purposes if ATT was rejected.
Using a different design for ATT
In addition or in combination to the above, app developers can also set the system to use a completely different design in case when ATT was accepted or rejected. This allows for more flexibility in presentation and wording. In order to activate the ATT targeting, please go to Menu > Designs > Edit > Targeting and activate ATT-Targeting: