Skip to content

Commit

Permalink
Support for CCPA consent in Criteo adapter (prebid#4604)
Browse files Browse the repository at this point in the history
* use own package instead of npm dependencies

* remove eval call, use utils.insertElement instead

* use own package instead of npm dependencies

* remove eval call, use utils.insertElement instead

* fixed some merge issues after rebasing

* switched rsa validation package to criteo's official one

* increment adapter version

* removed unused querystringify references (probably here after a merge error)

* updated package-lock.json

* Staq Adapter: update with meta envelope (prebid#4372)

* initial dev

* fix staq adapter name

* fix hello world staq call

* get hello world working again

* add user agent collection

* fix some unite tests

* Add STAQ Analytics Adapter doc

* clean up hello world

* fix tests to play nice with browserstack

* fix around issues with browserstack and deep equals of objects

* dump variable env testing since we can't mod user agent stuff in browserstack

* Update STAQ adapter to stop using deprecated utils for referrer

* remove package-lock.json changes via master rebase

* improve call frequency for ref util

* change ajax content type

* adjust ajax request to not expect whitelisting

* remove superflous commented-out code

* update event package to use meta information in envelope rather than per event basis

* fix formatting

* more formatting fixes

* more formatting!

* Rhythmone Adapter - schain support (prebid#4414)

Circle CI failing tests are not related to this PR.

* Media.net Adapter: Support Prebid 3.0 (prebid#4378)

* Media.net Adapter: Support Prebid 3.0

* Media.net Adapter: add tests to increase code coverage

* Vi Adapter: Passes additional param in the bid request (prebid#4134)

* Add focus check

(cherry picked from commit 9d6d6df)

* Pass focus as numeric value

(cherry picked from commit 9fae56a)

* Add unit test

(cherry picked from commit 946710f)

* Sovrn adapter updates: schain, digitrust, pixel syncing, and 3.0 upgrades (prebid#4385)

* schain and digitrust

* pixel beacons

* unit tests and fixes from testing

* Prebid 3.0 updates

* review fix

* use backwards compatible flatMap impl

* update pixel tests

* unit test fix

* update one more url to ssl

* fixed test

* review updates

* TheMediaGrid Bid Adapter update (prebid#4447)

* Added Grid Bid Adapter

* remove priceType from TheMediaGrid Bid Adapter

* Add video support in Grid Bid Adapter

* Added test parameter for video slot

* update Grid Bid Adapter to set size in response bid

* Update Grid Bid Adapter to support identical uids in parameters

* Fix typo in test file for Grid Bid Adapter

* Update The Grid Media Bidder Adapter to send refererInfo.referer as 'u' parameter in ad request

* Hotfix for referrer in Grid Bid Adapter

* Grid Bid Adapter: added wrapperType and wrappweVersion to the ad request

* TheMediaGrid Bid Adapter: added sync url

* TheMediaGrid Bid Adapter: added GDPR params to sync url

* TheMediaGrid Bid Adapter: added tests for getUserSyncs function

* Conversant Bid Adapter adds support for extended ids (prebid#4462)

* Adkernel 3.0 compatibility (prebid#4477)

* Rubicon Adapter pchain support (prebid#4480)

* rubicon pchain support

* removed describe.only

* Implemented changes required to provide support for video in the IX bidding adapter for Instream and Outstream contexts. (prebid#4424)

* Default size filter & KVP support (prebid#4452)

* adding DMX

test @97%, two files added one updated

* Update districtm_spec.js

* Update districtmDMX.js

* adding all districtm needed file

* remove legacy file

* remove typo || 0 in the test method

* force default to return a valid width and height

* update unit test code for failing test

* changed class for an object

* remove package-lock.json

* change file name for dmx adapter

* renamed files

* restaure package-lock.json

* update to last package-lock state

* update gdpr user consent

* fix sizes issue

* Documentation updates

Adding the readme.md info

* update file name and update unit testing import file location

* current machine state

* lint correction

* remove variable assigment duplicate

* adding logic upto5

* adding support for removing and shuffle sizes

* adding array split test

* re-assign none standard size to the request

* resolve duplicate format inside format array

* update .md and adaptor file for KVP support

* remove array helper includes

* inforce two digit after decimal

* RUn error check nothing on my side but error form another adapter

* add id5id to prebid server bid adapter (prebid#4468)

* Added _pbjsGlobals for tracking renames. Resolves prebid#4254 (prebid#4419)

* Feature/smart video (prebid#4367)

* Adding outstream video support.

* Fixing unit test.

* Adding video instream support.

* Handling video startDelay parameter.

* Improving unit tests.

* Fixing indent.

* Handling the request when videoMediaType context is not supported.

* Changing maintainer mail address.

* Remove video outstream specific code.

* Unit test updated.

* do not select element that gets removed after dfp render (prebid#4423)

* add smms adapter (prebid#4439)

* add smms adapter

* re-run ci, why adigo adapter failed??

* review comments fix, remove deprecated functions, fix unit test

* Prebid 2.41.0 release

* Increment pre version

* adds schain param (prebid#4442)

* Create newborntownWeb adapter (prebid#4455)

* Create newborntownWeb adapter

* only https protocol

* Provide criteoId to server by user.ext.eids (prebid#4478)

*  ucfunnel adapter fix error message in debug mode (prebid#4338)

* Add a new ucfunnel Adapter and test page

* Add a new ucfunnel Adapter and test page

* 1. Use prebid lib in the repo to keep updated
2. Replace var with let
3. Put JSON.parse(JSON.stringify()) into try catch block

* utils.getTopWindowLocation is a function

* Change to modules from adapters

* Migrate to module design

* [Dev Fix] Remove width and height which can be got from ad unit id

* Update ucfunnelBidAdapter to fit into new spec

* Correct the endpoint. Fix the error of query string

* Add test case for ucfunnelBidAdapter

* Fix lint error

* Update version number

* Combine all checks on bid request

* Add GDPR support for ucfunnel adapter

* Add in-stream video and native support for ucfunnel adapter

* Remove demo page. Add more test cases.

* Change request method from POST to GET

* Remove unnecessary comment

* Support vastXml and vastUrl for video request

* update TTL to 30 mins

* Avoid using arrow function which is not discuraged in mocha

* ucfunnel tdid support

* ucfunnel fix error message in debug mode

* explicitly check undefined to allow falsey values in getConfig (prebid#4486)

* Conversant Bid Adapter handles vast xml (prebid#4492)

* [feature] Add a config list of submodules that require refreshing the stored ID after each bid request (prebid#4325)

* add a feature to always refresh stored id on each bid request for submodules that require that

* update test comments

* Prebid 2.42.0 Release

* Increment pre version

* Make adhese adapter prebid 3.0 compatible (prebid#4507)

* Added 'adhese' attribute to bid that contains meta data - Jira AD-2642

* added DALE to adhese determination

* extra config option: no format, but use size array as format string

* Read sizes from mediaTypes.banner.sizes + Apply Eslint suggestions

* Use map and join, add originData to response

* properly use originData obj

* Remove duplicated ids

* Update tests

* BugFix: Site id missing (prebid#4467)

* outstream changes

* removing global filtet

* reverting page

* message

* adapter change

* remove space

* testcases

* testpage

* spaces for test page

* renderer exist case

* reverting package-lock.json

* adding schain object

* adding tagid

* syntaxx error fix

* video.html

* space trailing

* space

* tagid

* inventoryId and placement

* rewarded video

* added unit test case

* adding site id

* adding placement and siteis

* site id param test case

* removing deprecated functions

* correcting test cases

* indentation

* test cases fix

* Invisibly analytics adapter (prebid#4470)

* PUBA-5273:initial commit with analytics adapter, spec & md file

* PUBA-5273: updated adapter definition

* PUBA-5273: added support contact info

* PUBA-5273: adding clearInterval on AUCTION_END

* PUBA-5273: reverted last commit as CircleCI job failed

* Reverted changes to fix CircleCI build error

* Re-commiting invocation of clearInterval on Auction_end

* Colossus adapter changes for Prebid 3.0 (prebid#4476)

* add video&native traffic colossus ssp

* Native obj validation

* Native obj validation #2

* Added size field in requests

* fixed test

* fix merge conflicts

* move to 3.0

* move to 3.0

* fix IE11 new URL issue

* fix IE11 new URL issue

* fix IE11 new URL issue

* https for 3.0

* add https test

* New alias for adkernel adapter (prebid#4512)

* adagioAnalyticsAdapter: fix inconsistent tests (prebid#4417)

* PubMatic adapter avoiding deprecated utils APIs (prebid#4521)

* added support for pubcommon, digitrust, id5id

* added support for IdentityLink

* changed the source for id5

* added unit test cases

* changed source param for identityLink

* stoped using getTopWindowUrl

* removed extra white space

* Vuble Adapter adaptations for Prebid 3.0 (prebid#4499)

* Mod: always use https

* Handle mediaType.video.playerSize

* Use bidder request to get referer info

* quantcastBidAdapter update for 3.0 (prebid#4451)

* Updated quantcastBidAdapter to always send secure requests.

* Ignore deprecated banner format.

* Orbidder Bid Adapter adds withCredentials=true header for bid and win requests (prebid#4464)

* orbidder adapter: add withCredentials:true header to BidRequest and onBidWon Requests

* add blank in order to trigger build again

* remove blank to trigger build ... again

* adding extra line to trigger build ... again

* InvibesBidAdapter - kw support (prebid#4488)

* InvibesBidAdapter - kw support

* InvibesBidAdapter - fixed & added tests for coverage

* InvibesBidAdapter - lint fix

* logError for missing s2s adapter (prebid#4498)

* logError for missing s2s adapter

* changed error message

* Update adapterManager.js

* Change protocol to https (prebid#4513)

* Outcon bid adapter.

* Fix identation

* Fixes

* Fixes

* Fixes

* Spec fixes

* Fixes

* Fix urls

* Fix

* Fix parameters

* Fix space operators

* Fix bidder timeout

* Update

* Fix whitespace

* no message

* Outcon unit test

* no message

* no message

* no message

* no message

* Fixes

* Fixes

* Change url

* no message

* no message

* no message

* Added bidId

* no message

* no message

* no message

* no message

* Wrapping url with html

* no message

* no message

* no message

* Fix mediaTypes

* no message

* Update outconBidAdapter_spec.js

* Adding VAS response

* no message

* no message

* no message

* Fix

* Changed ttl

* no message

* supportedMediaTypes

* no message

* no message

* Change protocol to https

* no message

* adxcgBidAdapter prebid 3.0 requirements compatibility (prebid#4514)

* adxcgBidAdapter prebid 3.0 requirements compatibility

* Restarting CI test

* Add schain support for LockerDome adapter (prebid#4360)

* adxcgAnalyticsAdapter.js prebid 3.0 requirements compatibility (prebid#4515)

* adxcgAnalyticsAdapter.js prebid 3.0 requirements compatibility

* CI restart

* CI restart

* Updated docs

* Add britepool userid submodule (prebid#4314)

* * Added BritePool User ID Submodule

* * Refactor getId() and allow it to return a sync value from getter()

* * Pull only primaryBPID key out of hardened API response

* add check for decoded primaryBPID value and update readme

* * Added BritePool User ID Submodule

* * Refactor getId() and allow it to return a sync value from getter()

* * Pull only primaryBPID key out of hardened API response

* add check for decoded primaryBPID value and update readme

* update userId_spec.js tests

* update userId_spec.js tests and add britepoolIdSystem to submodules.json

* moved our module specific tests to own spec file

* * Update to use getId() with callback key
* Add test for our getId() returning value or callback

* * Revert comment to "Use existing cookie"

* add support for prebid server

* add comma back to submodules.json

* updating markdown for email address

* * Allow the britepool call without parameters (identifiers)

* fixed merging error of double ||

* * Fix the immediate value response to be in id key

* * Fixed test which was expecting id key

* * Touch

* * Update doc

* * Suggested changes to move britepoolIdSystem out of userId default

* * Change weird backticks to single quotes

* * Added functional identifiers

* PrebidServerBidAdapter CCPA (USP) Support (prebid#4501)

* PrebidServerBidAdapter CCPA Support

* making us privacy (ccpa) consent available to user syncs

* code cleanup

* fixed usp param name

* cedato adapter added additional req info (prebid#4508)

* RubiconBidAdapter: CCPA (USP) Support (prebid#4530)

* Add microadBidAdapter

* Remove unnecessary encodeURIComponent from microadBidAdapter

* Submit Advangelists Prebid Adapter

* Submit Advangelists Prebid Adapter 1.1

* Correct procudtion endpoint for prebid

* analytics update with wrapper name

* reverted error merge

* update changed default value of netRevenue to true

* Add support for CCPA to Rubicon Bid Adapter

* Update test names

* Encode us_privacy string on GET requests

* Update adxcgBidAdapter.md - moved sizes to mediaType.sizes (prebid#4526)

* CCPA additions (prebid#4502)

* CCPA additions

* Change config value from CCPA to USP and USP timer

* Require use of consentAPIs array

* Change requests

* Consistent naming

* Removed test for scenario we won't use for USP

* Removed non-iframe workflows and typo fix

* Reverting original modules to break out UPS

* USPAPI to there own files

* Seperate files for USPAPI CCPA

* Cleaning up comments

* CCPA consent added to adapterManager

* updated config treatment, fixed problems

* handling undefined gdpr config

* Fixed broken tests

* Removed lingering describe.only()

* Tests for new consent manager config structure

* Changed file import case from USP to Usp for CI

* Test new consent manager config

* url encoding usp privacy string

* improved tests

* remove usp url encoding from core

* JustPremium: Disable 'btm' requests (prebid#4511)

* PubMatic to support Britepool User ID (prebid#4532)

* added support for pubcommon, digitrust, id5id

* added support for IdentityLink

* changed the source for id5

* added unit test cases

* changed source param for identityLink

* PubMatic to support Britepool UID

* adding ccpa support for appnexus bid adapter (prebid#4531)

* Prebid 2.43.0 release

* increment pre version

* ucfunnelAnalyticsAdapter (prebid#4432)

* Add a new ucfunnel Adapter and test page

* Add a new ucfunnel Adapter and test page

* 1. Use prebid lib in the repo to keep updated
2. Replace var with let
3. Put JSON.parse(JSON.stringify()) into try catch block

* utils.getTopWindowLocation is a function

* Change to modules from adapters

* Migrate to module design

* [Dev Fix] Remove width and height which can be got from ad unit id

* Update ucfunnelBidAdapter to fit into new spec

* Correct the endpoint. Fix the error of query string

* Add test case for ucfunnelBidAdapter

* Fix lint error

* Update version number

* Combine all checks on bid request

* Add GDPR support for ucfunnel adapter

* Add in-stream video and native support for ucfunnel adapter

* Remove demo page. Add more test cases.

* Change request method from POST to GET

* Remove unnecessary comment

* Support vastXml and vastUrl for video request

* update TTL to 30 mins

* Avoid using arrow function which is not discuraged in mocha

* ucfunnel tdid support

* ucfunnel fix error message in debug mode

* Create ucfunnelAnalyticsAdapter.js

* [Dev Fix]add id

* Update ucfunnelAnalyticsAdapter.js

* Update ucfunnelAnalyticsAdapter.md

* add test

* Bug Fix and test passed

* ucfunnel adapter add bidfloor parameter (prebid#4495)

* Add a new ucfunnel Adapter and test page

* Add a new ucfunnel Adapter and test page

* 1. Use prebid lib in the repo to keep updated
2. Replace var with let
3. Put JSON.parse(JSON.stringify()) into try catch block

* utils.getTopWindowLocation is a function

* Change to modules from adapters

* Migrate to module design

* [Dev Fix] Remove width and height which can be got from ad unit id

* Update ucfunnelBidAdapter to fit into new spec

* Correct the endpoint. Fix the error of query string

* Add test case for ucfunnelBidAdapter

* Fix lint error

* Update version number

* Combine all checks on bid request

* Add GDPR support for ucfunnel adapter

* Add in-stream video and native support for ucfunnel adapter

* Remove demo page. Add more test cases.

* Change request method from POST to GET

* Remove unnecessary comment

* Support vastXml and vastUrl for video request

* update TTL to 30 mins

* Avoid using arrow function which is not discuraged in mocha

* ucfunnel tdid support

* ucfunnel fix error message in debug mode

* ucfunnel adapter add bidfloor parameter

* Added AstraOne adapter (prebid#4475)

* Added AstraOne adapter

* Fixed an argument in function createRenderer

* Added unit tests. Added example with GPT in the documentation. Removed bid renderer.

* Fixed a small typo

* PubMatic bid adapter to support CCPA/USP (prebid#4533)

* added support for pubcommon, digitrust, id5id

* added support for IdentityLink

* changed the source for id5

* added unit test cases

* changed source param for identityLink

* added CCPA/USP support in PubMatic adapter

* Update adxcgBidAdapter.js  - native fix (prebid#4534)

* Update adxcgBidAdapter.js  - native fix

* trigger CI

* trigger CI

* Code reformat and adding ending semicolons. No other changes

Reformatted the code in separate commit before real changes

* update adxcgBidAdapter_spec

general cleanup - removed duplicated jsons
added native size check
added many url querystring http call parameter checks

* trigger CI

* Added US Privacy support in TrustX Bid Adapter (prebid#4529)

* Add trustx adapter and tests for it

* update integration example

* Update trustx adapter

* Post-review fixes of Trustx adapter

* Code improvement for trustx adapter: changed default price type from gross to net

* Update TrustX adapter to support the 1.0 version

* Make requested changes for TrustX adapter

* Updated markdown file for TrustX adapter

* Fix TrustX adapter and spec file

* Update TrustX adapter: r parameter was added to ad request as cache buster

* Add support of gdpr to Trustx Bid Adapter

* Add wtimeout to ad request params for TrustX Bid Adapter

* TrustX Bid Adapter: remove last ampersand in the ad request

* Update TrustX Bid Adapter to support identical uids in parameters

* Update TrustX Bid Adapter to ignore bids that sizes do not match the size of the request

* Update TrustX Bid Adapter to support instream and outstream video

* Added wrapperType and wrapperVersion parameters in ad request for TrustX Bid Adapter

* Update TrustX Bid Adapter to use refererInfo instead depricated function utils.getTopWindowUrl

* HOTFIX for referrer encodind in TrustX Bid Adapter

* Fix test for TrustX Bid Adapter

* TrustX Bid Adapter: added keywords passing support

* TrustX Bid Adapter: added us_privacy parameter in bid request

* TrustX Bid Adapter: fix us_privacy parameter in bid request

* Trion interactive query param additions (prebid#4522)

* Adding files associated with the trion adapter update to the newest prebid version(1.0).

* Updating pull request with safer checks for user sync and general clean up/consistency of tests.

* removing a call to bidder code for pull request review.  also removing the test that requires it

* there were some changes to the bid factory after our initial release that we didn't account for.  Changing adapter to account for response body and required params.

* Revert "there were some changes to the bid factory after our initial release that we didn't account for.  Changing adapter to account for response body and required params."

This reverts commit 324d157.

* there were some changes to the bid factory after our initial release that we didn't account for.  Changing adapter to account for response body and required params.

* adding safety checks to Trion adapter

* Sending up to trion endpoint if there is bot traffic or the browser tab is not visible.

* sending the wrong param in the test.

* Trion test cleanup.  returning document and window states to their original form after tests.

* Trion test cleanup.  using before and after to alter window and document objects in tests.

* ShowHeroes Adapter - naming convention issue (prebid#4525)

* add ShowHeroes Adapter

* ShowHeroes adapter - expanded outstream support

* Revert "ShowHeroes adapter - expanded outstream support"

This reverts commit bfcdb91.

* ShowHeroes adapter - expanded outstream support

* ShowHeroes adapter - fixes (prebid#4222)

* ShowHeroes adapter - banner and outstream fixes (prebid#4222)

* ShowHeroes adapter - description and outstream changes (prebid#4222)

* ShowHeroes adapter - increase test coverage and small fix

* ShowHeroes Adapter - naming convention issue

* Adkernel: tmax support (prebid#4548)

* move uspDataHandler out of gdprDataHandler (prebid#4562)

* move uspDataHandler out of gdprDataHandler

* add missing semi-colon

* Rubicon bid adapter: fix netRev (prebid#4552)

* fix netRev

* adding comments and more tests

* RichAudience: Support userIDs + Prebid 3.0 (prebid#4504)

* Support userIDs + Prebid 3.0

* Fix bug in richAudienceBidAddapter_spec.js

* Fix bug pubCommonId

* Fix bug RichaudienceAdapter

* Fix UserID5

* Fix bug ID5 change Source for Value

* Fix bug richaudienceAdapter && Add userSync pixelEnabled

* Fix bug richaudienceAdapter

* CCPA and Schain support (prebid#4537)

* add video&native traffic colossus ssp

* Native obj validation

* Native obj validation #2

* Added size field in requests

* fixed test

* fix merge conflicts

* move to 3.0

* move to 3.0

* fix IE11 new URL issue

* fix IE11 new URL issue

* fix IE11 new URL issue

* https for 3.0

* add https test

* add ccp and schain features

* fix test

* sync with upstream, fix conflicts

* Update colossussspBidAdapter.js

remove commented code

* Update colossussspBidAdapter.js

lint fix

* Add support for CCPA consent in Criteo adapter

* Fix merge issues

* Fix New Line
  • Loading branch information
afewcc authored and jsnellbaker committed Dec 16, 2019
1 parent 4fada4b commit 78a05c5
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 1 deletion.
5 changes: 4 additions & 1 deletion modules/criteoBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import * as utils from '../src/utils';
import find from 'core-js/library/fn/array/find';
import { verify } from 'criteo-direct-rsa-validate/build/verify';

export const ADAPTER_VERSION = 24;
export const ADAPTER_VERSION = 25;
const BIDDER_CODE = 'criteo';
const CDB_ENDPOINT = 'https://bidder.criteo.com/cdb';
const CRITEO_VENDOR_ID = 91;
Expand Down Expand Up @@ -290,6 +290,9 @@ function buildCdbRequest(context, bidRequests, bidderRequest) {
request.gdprConsent.consentData = bidderRequest.gdprConsent.consentString;
}
}
if (bidderRequest && bidderRequest.uspConsent) {
request.user.uspIab = bidderRequest.uspConsent;
}
return request;
}

Expand Down
43 changes: 43 additions & 0 deletions test/spec/modules/criteoBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -553,6 +553,49 @@ describe('The Criteo bidding adapter', function () {
expect(ortbRequest.gdprConsent.consentGiven).to.equal(undefined);
});

it('should properly build a request with ccpa consent field', function () {
const bidRequests = [
{
bidder: 'criteo',
adUnitCode: 'bid-123',
transactionId: 'transaction-123',
sizes: [[728, 90]],
params: {
zoneId: 123,
},
},
];
const bidderRequest = {
timeout: 3000,
uspConsent: '1YNY',
};

const request = spec.buildRequests(bidRequests, bidderRequest);
expect(request.data.user).to.not.be.null;
expect(request.data.user.uspIab).to.equal('1YNY');
});

it('should properly build a request with if ccpa consent field is not provided', function () {
const bidRequests = [
{
bidder: 'criteo',
adUnitCode: 'bid-123',
transactionId: 'transaction-123',
sizes: [[728, 90]],
params: {
zoneId: 123,
},
},
];
const bidderRequest = {
timeout: 3000
};

const request = spec.buildRequests(bidRequests, bidderRequest);
expect(request.data.user).to.not.be.null;
expect(request.data.user.uspIab).to.equal(undefined);
});

it('should properly build a video request', function () {
const bidRequests = [
{
Expand Down

0 comments on commit 78a05c5

Please sign in to comment.