Skip to content

Commit 78f93cd

Browse files
BrettBloxantoinfiveSkitelman
authored
Concert Bid Adapter : add dealId Property to Bid Responses (prebid#11582)
* collect EIDs for bid request * add ad slot positioning to payload * RPO-2012: Update local storage name-spacing for c_uid (#8) * Updates c_uid namespacing to be more specific for concert * fixes unit tests * remove console.log * RPO-2012: Add check for shared id (#9) * Adds check for sharedId * Updates cookie name * remove trailing comma * [RPO-3152] Enable Support for GPP Consent (#12) * Adds gpp consent integration to concert bid adapter * Update tests to check for gpp consent string param * removes user sync endpoint and tests * updates comment * cleans up consentAllowsPpid function * comment fix * rename variables for clarity * fixes conditional logic for consent allows function (#13) * [RPO-3262] Update getUid function to check for pubcid and sharedid (#14) * Update getUid function to check for pubcid and sharedid * updates adapter version * [RPO-3405] Add browserLanguage to request meta object * ConcertBidAdapter: Add TDID (#20) * Add tdid to meta object * Fix null handling and add tests * Concert Bid Adapter: Add dealId Property to Bid Responses (#22) * adds dealid property to bid responses * updates tests * use first bid for tests * adds dealid at the correct level --------- Co-authored-by: antoin <[email protected]> Co-authored-by: Antoin <[email protected]> Co-authored-by: Sam Ghitelman <[email protected]> Co-authored-by: Sam Ghitelman <[email protected]>
1 parent 6b446e6 commit 78f93cd

File tree

2 files changed

+18
-1
lines changed

2 files changed

+18
-1
lines changed

modules/concertBidAdapter.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,8 @@ export const spec = {
128128
meta: { advertiserDomains: bid && bid.adomain ? bid.adomain : [] },
129129
creativeId: bid.creativeId,
130130
netRevenue: bid.netRevenue,
131-
currency: bid.currency
131+
currency: bid.currency,
132+
...(bid.dealid && { dealId: bid.dealid }),
132133
};
133134
});
134135

test/spec/modules/concertBidAdapter_spec.js

+16
Original file line numberDiff line numberDiff line change
@@ -249,6 +249,22 @@ describe('ConcertAdapter', function () {
249249
});
250250
});
251251

252+
it('should include dealId when present in bidResponse', function() {
253+
const bids = spec.interpretResponse({
254+
body: {
255+
bids: [
256+
{ ...bidResponse.body.bids[0], dealid: 'CON-123' }
257+
]
258+
}
259+
}, bidRequest);
260+
expect(bids[0]).to.have.property('dealId');
261+
});
262+
263+
it('should exclude dealId when absent in bidResponse', function() {
264+
const bids = spec.interpretResponse(bidResponse, bidRequest);
265+
expect(bids[0]).to.not.have.property('dealId');
266+
});
267+
252268
it('should return empty bids if there is no response from server', function() {
253269
const bids = spec.interpretResponse({ body: null }, bidRequest);
254270
expect(bids).to.have.lengthOf(0);

0 commit comments

Comments
 (0)