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

Add static API option to the consentManagementUsp module. #4685

Merged
merged 3 commits into from
Jan 7, 2020

Conversation

dbirkbeck
Copy link
Contributor

@dbirkbeck dbirkbeck commented Jan 2, 2020

The GDPR consent management module has a static configuration option. This change adds "static" as an API option to the consentManagementUsp module.

Type of change

  • Bugfix
  • Feature
  • New bidder adapter
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Does this change affect user-facing APIs or examples documented on http://prebid.org?
  • Other

Description of change

This change allows a static configuration such as the following to be used rather than the 'iab' API.

consentManagement: {
    usp: {
        cmpApi: 'static',
        consentData: {
            getUSPData: {
                uspString: '1YYY'
            }
        }
    }
}

The GDPR consent management module has a static configuration option. This change adds "static" as an API option to the consentManagementUsp module.
@jsnellbaker
Copy link
Collaborator

@dbirkbeck Can you please put together some unit tests that use this new static config approach and add them to this PR?

@harpere
Copy link
Collaborator

harpere commented Jan 3, 2020

@dbirkbeck this implementation works, BUT I think we should be consistent with the format the GDPR consentManagement module uses. I realize that internally we are NOT consistent, but I think the external API should be (and we probably should change the internal representation of the consent data to be consistent as well). this is what I'm proposing:

consentManagement: {
    usp: {
        cmpApi: 'static',
        consentData: {
            getUSPData: {
                uspString: '1YNY'
            }
        }
    }
}

Notice getUSPData corresponds to the "command" used to retrieve the data from the USP CMP, and uspString is the actual param name returned by the CMP. So in addition to being consistent with the GDPR implementation, it's also consistent with the object returned by the CMP, and adds flexibility for other USP "commands" we might support in the future.

Copy link
Collaborator

@harpere harpere left a comment

Choose a reason for hiding this comment

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

As mentioned in the previous comment, we should be consistent with the GDPR format. It would be nice to update the internal implementation used in lookupUspConsent(), processUspData(), and elsewhere (that could come later), but we should at least support a consistent format in the public API.

@dbirkbeck
Copy link
Contributor Author

I've updated the module/unit test to reflect the new public API format. It is agreed that changing the internal implementation may be desirable but doing so will require a much larger effort and should probably be left to a next step.

Copy link
Collaborator

@harpere harpere left a comment

Choose a reason for hiding this comment

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

Thx. LGTM

@harpere
Copy link
Collaborator

harpere commented Jan 6, 2020

@dbirkbeck
Copy link
Contributor Author

A pull request has been created for the documentation updates requested.

@harpere harpere merged commit 4391d6c into prebid:master Jan 7, 2020
@bretg bretg removed the needs docs label Jan 8, 2020
redaguermas added a commit to redaguermas/Prebid.js that referenced this pull request Jan 8, 2020
…idVersion1.2.0

* 'master' of https://github.com/prebid/Prebid.js: (22 commits)
  fix lint errors in unit test file (prebid#4702)
  Add Revcontent Adapter (prebid#4654)
  Changed data structure in Platform One Analytic Adapter (prebid#4647)
  increment pre version
  Prebid 3.2.0 Release
  Add static API option to the consentManagementUsp module. (prebid#4685)
  replace all xhr stubs with global xhr stub to prevent all requests (prebid#4687)
  Add CCPA us_privacy support to spotxBidAdapter (prebid#4689)
  ucfunnel adapter support CCPA and remove utils.js in adapter (prebid#4541)
  freewheelSSPBidAdapter  (prebid#4645)
  Add CCPA support to Beachfront adapter (prebid#4673)
  add seedingAlliance Adapter (prebid#4614)
  Changed analytics data structure in YuktaMedia Analytic Adapter (prebid#4659)
  Add eplanning adapter for prebid 3.0 compliant and CCPA and GDPR support (prebid#4643)
  Bidder schain support (prebid#4551)
  Added CCPA support and GDPR compliance to Cedato adapter (prebid#4683)
  pass us privacy consent string to request (prebid#4581)
  Prebid 3 Admixer (prebid#4615)
  Pass uspConsent in bidRequest (prebid#4675)
  Advertly: New Bidder Adapter Submission (prebid#4496)
  ...
harpere pushed a commit that referenced this pull request Jan 8, 2020
* Add static API option to the consentManagementUsp module.

The GDPR consent management module has a static configuration option. This change adds "static" as an API option to the consentManagementUsp module.

* Added a unit test for the static API option in the consentManagementUsp module.

* Updated the consentManagementUsp module static API config object to follow the recommended format.
harpere added a commit that referenced this pull request Jan 8, 2020
)

* Add static API option to the consentManagementUsp module.

The GDPR consent management module has a static configuration option. This change adds "static" as an API option to the consentManagementUsp module.

* Added a unit test for the static API option in the consentManagementUsp module.

* Updated the consentManagementUsp module static API config object to follow the recommended format.
@adrianpoix
Copy link

@dbirkbeck is static API option for CCPA available with v2.44.2 ?

@dbirkbeck
Copy link
Contributor Author

dbirkbeck commented Jan 9, 2020

@adrianpoix The static API for CCPA is only in 3.2.0 thus far. As most are moving toward 3.x and I wasn't sure how many would use the static API, I focussed my efforts on that branch. I can create a PR for the 2.x branch as well if you think there is value in it.

@jsnellbaker
Copy link
Collaborator

jsnellbaker commented Jan 9, 2020

@dbirkbeck & @adrianpoix

We actually just created/merged a PR yesterday for the 2.44.x-legacy branch that adds the static approach for the CCPA/USP API. It should be available for use with the next legacy release - which should happen next week (in the 2.44.3 release).

Forgot to link the PR in question. #4705

@dbirkbeck
Copy link
Contributor Author

@jsnellbaker Excellent, thanks for merging into the legacy branch!

@adrianpoix
Copy link

@jsnellbaker & @dbirkbeck thanks for merging !

I use Audience Network bid adapter and they didn't migrate to 3.x.x yet so I have to keep 2.x.x for now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants