Additional Meta AudienceNetwork steps - cleveradssolutions/CAS-Unity GitHub Wiki
⚡ Before you start
Make sure you have correctly Configuring SDK.
Meta Audience Network Data Processing Options for US Users Limited Data Use is a data processing option that gives you more control over how your data is used in Meta’s systems and better supports your compliance efforts with various US state privacy regulations. To utilize this feature, you must proactively enable Limited Data Use.
Visit Meta’s developer documentation for details.
CAS provide an alternative way of pass FBAdSettings.setDataProcessingOptions
flags using MediationExtras.facebookDataProcessing
with values:
-
""
to explicitly not enable Limited Data Use (LDU) mode -
"LDU"
to enable LDU mode using geolocation -
"LDU_1_1000"
to enable LDU for users and specify user geography
Define LDU flag in CAS manager builder before initialization:
CAS.MobileAds.BuildManager()
.WithMediationExtras(MediationExtras.facebookDataProcessing, LDU)
... //Other parameters
.Initialize();
Implement the setAdvertiserTrackingEnabled flag, irrespective of the use of mediation, to inform Meta whether to use the data to deliver personalized ads.
CAS provide an alternative way of pass FBAdSettings.setAdvertiserTrackingEnabled
flags using MediationExtras.facebookAdvertiserTracking
.
- Value
"1"
flag to inform Audience Network 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. - Value
"0"
flag to inform Audience Network to not be able to deliver personalized ads.
CAS.ATTrackingStatus.Request((status) => {
CAS.MobileAds.BuildManager()
.WithMediationExtras(MediationExtras.facebookAdvertiserTracking, isTrack ? "1" : "0")
... //Other parameters
.Initialize();
});
Note
This functionality is for iOS only and will not have any effect on Android.
If your project uses the Facebook Unity SDK, you must be on version 11.0 or later for the MAX Facebook Audience Network adapter to function. To migrate from an older version of Facebook Unity SDK, delete the Assets/FacebookSDK
directory, then download and re-import the latest version here.❕
The Audience Network Android SDK use 127.0.0.1
(localhost) as a caching proxy to cache media files in the SDK. Since Android 9, cleartext traffic (unencrypted HTTP) will be blocked by default, which will affect the functionality of media caching of the SDK and could affect user experience and ads revenue.
Read more on Meta developers documentation
Starting from version 2.7.2 CAS plugin generate a CASPlugin.androidlib/res/xml/meta_network_security_config.xml
file.
You can use it or create your own config file.
Add the android:networkSecurityConfig
tag to your Assets/Plugins/Android/AndroidManifest.xml
:
<manifest>
<application
...
android:networkSecurityConfig="@xml/meta_network_security_config">
</application>
</manifest>
🔗 Done! What’s Next?