Advertising Tracking Enabled for Audience Network

For iOS 14.5 or later users, you must:

  • Set the setAdvertiserTrackingEnabled flag.
  • Use Audience Network SDK 6.2.1 or later.

We also recommend both instructions for iOS 14 users.

The setAdvertiserTrackingEnabled flag allows you to inform Audience Network 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.

Note also:

  • You will need to implement the setAdvertiserTrackingEnabled flag irrespective of the use of mediation.
  • If you are integrating Facebook’s SDK as well as the Audience Network SDK, you must also set the setAdvertiserTrackingEnabled flag for Facebook's SDK. See Advertiser Tracking Enabled for details.

How to Use the Flag

  • AdvertiserTrackingEnabled is only available for iOS 14 or later users. If you are running iOS 13 or earlier, Limit Ad Tracking is used.
  • Set the AdvertiserTrackingEnabled flag to either true or false. In iOS versions where Apple enforces the prompt, if you do not set the ATE flag it defaults to false.
  • The flag is incorporated into each ad request or bidder token automatically. You do not need to call the initilize() method additionally.
  • The true or false setting will remain at your chosen value until you manually change it. However, if the user uninstalls and reinstalls your app, you must set the flag again.

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

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

Unity

Are you using the Audience Network-supplied Unity wrapper?

  • If Yes, use the following code.
// Set the flag as true 
AudienceNetwork.AdSettings.SetAdvertiserTrackingEnabled(true);
// Set the flag as false
AudienceNetwork.AdSettings.SetAdvertiserTrackingEnabled(false);
  • If No, enter this code first:
using UnityEngine;
using System.Runtime.InteropServices;

#if UNITY_IOS

namespace AudienceNetwork
{
    public static class AdSettings
    {
        [DllImport("__Internal")] 
        private static extern void FBAdSettingsBridgeSetAdvertiserTrackingEnabled(bool advertiserTrackingEnabled);

        public static void SetAdvertiserTrackingEnabled(bool advertiserTrackingEnabled)
        {
            FBAdSettingsBridgeSetAdvertiserTrackingEnabled(advertiserTrackingEnabled);
        }
    }
}

#endif

Once you have entered this code, you can then enable or disable the flag as if using the Unity wrapper.

Troubleshooting