Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for US Privacy flag #256

Merged
merged 4 commits into from
Nov 20, 2019
Merged

Support for US Privacy flag #256

merged 4 commits into from
Nov 20, 2019

Conversation

yoalex5
Copy link
Collaborator

@yoalex5 yoalex5 commented Nov 15, 2019

  1. CCPA was added Support for US Privacy flag #250
    API:
//add
UserDefaults.standard.set("1YN", forKey: "IABUSPrivacy_String")

//remove
UserDefaults.standard.removeObject(forKey: "IABUSPrivacy_String")

OpenRTB request:

"regs": {
  "ext": {
   "us_privacy": "1YN"
  }
}
  1. fixed GDPR exception support for gdpr consent #243
  2. subjectToGDPR can be assign to nil to get an IAB value
Targeting.shared.subjectToGDPR = nil
  1. refactoring
  2. tests were added

2. fixed gdpr exception prebid#243
3. subjectToGDPR can be assign to nil to get an iab value
4. refactoring
5. tests were added
@yoalex5 yoalex5 added this to the Prebid SDK 1.3 milestone Nov 15, 2019

import Foundation

class StorageUtils {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we call this PrivacyUtils?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

StorageUtils is a general utility class to work with persistent storage. It will allow us to expand this class in future without generating a lot of small classes. If we had several big logic entities I would create PrivacyUtils, StorageUtils etc.

Please keep it as is and we will change it when it will be necessary

}

ext["us_privacy"] = StorageUtils.iabCcpa()
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this object ext["us_privacy"] created even if the ccpa is empty or nil?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If StorageUtils.iabCcpa() returns nil or empty string the ext["us_privacy"] will not be created

Check tests: testPostDataWithEmptyCCPA and testPostDataWithoutCCPA

@ppuviarasu ppuviarasu merged commit 04fd940 into prebid:master Nov 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants