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

appnexusBidAdapter - add support for netId userID #6114

Merged
merged 1 commit into from
Jan 8, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions modules/appnexusBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,14 @@ export const spec = {
});
}

const netidId = utils.deepAccess(bidRequests[0], `userId.netId`);
if (netidId) {
eids.push({
source: 'netid.de',
id: netidId
});
}

const tdid = utils.deepAccess(bidRequests[0], `userId.tdid`);
if (tdid) {
eids.push({
Expand Down
10 changes: 8 additions & 2 deletions test/spec/modules/appnexusBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -808,11 +808,12 @@ describe('AppNexusAdapter', function () {
expect(request.options).to.deep.equal({withCredentials: false});
});

it('should populate eids when ttd id and criteo is available', function () {
it('should populate eids when supported userIds are available', function () {
const bidRequest = Object.assign({}, bidRequests[0], {
userId: {
tdid: 'sample-userid',
criteoId: 'sample-criteo-userid'
criteoId: 'sample-criteo-userid',
netId: 'sample-netId-userid'
}
});

Expand All @@ -828,6 +829,11 @@ describe('AppNexusAdapter', function () {
source: 'criteo.com',
id: 'sample-criteo-userid',
});

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

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