Skip to content

Commit

Permalink
AdYouLike Bid Adapter : add pbjs version information (#9476)
Browse files Browse the repository at this point in the history
* add required clickurl in every native adrequest

* allows the native response to be given as is to prebid if possible

* add unit tests on new Native case

* Handle meta object in bid response with default addomains array

* fix icon retrieval in Native case

* Update priorities in case of multiple mediatypes given

* improve robustness and fix associated unit test on picture urls

* add support for params.size parameter

* add unit test on new size format

* Makes sure the playerSize format is consistent

* enable Vast response on bidder adapter

* fix lint errors

* add test on Vast format case

* add userId to bidrequest

* revert package-lock.json changes

* improve multiple mediatype handling

* Expose adyoulike GVL id

* fix icurl issue when retreiving icon for Native mediatype

* update unit tests on icon url in native mediatype

* target video endpoint when video mediatype is present

* add unit test on video endpoint

* detect if bid request has video

* remove console log

* Add size information in Video bid + unit tests

* Remove unused method (old video retrieval)

* update pagereferrer and pageUrl values

* improve null robustness in native getAssetValue

* change function body and add unit test

* fix pageUrl in case not given i ortb2

* adjust pageUrl and referrer values

* add unit tests on new priority behaviour

* add pbjsversion in bid request

* add unit test

---------

Co-authored-by: GuillaumeA <[email protected]>
  • Loading branch information
guiann and GuillaumeA authored Feb 1, 2023
1 parent fc5d014 commit be7bd91
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions modules/adyoulikeBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,8 @@ export const spec = {
payload.userId = createEidsArray(bidderRequest.userId);
}

payload.pbjs_version = '$prebid.version$';

const data = JSON.stringify(payload);
const options = {
withCredentials: true
Expand Down
3 changes: 3 additions & 0 deletions test/spec/modules/adyoulikeBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -722,6 +722,7 @@ describe('Adyoulike Adapter', function () {
expect(payload.Version).to.equal('1.0');
expect(payload.Bids['bid_id_0'].PlacementID).to.be.equal('placement_0');
expect(payload.PageRefreshed).to.equal(false);
expect(payload.pbjs_version).to.equal('$prebid.version$');
expect(payload.Bids['bid_id_0'].TransactionID).to.be.equal('bid_id_0_transaction_id');
});

Expand All @@ -736,6 +737,7 @@ describe('Adyoulike Adapter', function () {
expect(payload.Version).to.equal('1.0');
expect(payload.Bids['bid_id_0'].PlacementID).to.be.equal('placement_0');
expect(payload.PageRefreshed).to.equal(false);
expect(payload.pbjs_version).to.equal('$prebid.version$');
expect(payload.Bids['bid_id_0'].TransactionID).to.be.equal('bid_id_0_transaction_id');
});

Expand All @@ -758,6 +760,7 @@ describe('Adyoulike Adapter', function () {
expect(payload.Bids['bid_id_1'].TransactionID).to.be.equal('bid_id_1_transaction_id');
expect(payload.Bids['bid_id_3'].TransactionID).to.be.equal('bid_id_3_transaction_id');
expect(payload.PageRefreshed).to.equal(false);
expect(payload.pbjs_version).to.equal('$prebid.version$');
});

it('sends bid request to endpoint setted by parameters', function () {
Expand Down

0 comments on commit be7bd91

Please sign in to comment.