Skip to content

Commit

Permalink
Add new ext field in bid Object (prebid#7138)
Browse files Browse the repository at this point in the history
  • Loading branch information
AurelienMozoo authored and agrandes-tappx committed Sep 29, 2021
1 parent a477b77 commit 06ab8f3
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 3 deletions.
1 change: 1 addition & 0 deletions modules/oguryBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ function interpretResponse(openRtbBidResponse) {
creativeId: bid.id,
netRevenue: true,
ttl: 60,
ext: bid.ext,
meta: {
advertiserDomains: bid.adomain
}
Expand Down
5 changes: 4 additions & 1 deletion modules/oguryBidAdapter.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,12 @@ Ogury bid adapter supports Banner media type.
params: {
assetKey: 'OGY-CA41D116484F',
adUnitId: '2c4d61d0-90aa-0139-0cda-0242ac120004'
xMargin?: 20
yMargin?: 20
gravity?: 'TOP_LEFT' || 'TOP_RIGHT' || 'BOTTOM_LEFT' || 'BOTTOM_RIGHT' || 'BOTTOM_CENTER' || 'TOP_CENTER' || 'CENTER'
}
}
]
}
];
```
```
30 changes: 28 additions & 2 deletions test/spec/modules/oguryBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ describe('OguryBidAdapter', function () {
params: {
assetKey: 'OGY-assetkey',
adUnitId: 'adunitId',
xMargin: 20,
yMarging: 20,
gravity: 'TOP_LEFT',
},
mediaTypes: {
banner: {
Expand Down Expand Up @@ -249,15 +252,36 @@ describe('OguryBidAdapter', function () {
nurl: 'url',
adm: `<html><head><title>test creative</title></head><body style="margin: 0;"><div><img style="width: 300px; height: 250px;" src="https://assets.afcdn.com/recipe/20190529/93153_w1024h768c1cx2220cy1728cxt0cyt0cxb4441cyb3456.jpg" alt="cookies" /></div></body></html>`,
adomain: ['renault.fr'],
w: 300,
h: 250
ext: {
adcontent: 'sample_creative',
advertid: '1a278c48-b79a-4bbf-b69f-3824803e7d87',
campaignid: '31724',
mediatype: 'image',
userid: 'ab4aabed-5230-49d9-9f1a-f06280d28366',
usersync: true,
advertiserid: '1',
isomidcompliant: false
},
w: 180,
h: 101
}, {
id: 'advertId2',
impid: 'bidId2',
price: 150,
nurl: 'url2',
adm: `<html><head><title>test creative</title></head><body style="margin: 0;"><div><img style="width: 600px; height: 500px;" src="https://assets.afcdn.com/recipe/20190529/93153_w1024h768c1cx2220cy1728cxt0cyt0cxb4441cyb3456.jpg" alt="cookies" /></div></body></html>`,
adomain: ['peugeot.fr'],
ext: {
adcontent: 'sample_creative',
advertid: '2a278c48-b79a-4bbf-b69f-3824803e7d87',
campaignid: '41724',
userid: 'bb4aabed-5230-49d9-9f1a-f06280d28366',
usersync: false,
advertiserid: '2',
isomidcompliant: true,
mediatype: 'image',
landingpageurl: 'https://ogury.com'
},
w: 600,
h: 500
}],
Expand All @@ -274,6 +298,7 @@ describe('OguryBidAdapter', function () {
height: openRtbBidResponse.body.seatbid[0].bid[0].h,
ad: openRtbBidResponse.body.seatbid[0].bid[0].adm,
ttl: 60,
ext: openRtbBidResponse.body.seatbid[0].bid[0].ext,
creativeId: openRtbBidResponse.body.seatbid[0].bid[0].id,
netRevenue: true,
meta: {
Expand All @@ -287,6 +312,7 @@ describe('OguryBidAdapter', function () {
height: openRtbBidResponse.body.seatbid[0].bid[1].h,
ad: openRtbBidResponse.body.seatbid[0].bid[1].adm,
ttl: 60,
ext: openRtbBidResponse.body.seatbid[0].bid[1].ext,
creativeId: openRtbBidResponse.body.seatbid[0].bid[1].id,
netRevenue: true,
meta: {
Expand Down

0 comments on commit 06ab8f3

Please sign in to comment.