Skip to content

Commit

Permalink
Pbm tcf20 (#1887)
Browse files Browse the repository at this point in the history
* added iOS purpose consent code samples

* Added GDPR purpose consent for Android

Co-authored-by: Steve <ssuranie@appnexus.com>
  • Loading branch information
MartianTribe and SSuranie authored Mar 26, 2020
1 parent cc95668 commit 7ca3310
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 3 deletions.
31 changes: 28 additions & 3 deletions prebid-mobile/pbm-api/android/pbm-targeting-params-android.md
Original file line number Diff line number Diff line change
Expand Up @@ -248,22 +248,47 @@ TargetingParams.addBidderToAccessControlList(TargetingParams.BIDDER_NAME_RUBICON
Prebid Mobile supports the [IAB GDPR recommendations](https://www.iab.com/topics/consumer-privacy/gdpr/). For a general overview of Prebid Mobile support for GDPR, see [Prebid Mobile Guide to European Ad Inventory and Providing Notice, Transparency and Choice](/prebid-mobile/privacy-regulation.html)
### Subject To GPDR
Enable (true) or disable (false) the ability to provide consent.
#### Retrieve subjectToGDPR
```
TargetingParams.isSubjectToGDPR();
```
#### Set subjectToGDPR
```
TargetingParams.setSubjectToGDPR(context, true);
```
Retrieve the consent string.
### GDPR Consent String
#### Retrieve gdprConsentString
```
context = TargetingParams.getGDPRConsentString();
```
Enable publishers to set the consent string.
#### Set gdprConsentString
```
TargetingParams.setGDPRConsentString(string);
```
### Purpose Consent
#### Retrieve purposeConsent
```
TargetingParams.getPurposeConsents();
```
#### Set purposeConsent
```
TargetingParams.setGDPRConsentString(context, "consent_string");
TargetingParams.setPurposeConsents(string);
```
Prebid mobile also checks if the values are present in the [SharedPreferences](https://developer.android.com/training/data-storage/shared-preferences) keys specified by the IAB. If the values are also set in these objects they will be passed in the OpenRTB request object.
Expand Down
23 changes: 23 additions & 0 deletions prebid-mobile/pbm-api/ios/pbm-targeting-ios.md
Original file line number Diff line number Diff line change
Expand Up @@ -379,6 +379,29 @@ guard let gdprConsentString = Targeting.shared.gdprConsentString else {
Targeting.shared.gdprConsentString = "A String"
```

### Purpose Consent

```
public var purposeConsents: String?
```

You can retrieve and set the purposeConsents for targeting:

```
//given
Targeting.shared.purposeConsents = "100000000000000000000000"
defer {
Targeting.shared.purposeConsents = nil
}
//when
let deviceAccessConsent = Targeting.shared.getDeviceAccessConsent()
```
### Subject to COPPA

Prebid supports passing of the Child Online Privacy Prection (COPPA) signal to Prebid Server (PBS) for all COPPA traffic. When PBS receives the COPPA flag we strip out all personal data from the requeset. For a general overview of COPPA, see the [FTC's guidlines](https://www.ftc.gov/enforcement/rules/rulemaking-regulatory-reform-proceedings/childrens-online-privacy-protection-rule).
Expand Down

0 comments on commit 7ca3310

Please sign in to comment.