Skip to content

Commit

Permalink
Provide more data in Adhese bid response (prebid#5154)
Browse files Browse the repository at this point in the history
* Add support for bidderRequest.refererInfo in Adhese Adapter.

* Add support for bidderRequest.refererInfo in Adhese Adapter.

* Jira AD-2462 / add tlall is consent string is present

* Added 'adhese' attribute to bid that contains meta data - Jira AD-2642

* added DALE to adhese determination

* extra config option: no format, but use size array as format string

* Added more values to originData

* Revert "Added more values to originData"

This reverts commit 57f0033.

* Pulled Sander's changes & added more data to originData

* Adhese bid adapter - final version

Co-authored-by: Mateusz Michalowski <mateusz@adhese.eu>
Co-authored-by: Mateusz Michalowski <mateusz@michalowski.biz>
Co-authored-by: Tim Sturtewagen <tim@adhese.com>
Co-authored-by: Kim Van Crombrugge <kim@adhese.eu>
Co-authored-by: Sander <sander@adhese.eu>
  • Loading branch information
6 people authored and Jimmy Tu committed Jun 12, 2020
1 parent 509c18c commit 74d527e
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 4 deletions.
6 changes: 5 additions & 1 deletion modules/adheseBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -170,11 +170,15 @@ function getAdDetails(ad) {
if (isAdheseAd(ad)) {
creativeId = ad.id;
dealId = ad.orderId;
originData = { priority: ad.priority, orderProperty: ad.orderProperty, adFormat: ad.adFormat, adType: ad.adType, libId: ad.libId, adspaceId: ad.adspaceId, viewableImpressionCounter: ad.viewableImpressionCounter };
originData = { priority: ad.priority, orderProperty: ad.orderProperty, adFormat: ad.adFormat, adType: ad.adType, libId: ad.libId, adspaceId: ad.adspaceId, viewableImpressionCounter: ad.viewableImpressionCounter, slotId: ad.slotID, slotName: ad.slotName, advertiserId: ad.advertiserId, adId: ad.id };
} else {
creativeId = ad.origin + (ad.originInstance ? '-' + ad.originInstance : '');
if (ad.originData) {
originData = ad.originData;
originData.slotId = ad.slotID;
originData.slotName = ad.slotName;
originData.adType = ad.adType;
if (ad.adFormat) originData.adFormat = ad.adFormat;
if (ad.originData.seatbid && ad.originData.seatbid.length) {
const seatbid = ad.originData.seatbid[0];
if (seatbid.bid && seatbid.bid.length) {
Expand Down
18 changes: 15 additions & 3 deletions test/spec/modules/adheseBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ describe('AdheseAdapter', function () {
origin: 'APPNEXUS',
originInstance: '',
ext: 'js',
slotID: '10',
slotName: '_main_page_-leaderboard',
adType: 'leaderboard',
originData: {
Expand Down Expand Up @@ -155,12 +156,15 @@ describe('AdheseAdapter', function () {
ttl: TTL,
adhese: {
originData: {
adType: 'leaderboard',
seatbid: [
{
bid: [ { crid: '60613369', dealid: null } ],
seat: '958'
}
]
],
slotId: '10',
slotName: '_main_page_-leaderboard'
}
}
}];
Expand Down Expand Up @@ -249,12 +253,16 @@ describe('AdheseAdapter', function () {
adhese: {
originData: {
adFormat: 'largeleaderboard',
adId: '742898',
adType: 'largeleaderboard',
adspaceId: '162363',
libId: '90511',
orderProperty: undefined,
priority: undefined,
viewableImpressionCounter: undefined
viewableImpressionCounter: undefined,
slotId: '29306',
slotName: '_main_page_-leaderboard',
advertiserId: '2081'
}
},
cpm: 5.96,
Expand Down Expand Up @@ -304,12 +312,16 @@ describe('AdheseAdapter', function () {
adhese: {
originData: {
adFormat: '',
adId: '742470',
adType: 'preroll',
adspaceId: '164196',
libId: '89860',
orderProperty: undefined,
priority: undefined,
viewableImpressionCounter: undefined
viewableImpressionCounter: undefined,
slotId: '41711',
slotName: '_main_page_-leaderboard',
advertiserId: '2263',
}
},
cpm: 0,
Expand Down

0 comments on commit 74d527e

Please sign in to comment.