Skip to content

Commit

Permalink
appnexus bid adapter: add support for flocid (#6801)
Browse files Browse the repository at this point in the history
  • Loading branch information
jsnellbaker authored and idettman committed May 21, 2021
1 parent 952d02a commit e7d9c2c
Show file tree
Hide file tree
Showing 2 changed files with 11 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 @@ -244,6 +244,7 @@ export const spec = {
if (bidRequests[0].userId) {
let eids = [];

addUserId(eids, utils.deepAccess(bidRequests[0], `userId.flocId.id`), 'chrome.com', null);
addUserId(eids, utils.deepAccess(bidRequests[0], `userId.criteoId`), 'criteo.com', null);
addUserId(eids, utils.deepAccess(bidRequests[0], `userId.netId`), 'netid.de', null);
addUserId(eids, utils.deepAccess(bidRequests[0], `userId.idl_env`), 'liveramp.com', null);
Expand Down
11 changes: 10 additions & 1 deletion test/spec/modules/appnexusBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -875,7 +875,11 @@ describe('AppNexusAdapter', function () {
tdid: 'sample-userid',
criteoId: 'sample-criteo-userid',
netId: 'sample-netId-userid',
idl_env: 'sample-idl-userid'
idl_env: 'sample-idl-userid',
flocId: {
id: 'sample-flocid-value',
version: 'chrome.1.0'
}
}
});

Expand All @@ -892,6 +896,11 @@ describe('AppNexusAdapter', function () {
id: 'sample-criteo-userid',
});

expect(payload.eids).to.deep.include({
source: 'chrome.com',
id: 'sample-flocid-value'
});

expect(payload.eids).to.deep.include({
source: 'netid.de',
id: 'sample-netId-userid',
Expand Down

0 comments on commit e7d9c2c

Please sign in to comment.