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:

import BidMachine

BidMachineSdk.shared.regulationInfo.populate { regulationInfo in
regulationInfo.withGDPRZone(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.

import BidMachine

BidMachineSdk.shared.regulationInfo.populate { regulationInfo in
regulationInfo.withGDPRConsent(true)
regulationInfo.withGDPRConsentString("")
}

CCPA

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

import BidMachine

BidMachineSdk.shared.regulationInfo.populate { regulationInfo in
regulationInfo.withUSPrivacyString("")
}

Also, SDK automatically retrieves CCPA U.S. Privacy String from SharedPreference. If you would like to pass CCPA U.S. Privacy String according to IAB standards, please add it in SharedPreference. 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:

import BidMachine

BidMachineSdk.shared.regulationInfo.populate { regulationInfo in
regulationInfo.withCOPPA(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 is 2 options:

Using CMP API Specification

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

Manually

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

import BidMachine

BidMachineSdk.shared.regulationInfo.populate { regulationInfo in
regulationInfo.withGPP("", [])
}