Skip to content

Commit

Permalink
ucfunnel Bid Adapter: add support for FLoC and Verizon Media ConnectID (
Browse files Browse the repository at this point in the history
prebid#6744)

* 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

* ucfunnel adapter support CCPA

* ucfunnel adapter native support clicktrackers

* ucfunnel adapter change cookie sync setting

* ucfunnel adapter update request parameter

* Update ucfunnelBidAdapter

* ucfunnel adapter add currency in ad response

* ucfunnel adapter support uid2

* ucfunnel Bid Adapter: add support for FLoC and Verizon Media ConnectID

Co-authored-by: root <[email protected]>
Co-authored-by: Ryan Chou <[email protected]>
Co-authored-by: ucfunnel <[email protected]>
Co-authored-by: jack.hsieh <[email protected]>
  • Loading branch information
5 people authored and stsepelin committed May 28, 2021
1 parent 5dbe8cd commit 25e61b8
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 3 deletions.
17 changes: 16 additions & 1 deletion modules/ucfunnelBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,7 @@ function getRequestData(bid, bidderRequest) {
}

function addUserId(bidData, userId) {
bidData['eids'] = '';
utils._each(userId, (userIdObjectOrValue, userIdProviderKey) => {
switch (userIdProviderKey) {
case 'sharedid':
Expand Down Expand Up @@ -333,7 +334,21 @@ function addUserId(bidData, userId) {
break;
case 'uid2':
if (userIdObjectOrValue.id) {
bidData['eids'] = userIdProviderKey + ',' + userIdObjectOrValue.id
bidData['eids'] = (bidData['eids'].length > 0)
? (bidData['eids'] + '!' + userIdProviderKey + ',' + userIdObjectOrValue.id)
: (userIdProviderKey + ',' + userIdObjectOrValue.id);
}
break;
case 'connectid':
if (userIdObjectOrValue) {
bidData['eids'] = (bidData['eids'].length > 0)
? (bidData['eids'] + '!verizonMediaId,' + userIdObjectOrValue)
: ('verizonMediaId,' + userIdObjectOrValue);
}
break;
case 'flocId':
if (userIdObjectOrValue.id) {
bidData['cid'] = userIdObjectOrValue.id;
}
break;
default:
Expand Down
7 changes: 5 additions & 2 deletions test/spec/modules/ucfunnelBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ const userId = {
'sharedid': {'id': '01ESHXW4HD29KMF387T63JQ9H5', 'third': '01ESHXW4HD29KMF387T63JQ9H5'},
'tdid': 'D6885E90-2A7A-4E0F-87CB-7734ED1B99A3',
'haloId': {},
'uid2': {'id': 'eb33b0cb-8d35-4722-b9c0-1a31d4064888'}
'uid2': {'id': 'eb33b0cb-8d35-4722-b9c0-1a31d4064888'},
'flocId': {'id': '12144', 'version': 'chrome.1.1'},
'connectid': '4567'
}

const validBannerBidReq = {
Expand Down Expand Up @@ -159,7 +161,8 @@ describe('ucfunnel Adapter', function () {
expect(data.adid).to.equal('ad-34BBD2AA24B678BBFD4E7B9EE3B872D');
expect(data.w).to.equal(width);
expect(data.h).to.equal(height);
expect(data.eids).to.equal('uid2,eb33b0cb-8d35-4722-b9c0-1a31d4064888');
expect(data.eids).to.equal('uid2,eb33b0cb-8d35-4722-b9c0-1a31d4064888!verizonMediaId,4567');
expect(data.cid).to.equal('12144');
expect(data.schain).to.equal('1.0,1!exchange1.com,1234,1,bid-request-1,publisher,publisher.com');
});

Expand Down

0 comments on commit 25e61b8

Please sign in to comment.