Skip to main content

Data Privacy

GDPR

Effective May 25, 2019, the European Union's General Data Protection Regulation (GDPR) has been in force. To meet its requirements, developers can choose from these options.

A Consent Management Platform (CMP) is a tool that helps developers collect, manage, and store user consent for data processing activities.

As a publisher, you should integrate a Consent Management Platform (CMP) that adheres to IAB TCF v2. Don't load any ads until the CMP has confirmed the user's consent status. The BidMachine SDK will then consume the TCF v2 consent string supplied by your CMP. Please note that BidMachine does not audit CMPs for full TCF compliance or adherence to applicable privacy laws.

Manually

If you prefer not to use a CMP, you can manually collect user consent and pass it to the BidMachine SDK.

To set subject to GDPR, use the following method:

BidMachine.SetSubjectToGDPR(true);

To set the GDPR consent string, use the following method. You can pass either a valid consent string or an empty string and a boolean flag indicating whether the user has given consent.

BidMachine.SetConsentConfig(true, "<CONSENT_STRING>");

CCPA

Effective July 1, 2020, the California Consumer Privacy Act (CCPA) comes into force. To pass CCPA U.S. Privacy String to BidMachine, use:

BidMachine.SetUSPrivacyString("<US_PRIVACY_STRING>");

Also, when a compliant Consent Management Platform (CMP) is used, the SDK can automatically retrieve the CCPA U.S. Privacy String from SharedPreferences (Android) or UserDefaults (iOS). If you would like to pass the CCPA U.S. Privacy String according to IAB standards, please ensure your CMP stores it in SharedPreferences or UserDefaults. More information here and here.

COPPA

To help ensure compliance with COPPA, you must indicate whether a user falls within an age-restricted category. To pass COPPA to BidMachine, use:

BidMachine.SetCoppa(true);

GPP

The Global Privacy Platform (GPP) is a unified protocol that helps advertisers, publishers, and technology providers in digital advertising comply with evolving regulations worldwide. By centralizing the transmission of privacy, consent, and consumer-choice signals from websites and apps to ad-tech partners, it simplifies compliance efforts.

To pass GPP to BidMachine, there are 2 options:

Using CMP API Specification

If you are using a Consent Management Platform (CMP) that supports the IAB's CMP API Specification, the BidMachine SDK can automatically retrieve GPP data from SharedPreferences (Android) or UserDefaults (iOS).

Manually

BidMachine SDK provides a method to pass GPP data directly. This method allows you to set the GPP string and associated IDs in a straightforward manner.

BidMachine.SetGPP("<GPP_STRING>", new int[] { 2, 6 });
ParameterTypeDescription
gppStringstringGPP consent string complying with the IAB standard
gppIdsint[]Array of applicable GPP section IDs