Skip to content

Commit

Permalink
Concert Bid Adapter : add dealId Property to Bid Responses (#11582)
Browse files Browse the repository at this point in the history
* 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 <antoin.campbell@voxmedia.com>
Co-authored-by: Antoin <antoinfive@gmail.com>
Co-authored-by: Sam Ghitelman <sam.ghitelman@voxmedia.com>
Co-authored-by: Sam Ghitelman <SGhitelman@gmail.com>
  • Loading branch information
5 people authored May 28, 2024
1 parent 6b446e6 commit 78f93cd
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
3 changes: 2 additions & 1 deletion modules/concertBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,8 @@ export const spec = {
meta: { advertiserDomains: bid && bid.adomain ? bid.adomain : [] },
creativeId: bid.creativeId,
netRevenue: bid.netRevenue,
currency: bid.currency
currency: bid.currency,
...(bid.dealid && { dealId: bid.dealid }),
};
});

Expand Down
16 changes: 16 additions & 0 deletions test/spec/modules/concertBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,22 @@ describe('ConcertAdapter', function () {
});
});

it('should include dealId when present in bidResponse', function() {
const bids = spec.interpretResponse({
body: {
bids: [
{ ...bidResponse.body.bids[0], dealid: 'CON-123' }
]
}
}, bidRequest);
expect(bids[0]).to.have.property('dealId');
});

it('should exclude dealId when absent in bidResponse', function() {
const bids = spec.interpretResponse(bidResponse, bidRequest);
expect(bids[0]).to.not.have.property('dealId');
});

it('should return empty bids if there is no response from server', function() {
const bids = spec.interpretResponse({ body: null }, bidRequest);
expect(bids).to.have.lengthOf(0);
Expand Down

0 comments on commit 78f93cd

Please sign in to comment.