Ad Consent
Report advertising consent from your Expo app to Google Ads and Meta, using provider options or runtime updates on iOS and Android.
Ad consent tells Superwall whether a user allows advertising data use and personalized advertising. Use it when sending conversions to Google Ads or Meta.
Requirements
Use Expo SDK v1.6.0 or later on iOS and v1.8.0 or later on Android. Connect your advertising integration in the Superwall dashboard.
Set consent
On iOS and Android, adConsent reports whether the user has consented to ad data use and personalized
advertising. Superwall passes these values with conversions it uploads to Google Ads and Meta.
If you omit adConsent, Superwall uses a stored IAB TCF consent when GDPR applies and otherwise
defaults to granted. Apps serving users in the EEA, UK, or Switzerland without a TCF banner should
set consent from their own consent flow. A value you set overrides the TCF answer. The SDK also
reports both purposes as denied when eventTrackingBehavior is "none", and, on iOS, reports
personalization as denied when App Tracking Transparency has not been allowed unless you set it
yourself.
Set consent in provider options when it is already known at startup, or update it at runtime with
setAdConsent:
import { Button } from "react-native";
import { useSuperwall } from "expo-superwall";
function ConsentSettings({ userConsent }) {
const { setAdConsent } = useSuperwall();
async function saveConsent() {
await setAdConsent({
adUserData: userConsent.adUserData ? "granted" : "denied",
adPersonalization: userConsent.adPersonalization ? "granted" : "denied",
});
}
return <Button title="Save consent" onPress={saveConsent} />;
}On Android, the SDK reports the consent values as adUserDataConsent and
adPersonalizationConsent device attributes, and their source as adConsentSource.
AdConsent accepts these optional fields. If you omit a purpose, Superwall treats it as granted.
Prop
Type
The compatibility API exposes the same runtime method as Superwall.shared.setAdConsent(consent).
Limitations
Setting a consent value overrides the stored TCF answer. Update both purposes when the user's consent changes; omitted purposes are granted.
Related
How is this guide?
Subscription Replacement
Upgrade, downgrade or switch Google Play subscriptions from an Expo paywall, and pass replacement details to a custom purchase controller.
Install Attribution Matching
Listen for Android install attribution results in your Expo app, inspect match confidence and read the acquisition attributes added to users.