User Consent Flow - cleveradssolutions/CAS-ReactNative GitHub Wiki

⚡ Before you start
Make sure you have correctly Privacy Regulations.


In order for CAS and our ad providers to deliver ads that are more relevant to your users, as a mobile app publisher, you need to collect explicit user consent for use of personal data in the regions covered by GDPR, CCPA, LGPD, PIPEDA.

Info
Keep in mind that it’s best to contact qualified legal professionals, if you haven’t done so already, to get more information and be well-prepared for compliance.

Read more about:

Automatic consent flow

The automatic ask for consent from the user introduced in CAS 3.0. To get consent for collecting personal data of your users, we suggest you use a built-in Consent Flow, comes with a pre-made consent form that you can easily present to your users. That means you no longer need to create your own consent window.

The user will see the consent flow when your app create CAS Manager. When the user completes the flow, the SDK will return you instance of MediationManager and result of initialisation process.

const {manager, result} = await CAS.buildManager({
    casId: '1234567890'
}, onConsentFlowReleasedCallback);

Danger
You must wait until the user finishes the consent flow before you initialize third-party SDKs (such as MMPs or analytics SDKs). For this reason, initialize such SDKs from within your initialization-completion callback. If you were to initialize these third-party SDKs before the user completes the consent flow, these third-party SDKs would not be able to access relevant identifiers and you would suffer a material impact on measurement, reporting, and ad revenue.

Privacy Policy URL

One requirement of the consent dialog is to provide the user with a link to the Privacy Policy.
To add a link to the Privacy policy, create CAS Manager with consentFlow param:

const {manager, result} = await CAS.buildManager({
    consentFlow: {
        privacyPolicy: url
    },
});

Info
If you don't define a link to your application's policy, the user will follow the link to Clever Ads Solutions policy.

Overview flow (Android)

Overview flow (iOS)

iOSConsentFlow

  1. Pre-request user permission form for tracking.
  2. System request from App Tracking Transparency framework.
  3. Opt-in consent for the collection and use of personal data in the regions covered by GDPR, CCPA, LGPD, PIPEDA.

Users will not see the ATT request if at least one of the following is true

  • Users using iOS versions below 14.5
  • Users who have indicated that they do not allow apps to ask to track them, by setting Settings > Privacy, Allow Apps to Request to Track
  • Users with child accounts, or who are under age 18, who are signed in via their Apple ID
  • Users who have already answered so far
  • The app does not have a usage tracking description in Info.plist under NSUserTrackingUsageDescription key

Overview flow (Common)

Users will not see the Consent dialog if at least one of following is true

  • Users located in regions that are not covered by information protection
  • Users who are subject to COPPA restrictions.
  • Users who have seen the Google User Messaging Platform form.
  • Users for whom consent is defined in the CAS.setSettings({userConsent: value})

Disable flow

CAS consent flow is enabled by default. You can disable the consent flow by building CAS Manager with enabled param:

const {manager, result} = await CAS.buildManager({
    consentFlow: {
        enabled: false
    },
});

Manual consent flow

You can use the showConsentFlow method on the CAS class to present the dialog.

const result = await CAS.showConsentFlow({
    privacyPolicy: value,
    requestATT: value,
    requestGDPR: value
});

Meta Audience Network Data Processing Options for Users in California

The CAS does not support your handling of CCPA opt-out values for Meta Audience Network, you must work directly with the network to purposes of your obligations for CCPA compliance.

To learn how to implement Meta Audience Network’s “Limited Data Use” flag, read the Additional Meta AudienceNetwork steps.

Custom Consent Logic

The following instructions apply if you are using your own or a third-party party consent mechanism.

Warning
You must set the privacy options before creating the CAS Manager to disable the automatic CAS consent flow and advertising SDKs are initialized respecting the user's consent.

Consent in GDPR and Other regions

CAS shares these set consent values via adapters to supported mediation partners.

