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

Add advertiser ID for Index, OpenX and PubMatic #3322

Closed
wants to merge 3 commits into from
Closed
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
6 changes: 6 additions & 0 deletions modules/ixBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,12 @@ function parseBid(rawBid, currency) {
bid.netRevenue = NET_REVENUE;
bid.currency = currency;
bid.creativeId = rawBid.hasOwnProperty('crid') ? rawBid.crid : '-';
bid.ix = {
dspid: utils.deepAccess(rawBid, 'ext.dspid'),
advbrandid: utils.deepAccess(rawBid, 'ext.advbrandid'),
advbrand: utils.deepAccess(rawBid, 'ext.advbrand'),
adomain: rawBid.adomain
};

return bid;
}
Expand Down
3 changes: 3 additions & 0 deletions modules/openxBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,9 @@ function createBannerBidResponses(oxResponseObj, {bids, startTime}) {
bidResponse.tbd = adUnit.tbd;
}
bidResponse.ts = adUnit.ts;
bidResponse.openx = {
brand_id: adUnit.brand_id
};

bidResponses.push(bidResponse);

Expand Down
7 changes: 6 additions & 1 deletion modules/pubmaticBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -958,7 +958,12 @@ export const spec = {
netRevenue: NET_REVENUE,
ttl: 300,
referrer: parsedRequest.site && parsedRequest.site.ref ? parsedRequest.site.ref : '',
ad: bid.adm
ad: bid.adm,
pubmatic: {
dspid: utils.deepAccess(bid, 'ext.dspid'),
advid: utils.deepAccess(bid, 'ext.advid'),
adomain: bid.adomain,
}
};
if (parsedRequest.imp && parsedRequest.imp.length > 0) {
parsedRequest.imp.forEach(req => {
Expand Down
32 changes: 28 additions & 4 deletions test/spec/modules/ixBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,13 @@ describe('IndexexchangeAdapter', function () {
currency: 'USD',
ttl: 35,
netRevenue: true,
dealId: undefined
dealId: undefined,
ix: {
dspid: 50,
advbrandid: 303325,
advbrand: 'OECTA',
adomain: ['www.abc.com']
}
}
];
const result = spec.interpretResponse({ body: DEFAULT_BANNER_BID_RESPONSE });
Expand All @@ -445,7 +451,13 @@ describe('IndexexchangeAdapter', function () {
currency: 'USD',
ttl: 35,
netRevenue: true,
dealId: undefined
dealId: undefined,
ix: {
dspid: 50,
advbrandid: 303325,
advbrand: 'OECTA',
adomain: ['www.abc.com']
}
}
];
const result = spec.interpretResponse({ body: bidResponse });
Expand All @@ -466,7 +478,13 @@ describe('IndexexchangeAdapter', function () {
currency: 'JPY',
ttl: 35,
netRevenue: true,
dealId: undefined
dealId: undefined,
ix: {
dspid: 50,
advbrandid: 303325,
advbrand: 'OECTA',
adomain: ['www.abc.com']
}
}
];
const result = spec.interpretResponse({ body: bidResponse });
Expand All @@ -487,7 +505,13 @@ describe('IndexexchangeAdapter', function () {
currency: 'USD',
ttl: 35,
netRevenue: true,
dealId: 'deal'
dealId: 'deal',
ix: {
dspid: 50,
advbrandid: 303325,
advbrand: 'OECTA',
adomain: ['www.abc.com']
}
}
];
const result = spec.interpretResponse({ body: bidResponse });
Expand Down