TCF v2.0 Consent

If you implemented a consent management platform (CMP) that complies with IAB Transparency & Consent Framework (TCF) v2.0 for a user consent flow, the Yandex Mobile Ads SDK supports sending TCF v2.0 values.

The Yandex Mobile Ads SDK reads TCF v2.0 consent strings from UserDefaults using the following keys:

IABTCF_TCString

String

Fully encoded TC string.

IABTCF_gdprApplies

Number

  • 1: GDPR applies in the current context;
  • 0: GDPR doesn't apply in the current context;
  • Unset: Not defined (default value before initialization).

IABTCF_CmpSdkID

Number

Unsigned integer ID of the certified CMP in use.

IABTCF_PurposeConsents

Binary String

"0" or "1" in position N, where N is indexed starting with 0, indicating the consent status for the purpose with ID N+1. "0" means false, and "1" means true. For example, "1" indexed as 0 indicates that consent is given for the purpose with ID 1.

IABTCF_VendorConsents

Binary String

"0" or "1" in position N, where N is indexed starting with 0, indicating the consent status for the vendor with ID N+1. "0" means false, and "1" means true. For example, "1" indexed as 0 indicates that consent is given for the vendor with ID 1.

IABTCF_AddtlConsent

String

AC string with the specification version and IDs of ad technology providers that the user has consented to.

To learn more, see the IAB documentation.

Passing values to UserDefaults

Be sure to pass the key values before making ad requests. Use certified CMPs to transmit these values. You can find the latest CMP list recommended by the IAB here. Once the user's consent is obtained, the CMP writes all data to UserDefaults based on the keys, while the Yandex Mobile Ads SDK automatically reads the data.