Skip to content

Commit d9513c7

Browse files
apykhteyevRuzannaAvetisyanapykhteyev
authored andcommitted
Limelight Digital Bid Adapter: added new custom fields for targeting (prebid#9436)
* Added new custom fields (#2) * Fixed integration * Fixes after review * Fixes after review --------- Co-authored-by: RuzannaAvetisyan <[email protected]> Co-authored-by: apykhteyev <[email protected]>
1 parent 466f144 commit d9513c7

File tree

3 files changed

+53
-8
lines changed

3 files changed

+53
-8
lines changed

modules/limelightDigitalBidAdapter.js

+6-1
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,12 @@ function buildPlacement(bidRequest) {
158158
type: bidRequest.params.adUnitType.toUpperCase(),
159159
publisherId: bidRequest.params.publisherId,
160160
userIdAsEids: bidRequest.userIdAsEids,
161-
supplyChain: bidRequest.schain
161+
supplyChain: bidRequest.schain,
162+
custom1: bidRequest.params.custom1,
163+
custom2: bidRequest.params.custom2,
164+
custom3: bidRequest.params.custom3,
165+
custom4: bidRequest.params.custom4,
166+
custom5: bidRequest.params.custom5
162167
}
163168
}
164169
}

modules/limelightDigitalBidAdapter.md

+12-2
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,12 @@ var adUnits = [{
2424
params: {
2525
host: 'exchange-9qao.ortb.net',
2626
adUnitId: 0,
27-
adUnitType: 'banner'
27+
adUnitType: 'banner',
28+
custom1: 'custom1',
29+
custom2: 'custom2',
30+
custom3: 'custom3',
31+
custom4: 'custom4',
32+
custom5: 'custom5'
2833
}
2934
}]
3035
}];
@@ -40,7 +45,12 @@ var videoAdUnit = [{
4045
params: {
4146
host: 'exchange-9qao.ortb.net',
4247
adUnitId: 0,
43-
adUnitType: 'video'
48+
adUnitType: 'video',
49+
custom1: 'custom1',
50+
custom2: 'custom2',
51+
custom3: 'custom3',
52+
custom4: 'custom4',
53+
custom5: 'custom5'
4454
}
4555
}]
4656
}];

test/spec/modules/limelightDigitalBidAdapter_spec.js

+35-5
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,12 @@ describe('limelightDigitalAdapter', function () {
1010
host: 'exchange.ortb.net',
1111
adUnitId: 123,
1212
adUnitType: 'banner',
13-
publisherId: 'perfectPublisher'
13+
publisherId: 'perfectPublisher',
14+
custom1: 'custom1',
15+
custom2: 'custom2',
16+
custom3: 'custom3',
17+
custom4: 'custom4',
18+
custom5: 'custom5'
1419
},
1520
placementCode: 'placement_0',
1621
auctionId: '74f78609-a92d-4cf1-869f-1b244bbfb5d2',
@@ -49,7 +54,12 @@ describe('limelightDigitalAdapter', function () {
4954
params: {
5055
host: 'ads.project-limelight.com',
5156
adUnitId: 456,
52-
adUnitType: 'banner'
57+
adUnitType: 'banner',
58+
custom1: 'custom1',
59+
custom2: 'custom2',
60+
custom3: 'custom3',
61+
custom4: 'custom4',
62+
custom5: 'custom5'
5363
},
5464
placementCode: 'placement_1',
5565
auctionId: '482f88de-29ab-45c8-981a-d25e39454a34',
@@ -90,7 +100,12 @@ describe('limelightDigitalAdapter', function () {
90100
host: 'exchange.ortb.net',
91101
adUnitId: 789,
92102
adUnitType: 'video',
93-
publisherId: 'secondPerfectPublisher'
103+
publisherId: 'secondPerfectPublisher',
104+
custom1: 'custom1',
105+
custom2: 'custom2',
106+
custom3: 'custom3',
107+
custom4: 'custom4',
108+
custom5: 'custom5'
94109
},
95110
placementCode: 'placement_2',
96111
auctionId: 'e4771143-6aa7-41ec-8824-ced4342c96c8',
@@ -128,7 +143,12 @@ describe('limelightDigitalAdapter', function () {
128143
params: {
129144
host: 'exchange.ortb.net',
130145
adUnitId: 789,
131-
adUnitType: 'video'
146+
adUnitType: 'video',
147+
custom1: 'custom1',
148+
custom2: 'custom2',
149+
custom3: 'custom3',
150+
custom4: 'custom4',
151+
custom5: 'custom5'
132152
},
133153
placementCode: 'placement_2',
134154
auctionId: 'e4771143-6aa7-41ec-8824-ced4342c96c8',
@@ -196,7 +216,12 @@ describe('limelightDigitalAdapter', function () {
196216
'transactionId',
197217
'publisherId',
198218
'userIdAsEids',
199-
'supplyChain'
219+
'supplyChain',
220+
'custom1',
221+
'custom2',
222+
'custom3',
223+
'custom4',
224+
'custom5'
200225
);
201226
expect(adUnit.id).to.be.a('number');
202227
expect(adUnit.bidId).to.be.a('string');
@@ -205,6 +230,11 @@ describe('limelightDigitalAdapter', function () {
205230
expect(adUnit.sizes).to.be.an('array');
206231
expect(adUnit.userIdAsEids).to.be.an('array');
207232
expect(adUnit.supplyChain).to.be.an('object');
233+
expect(adUnit.custom1).to.be.a('string');
234+
expect(adUnit.custom2).to.be.a('string');
235+
expect(adUnit.custom3).to.be.a('string');
236+
expect(adUnit.custom4).to.be.a('string');
237+
expect(adUnit.custom5).to.be.a('string');
208238
})
209239
})
210240
})

0 commit comments

Comments
 (0)