SDK Privacy Methods

iOS Privacy Methods

Warning

  • Chartboost requires that publishers obtain consent from their users to be able to process personal data and provide relevant ads.
  • Review our COPPA FAQs for more information on behavior targeting.

GDPR

To set GDPR consent:

[Chartboost addDataUseConsent:[CHBGDPRDataUseConsent gdprConsent:CHBGDPRConsentBehavioral]];

Possible consent values are CHBGDPRConsentBehavioral and CHBGDPRConsentNonBehavioral.

Chartboost will store the consent status even after the app is closed. In order to reset this information use:

[Chartboost clearDataUseConsentForPrivacyStandard:CHBPrivacyStandardGDPR];

CCPA

To set CCPA consent:

[Chartboost addDataUseConsent:[CHBCCPADataUseConsent ccpaConsent:CHBCCPAConsentOptInSale]];

Possible consent values are CHBCCPAConsentOptInSale and CHBCCPAConsentOptOutSale.

Chartboost will store the consent status even after the app is closed. In order to reset this information use:

[Chartboost clearDataUseConsentForPrivacyStandard:CHBPrivacyStandardCCPA];

COPPA

To set COPPA consent:

[Chartboost addDataUseConsent:[CHBCOPPADataUseConsent isChildDirected:true]];

Possible consent values are true and false.

Chartboost will store the consent status even after the app is closed. In order to reset this information use:

[Chartboost clearDataUseConsentForPrivacyStandard:CHBPrivacyStandardCOPPA];

LGPD

To set LGPD consent:

[Chartboost addDataUseConsent:[CHBLGPDDataUseConsent allowBehavioralTargeting:true]];

Possible consent values are true and false.

Chartboost will store the consent status even after the app is closed. In order to reset this information use:

[Chartboost clearDataUseConsentForPrivacyStandard:CHBPrivacyStandardLGPD];

Custom Consent

Chartboost allows publishers to provide custom consent information, besides the predefined GDPR and CCPA values.

For example:

[Chartboost addDataUseConsent:[CHBCustomDataUseConsent customConsentWithPrivacyStandard:CHBPrivacyStandardCCPA consent:@"1NN-"]];

🚧

Caution

Currently, the only custom consent values allowed are valid IAB's U.S. Privacy String for the CHBPrivacyStandardCCPA standard.


Android Privacy Methods

🚧

Caution

  • Chartboost requires publishers to obtain consent from their users in order to process personal data and provide relevant ads.
  • Apps under the Google Play Designed for Families policy MUST set the COPPA privacy flag to true.
  • Review our COPPA FAQs for more information on behavior targeting.

addDataUseConsent is the new public api usage to set consent values. This new API provides user consent data for privacy laws currently in existence or future laws. Replaces CBPIDataUseConsent method.

GDPR

/**
* GDPR support settings:
* NON_BEHAVIORAL(0) means the user does not consent to targeting (Contextual ads)
* BEHAVIORAL(1) means the user consents (Behavioral and Contextual Ads)
*/
DataUseConsent dataUseConsent = new GDPR(GDPR.GDPR_CONSENT.BEHAVIORAL);
Chartboost.addDataUseConsent(context, dataUseConsent);

CCPA

/**
* CCPA support settings:
* OPT_IN_SALE(1NN-) means the user consents (Behavioral and Contextual Ads)
* OPT_OUT_SALE(1NY-) means the user does not consent to targeting (Contextual ads)
*/
DataUseConsent dataUseConsent = new CCPA(CCPA.CCPA_CONSENT.OPT_IN_SALE);
Chartboost.addDataUseConsent(context, dataUseConsent);

COPPA

If an app is child directed, a value of true or false must be set to define proper behavior.

/**
* COPPA:
* true means that COPPA restrictions apply and the android advertising identifier is not transmitted. (Contextual ads)
* false means that COPPA restrictions do not apply. (Behavioral and Contextual Ads)
*/
DataUseConsent dataUseConsent = new COPPA(true);
Chartboost.addDataUseConsent(context, dataUseConsent);

🚧

Caution

Apps under the Google Play Designed for Families policy MUST set the COPPA privacy flag to true in order to restrict transmitting the android advertising identifier.

Custom Consent

Chartboost allows publishers to provide custom consent information, besides the predefined GDPR and CCPA values.

For example:

DataUseConsent dataUseConsent = new Custom("name", "value");
Chartboost.addDataUseConsent(context, dataUseConsent);

🚧

Caution

Currently, the only custom consent values allowed are valid IAB’s U.S. Privacy String for the CCPA standard.


Unity Privacy Methods

🚧

Caution

Chartboost requires that publishers obtain consent from their users to be able to process personal data and provide relevant ads.

Review our COPPA FAQs for more information on behavior targeting.

addDataUseConsent is the new public api usage to set consent values. This new API provides user consent data for privacy laws currently in existence or future laws. Replaces setPIDataUseConsent method.

GDPR

/**
 * GDPR support settings:
 * ‘NoBehavioral’ means the user does not consent to targeting (Contextual ads)
 * ‘Behavioral’ means the user consents (Behavioral and Contextual Ads)
 */ 
Chartboost.addDataUseConsent(CBGDPRDataUseConsent.Behavioral);
Or
Chartboost.addDataUseConsent(CBGDPRDataUseConsent.NoBehavioral);

CCPA

/**
 * CCPA support settings:
 * ‘OptInSale’ means the user consents (Behavioral and Contextual Ads)
 * ‘OptOutSale’ means the user does not consent to targeting (Contextual ads)
 */
Chartboost.addDataUseConsent(CBCCPADataUseConsent.OptOutSale);
Or
Chartboost.addDataUseConsent(CBCCPADataUseConsent.OptInSale);

Custom Consent

Chartboost allows publishers to provide custom consent information, besides the predefined GDPR and CCPA values.

For example:

Chartboost.addDataUseConsent(new CBCustomDataUseConsent("name","value"));

🚧

Caution

Currently, the only custom consent values allowed are valid IAB’s U.S. Privacy String for the CBCCPADataUseConsent standard.