Skip to content

Commit

Permalink
appnexus bid adapter: add support for uid2 (#6802)
Browse files Browse the repository at this point in the history
  • Loading branch information
jsnellbaker authored May 20, 2021
1 parent 8388dd3 commit 2e2b425
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
1 change: 1 addition & 0 deletions modules/appnexusBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,7 @@ export const spec = {
addUserId(eids, utils.deepAccess(bidRequests[0], `userId.netId`), 'netid.de', null);
addUserId(eids, utils.deepAccess(bidRequests[0], `userId.idl_env`), 'liveramp.com', null);
addUserId(eids, utils.deepAccess(bidRequests[0], `userId.tdid`), 'adserver.org', 'TDID');
addUserId(eids, utils.deepAccess(bidRequests[0], `userId.uid2.id`), 'uidapi.com', 'UID2');

if (eids.length) {
payload.eids = eids;
Expand Down
9 changes: 8 additions & 1 deletion test/spec/modules/appnexusBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -873,6 +873,7 @@ describe('AppNexusAdapter', function () {
const bidRequest = Object.assign({}, bidRequests[0], {
userId: {
tdid: 'sample-userid',
uid2: { id: 'sample-uid2-value' },
criteoId: 'sample-criteo-userid',
netId: 'sample-netId-userid',
idl_env: 'sample-idl-userid',
Expand Down Expand Up @@ -909,7 +910,13 @@ describe('AppNexusAdapter', function () {
expect(payload.eids).to.deep.include({
source: 'liveramp.com',
id: 'sample-idl-userid'
})
});

expect(payload.eids).to.deep.include({
source: 'uidapi.com',
id: 'sample-uid2-value',
rti_partner: 'UID2'
});
});

it('should populate iab_support object at the root level if omid support is detected', function () {
Expand Down

0 comments on commit 2e2b425

Please sign in to comment.