Additional Meta AudienceNetwork steps - cleveradssolutions/CAS-ReactNative GitHub Wiki
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.
If you do not want to enable Limited Data Use (LDU) mode, pass an empty string array:
CAS.setAudienceNetworkDataProcessingOptions({
options: [],
});
To enable LDU for users and specify user geography, call setDataProcessingOptions
in a form like this:
CAS.setAudienceNetworkDataProcessingOptions({
state: 1,
options: ['LDU'],
country: 1000,
});
Implement the setAdvertiserTrackingEnabled flag, irrespective of the use of mediation, to inform Facebook whether to use the data to deliver personalized ads. Set 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.
CAS.setAdvertiserTrackingEnabled(enabled);
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
- Create
res/xml/network_security_config.xml
file, adddomain-config
tag with setscleartextTrafficPermitted
attribute totrue
:
<?xml version="1.0" encoding="utf-8"?>
<network-security-config>
<domain-config cleartextTrafficPermitted="true">
<domain includeSubdomains="true">127.0.0.1</domain>
</domain-config>
</network-security-config>
- Add the
network_security_config.xml
file to your AndroidManifest.xml:
<manifest>
<application
...
android:networkSecurityConfig="@xml/network_security_config">
</application>
</manifest>