Installation
- Bundle
- CDN
set_consent
- User Accepted
- User Declined
- Non-GDPR Region
boolean
required
Whether the user is subject to GDPR (EU, EEA, and UK users).
boolean
required
The user’s choice from your consent banner. On iOS this single flag drives both AppsFlyer consent dimensions: data usage and ads personalization.
When to call it
1
On every launch, as soon as the choice is known
Consent applies to the current SDK session. If you already have a stored choice, forward it immediately on page load, otherwise forward it the moment the user answers your banner.
2
Before identity and events
Send consent before
set_user_id, set_email, set_phone, and any log_event calls so nothing is processed against the user’s choice.3
Again whenever the user changes their mind
If the user updates their preference in your settings screen, call
set_consent again with the new values.iOS: App Tracking Transparency
Consent and ATT are separate layers, and Despia handles the second one for you. On iOS the AppsFlyer SDK waits up to 60 seconds for the user to answer the ATT prompt before finalizing install attribution. If the user denies ATT, AppsFlyer operates without the IDFA regardless of what you pass inset_consent.
set_consent is about privacy regulation (GDPR and DMA). ATT is about the device identifier. You need both to be in order. Despia manages the ATT flow natively, your web layer only supplies set_consent.Resources
NPM Package
despia-native