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.
Consent Management Platform (CMP)
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.
Regulation state is resolved using IAB TCF v2 data and publisher-provided regulation settings. IAB TCF v1 data is not used when resolving the SDK regulation result.
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:
- Swift
- Objective-C
import BidMachine
BidMachineSdk.shared.withGDPRZone(true)
#import <BidMachine/BidMachine-Swift.h>
[BidMachineSdk.shared withGDPRZone:YES];
To indicate whether the user has given consent for personalized data processing, use the following method:
- Swift
- Objective-C
import BidMachine
BidMachineSdk.shared.withGDPRConsent(true)
#import <BidMachine/BidMachine-Swift.h>
[BidMachineSdk.shared withGDPRConsent:YES];
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.
- Swift
- Objective-C
import BidMachine
BidMachineSdk.shared.withUSPrivacyString("")
#import <BidMachine/BidMachine-Swift.h>
[BidMachineSdk.shared 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:
- Swift
- Objective-C
import BidMachine
BidMachineSdk.shared.withCOPPA(true)
#import <BidMachine/BidMachine-Swift.h>
[BidMachineSdk.shared withCOPPA:YES];
Non-Personalized Ads
Available since SDK 3.7.0. Publishers use this flag to request non-personalized ads and to limit the data BidMachine collects and shares with demand partners.
This is relevant in several scenarios:
- Age-restricted users in the US — US state laws (CCPA/CPRA in California, and similar laws in Virginia, Colorado, Connecticut, and others) prohibit selling or sharing personal data of users under 16 without opt-in consent. For users under 13, COPPA applies stricter rules. Publishers should use this flag alongside
withCOPPA(_:)when they cannot determine the exact age but targeting must be limited. - Users who declined personalized advertising — when a user opts out of personalized ads through the publisher's consent flow but is not subject to a specific regulation covered by the other APIs.
- General opt-out — as a catch-all to suppress targeting signals when none of the more specific privacy flags apply.
When set to true, BidMachine requests non-personalized ads only.
- Swift
- Objective-C
import BidMachine
BidMachineSdk.shared.withNonPersonalized(true)
#import <BidMachine/BidMachine-Swift.h>
[BidMachineSdk.shared withNonPersonalized:YES];
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.
- Swift
- Objective-C
import BidMachine
BidMachineSdk.shared.withGPP("", [])
#import <BidMachine/BidMachine-Swift.h>
[BidMachineSdk.shared withGPP:@"" :@[]];