Advertising Tracking Enabled for Audience Network

Starting with iOS 14, you will need to set the setAdvertiserTrackingEnabled flag. This allows you to inform Facebook whether to use the data to deliver personalized ads in line with your own legal obligations, platform terms, and commitments you’ve made to your users. If the flag is set to false we will not be able to deliver personalized ads.

You will need to implement the setAdvertiserTrackingEnabled flag irrespective of the use of mediation.

Limitations

  • AdvertiserTrackingEnabled is only available for iOS 14+. For all versions prior to iOS 14, iOS 13 and older, Limit Ad Tracking is used.

Set the ‘Advertising Tracking Enabled’ Flag

Call the setAdvertiserTrackingEnabled method of the FBAdSettings class and set it to YES for Objective-C or true for Swift. On the contrary, set setAdvertiserTrackingEnabled to NO for Objective-C or false for Swift.

If you are using mediation, then you need to implement the setAdvertiserTrackingEnabled flag before initializing the mediation SDK in order for us to receive it in the bidding request.

This flag also applies with test mode enabled

Objective-C

// Set the flag as true 
[FBAdSettings setAdvertiserTrackingEnabled:YES];
// Set the flag as false 
[FBAdSettings setAdvertiserTrackingEnabled:NO];

Swift

// Set the flag as true
FBAdSettings.setAdvertiserTrackingEnabled(true)
// Set the flag as true
FBAdSettings.setAdvertiserTrackingEnabled(false)

Unity

// Set the flag as true 
AudienceNetwork.AdSettings.SetAdvertiserTrackingEnabled(true);
// Set the flag as false
AudienceNetwork.AdSettings.SetAdvertiserTrackingEnabled(false);

If you do not use the Unity wrapper, use the following:

#if UNITY_IOS
        AudienceNetwork.AdSettings.SetAdvertiserTrackingEnabled(true);
#endif
#if UNITY_IOS
        AudienceNetwork.AdSettings.SetAdvertiserTrackingEnabled(false);
#endif