If the user consents to interest-based advertising, set the user consent Accepted flag:

CAS.setSettings({
    userConsent: ConsentStatus.Accepted
});

If the user does NOT consent to interest-based advertising, set the user consent Denied flag:

CAS.setSettings({
    userConsent: ConsentStatus.Denied
});

Once you set the consent value, CAS will continue to respect that value for the lifetime of your application or until the user consents to interest-based advertising.

Multi-State Consumer privacy laws

California and Virginia laws may require you to display a “Do Not Sell or Share My Personal Information” link or provide other options to users located in those states to opt out of interest-based advertising. You must set a flag that indicates whether users in those states opt out of interest-based advertising or the sale or share of personal information for interest-based advertising.

If a user does NOT opt out of interest-based advertising, set the OptInSale flag:

CAS.setSettings({
    ccpaStatus: CCPAStatus.OptInSale
});

If a user does opt out of interest-based advertising, set the OptOutSale flag:

CAS.setSettings({
    ccpaStatus: CCPAStatus.OptOutSale
});

You do not need to set this flag for users who are outside California. If you do set this flag for such users, this will not impact how ads are served to them.

Additional iOS Steps

Asking user permission to track them or access their device’s advertising identifier

With iOS 14.5 and later, you need to receive the user’s permission through the AppTrackingTransparency framework in order to track them or access their device’s advertising identifier.

Warning
If an app does not present this request, the IDFA will automatically be zeroed out, which may lead to a significant loss in ad revenue.

Info
Read more about Asking Permission to Track and AppTrackingTransparency Framework on Apple developer page

Add User Tracking usage description

To display the App Tracking Transparency authorization request for accessing the IDFA, update your Info.plist to add the NSUserTrackingUsageDescription key with a custom message describing your usage. Below is an example description text:

<key>NSUserTrackingUsageDescription</key>
<string>Your data will remain confidential and will only be used to provide you a better and personalised ad experience</string>

Some examples include:

  • Your data will remain confidential and will only be used to provide you a better and personalised ad experience
  • Your data will be used to provide you a better and personalised ad experience
  • Your data will be used to create a customized experience tailored to your interests
  • Allowing tracking will enable more personalized ads for you
  • We try to show ads for apps and products that will be most interesting to you based on the apps you use
  • This identifier will be used to deliver personalized ads to you
  • This only uses device info for more interesting and relevant ads

Info
Name in Xcode Property List Editor: Privacy - Tracking Usage Description

Localizing User Tracking usage description

To optimize performance and to improve the user experience, you can localize the NSUserTrackingUsageDescription string. Please follow the Documentation > Xcode > Localization instructions to learn how to localize your app.
The table below gives you a variety of localizations that you can use at your discretion.

Locale Description
English (en) Your data will remain confidential and will only be used to provide you a better and personalised ad experience
German (de) Ihre Daten bleiben vertraulich und werden nur dazu verwendet, Ihnen ein besseres und personalisiertes Werbeerlebnis zu bieten
French (fr) Vos données resteront confidentielles et seront utilisées uniquement pour vous offrir une expérience publicitaire meilleure et personnalisée
Spanish (es) Sus datos permanecerán confidenciales y solo se utilizarán para brindarle una experiencia publicitaria mejor y personalizada
Ukrainian (uk) Ваші дані залишатимуться конфіденційними та використовуватимуться лише для надання вам кращої та персоналізованої реклами
Russian (ru) Ваши данные останутся конфиденциальными и будут использоваться только для предоставления вам более качественной и персонализированной рекламы
Portuguese (pt) Seus dados permanecerão confidenciais e serão usados apenas para lhe proporcionar uma experiência publicitária melhor e personalizada
Japanese (ja) お客様のデータは機密として保持され、より優れたパーソナライズされた広告エクスペリエンスを提供するためにのみ使用されます

🔗 Done! What’s Next?

⚠️ **GitHub.com Fallback** ⚠️