prebid.js 7.48.0 → 7.50.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -0
- package/dist/33acrossBidAdapter.js +1 -1
- package/dist/33acrossIdSystem.js +1 -1
- package/dist/adagioBidAdapter.js +1 -1
- package/dist/adbookpspBidAdapter.js +1 -1
- package/dist/adgenerationBidAdapter.js +1 -1
- package/dist/admixerBidAdapter.js +1 -1
- package/dist/adrelevantisBidAdapter.js +1 -1
- package/dist/adtrgtmeBidAdapter.js +1 -1
- package/dist/adxcgBidAdapter.js +1 -1
- package/dist/adyoulikeBidAdapter.js +1 -1
- package/dist/aidemBidAdapter.js +1 -1
- package/dist/ajaBidAdapter.js +1 -1
- package/dist/amxBidAdapter.js +1 -1
- package/dist/amxIdSystem.js +1 -1
- package/dist/appierAnalyticsAdapter.js +1 -1
- package/dist/appnexusBidAdapter.js +1 -1
- package/dist/asoBidAdapter.js +1 -1
- package/dist/axonixBidAdapter.js +1 -1
- package/dist/beopBidAdapter.js +1 -1
- package/dist/bidglassBidAdapter.js +1 -1
- package/dist/big-richmediaBidAdapter.js +1 -1
- package/dist/bridgewellBidAdapter.js +1 -1
- package/dist/brightMountainMediaBidAdapter.js +1 -1
- package/dist/carodaBidAdapter.js +1 -1
- package/dist/chtnwBidAdapter.js +1 -1
- package/dist/concertBidAdapter.js +1 -1
- package/dist/confiantRtdProvider.js +1 -1
- package/dist/connectadBidAdapter.js +1 -1
- package/dist/consumableBidAdapter.js +1 -1
- package/dist/conversantAnalyticsAdapter.js +1 -1
- package/dist/conversantBidAdapter.js +1 -1
- package/dist/craftBidAdapter.js +1 -1
- package/dist/criteoBidAdapter.js +1 -1
- package/dist/cwireBidAdapter.js +1 -1
- package/dist/dependencies.json +3 -0
- package/dist/dspxBidAdapter.js +1 -1
- package/dist/eplanningBidAdapter.js +1 -1
- package/dist/feedadBidAdapter.js +1 -1
- package/dist/finativeBidAdapter.js +1 -1
- package/dist/freewheel-sspBidAdapter.js +1 -1
- package/dist/glimpseBidAdapter.js +1 -1
- package/dist/gmosspBidAdapter.js +1 -1
- package/dist/goldbachBidAdapter.js +1 -1
- package/dist/greenbidsAnalyticsAdapter.js +1 -1
- package/dist/greenbidsRtdProvider.js +1 -1
- package/dist/gridBidAdapter.js +1 -1
- package/dist/gumgumBidAdapter.js +1 -1
- package/dist/h12mediaBidAdapter.js +1 -1
- package/dist/id5IdSystem.js +1 -1
- package/dist/improvedigitalBidAdapter.js +1 -1
- package/dist/inmarBidAdapter.js +1 -1
- package/dist/insticatorBidAdapter.js +1 -1
- package/dist/ixBidAdapter.js +1 -1
- package/dist/justpremiumBidAdapter.js +1 -1
- package/dist/kargoBidAdapter.js +1 -1
- package/dist/konduitAnalyticsAdapter.js +1 -1
- package/dist/kueezBidAdapter.js +1 -1
- package/dist/kueezRtbBidAdapter.js +1 -1
- package/dist/kulturemediaBidAdapter.js +1 -1
- package/dist/lassoBidAdapter.js +1 -1
- package/dist/lifestreetBidAdapter.js +1 -1
- package/dist/liveIntentIdSystem.js +1 -1
- package/dist/liveyieldAnalyticsAdapter.js +1 -1
- package/dist/logicadBidAdapter.js +1 -1
- package/dist/loglyliftBidAdapter.js +1 -1
- package/dist/magniteAnalyticsAdapter.js +1 -1
- package/dist/malltvAnalyticsAdapter.js +1 -1
- package/dist/marsmediaBidAdapter.js +1 -1
- package/dist/mediafuseBidAdapter.js +1 -1
- package/dist/mediasquareBidAdapter.js +1 -1
- package/dist/mgidBidAdapter.js +1 -1
- package/dist/minutemediaBidAdapter.js +1 -1
- package/dist/minutemediaplusBidAdapter.js +1 -1
- package/dist/nexx360BidAdapter.js +1 -1
- package/dist/not-for-prod/prebid.js +136 -134
- package/dist/oguryBidAdapter.js +1 -1
- package/dist/onetagBidAdapter.js +1 -1
- package/dist/ooloAnalyticsAdapter.js +1 -1
- package/dist/optidigitalBidAdapter.js +1 -1
- package/dist/outbrainBidAdapter.js +1 -1
- package/dist/parrableIdSystem.js +1 -1
- package/dist/permutiveRtdProvider.js +1 -1
- package/dist/pixfutureBidAdapter.js +1 -1
- package/dist/prebid-core.js +1 -1
- package/dist/prebidServerBidAdapter.js +1 -1
- package/dist/publinkIdSystem.js +1 -1
- package/dist/pubmaticAnalyticsAdapter.js +1 -1
- package/dist/pubmaticBidAdapter.js +1 -1
- package/dist/pubwiseAnalyticsAdapter.js +1 -1
- package/dist/pxyzBidAdapter.js +1 -1
- package/dist/quantcastBidAdapter.js +1 -1
- package/dist/readpeakBidAdapter.js +1 -1
- package/dist/relaidoBidAdapter.js +1 -1
- package/dist/retailspotBidAdapter.js +1 -0
- package/dist/rhythmoneBidAdapter.js +1 -1
- package/dist/riseBidAdapter.js +1 -1
- package/dist/rubiconAnalyticsAdapter.js +1 -1
- package/dist/rubiconBidAdapter.js +1 -1
- package/dist/seedingAllianceBidAdapter.js +1 -1
- package/dist/seedtagBidAdapter.js +1 -1
- package/dist/sharethroughAnalyticsAdapter.js +1 -1
- package/dist/sharethroughBidAdapter.js +1 -1
- package/dist/shinezBidAdapter.js +1 -1
- package/dist/silverpushBidAdapter.js +1 -0
- package/dist/smaatoBidAdapter.js +1 -1
- package/dist/smartadserverBidAdapter.js +1 -1
- package/dist/smartxBidAdapter.js +1 -1
- package/dist/smilewantedBidAdapter.js +1 -1
- package/dist/sonobiBidAdapter.js +1 -1
- package/dist/sovrnAnalyticsAdapter.js +1 -1
- package/dist/sovrnBidAdapter.js +1 -1
- package/dist/sspBCBidAdapter.js +1 -1
- package/dist/stvBidAdapter.js +1 -1
- package/dist/sublimeBidAdapter.js +1 -1
- package/dist/synacormediaBidAdapter.js +1 -1
- package/dist/targetVideoBidAdapter.js +1 -1
- package/dist/teadsBidAdapter.js +1 -1
- package/dist/trionBidAdapter.js +1 -1
- package/dist/tripleliftBidAdapter.js +1 -1
- package/dist/ttdBidAdapter.js +1 -1
- package/dist/ucfunnelAnalyticsAdapter.js +1 -1
- package/dist/uid2IdSystem.js +1 -1
- package/dist/underdogmediaBidAdapter.js +1 -1
- package/dist/undertoneBidAdapter.js +1 -1
- package/dist/vidazooBidAdapter.js +1 -1
- package/dist/video.js +1 -1
- package/dist/videoModule.js +1 -1
- package/dist/videobyteBidAdapter.js +1 -1
- package/dist/visxBidAdapter.js +1 -1
- package/dist/vuukleBidAdapter.js +1 -1
- package/dist/widespaceBidAdapter.js +1 -1
- package/dist/winrBidAdapter.js +1 -1
- package/dist/yahoosspBidAdapter.js +1 -1
- package/dist/yieldlabBidAdapter.js +1 -1
- package/dist/yieldmoBidAdapter.js +1 -1
- package/dist/yieldoneAnalyticsAdapter.js +1 -1
- package/integrationExamples/videoModule/eventsUI/eventsUI.css +205 -0
- package/integrationExamples/videoModule/eventsUI/eventsUI.js +181 -0
- package/integrationExamples/videoModule/jwplayer/eventsUI.html +295 -0
- package/integrationExamples/videoModule/videojs/eventsUI.html +319 -0
- package/libraries/video/shared/helpers.js +14 -0
- package/modules/33acrossBidAdapter.js +1 -1
- package/modules/adgenerationBidAdapter.js +24 -15
- package/modules/admixerBidAdapter.js +15 -9
- package/modules/aidemBidAdapter.js +3 -1
- package/modules/appnexusBidAdapter.js +1 -0
- package/modules/beopBidAdapter.js +1 -0
- package/modules/confiantRtdProvider.js +15 -12
- package/modules/conversantAnalyticsAdapter.js +7 -5
- package/modules/conversantBidAdapter.js +1 -1
- package/modules/criteoBidAdapter.js +17 -1
- package/modules/gridBidAdapter.js +3 -0
- package/modules/ixBidAdapter.js +65 -47
- package/modules/kueezRtbBidAdapter.js +30 -33
- package/modules/liveIntentIdSystem.js +8 -4
- package/modules/magniteAnalyticsAdapter.js +26 -3
- package/modules/mgidBidAdapter.js +9 -8
- package/modules/minutemediaBidAdapter.js +6 -0
- package/modules/minutemediaplusBidAdapter.js +30 -32
- package/modules/nexx360BidAdapter.js +2 -1
- package/modules/permutiveRtdProvider.js +9 -38
- package/modules/prebidServerBidAdapter/index.js +1 -3
- package/modules/prebidServerBidAdapter/ortbConverter.js +5 -1
- package/modules/pubmaticAnalyticsAdapter.js +3 -2
- package/modules/retailspotBidAdapter .md +32 -0
- package/modules/retailspotBidAdapter.js +186 -0
- package/modules/riseBidAdapter.js +6 -0
- package/modules/rubiconBidAdapter.js +6 -2
- package/modules/silverpushBidAdapter.js +326 -0
- package/modules/silverpushBidAdapter.md +107 -0
- package/modules/ttdBidAdapter.js +23 -22
- package/modules/underdogmediaBidAdapter.js +2 -2
- package/modules/vidazooBidAdapter.js +28 -32
- package/modules/videoModule/adQueue.js +2 -2
- package/modules/videoModule/index.js +9 -5
- package/modules/yahoosspBidAdapter.js +6 -0
- package/modules/yahoosspBidAdapter.md +37 -0
- package/modules/yieldlabBidAdapter.js +27 -5
- package/package.json +1 -1
- package/src/adapterManager.js +4 -0
- package/src/adapters/bidderFactory.js +1 -0
- package/src/auction.js +2 -0
- package/src/prebid.js +36 -12
- package/src/utils/cpm.js +4 -1
- package/test/spec/modules/33acrossBidAdapter_spec.js +4 -3
- package/test/spec/modules/adgenerationBidAdapter_spec.js +6 -6
- package/test/spec/modules/admixerBidAdapter_spec.js +64 -25
- package/test/spec/modules/aidemBidAdapter_spec.js +3 -0
- package/test/spec/modules/beopBidAdapter_spec.js +4 -0
- package/test/spec/modules/confiantRtdProvider_spec.js +4 -1
- package/test/spec/modules/conversantBidAdapter_spec.js +2 -1
- package/test/spec/modules/criteoBidAdapter_spec.js +109 -0
- package/test/spec/modules/gridBidAdapter_spec.js +3 -0
- package/test/spec/modules/ixBidAdapter_spec.js +66 -1
- package/test/spec/modules/kueezRtbBidAdapter_spec.js +3 -2
- package/test/spec/modules/liveIntentIdMinimalSystem_spec.js +28 -0
- package/test/spec/modules/liveIntentIdSystem_spec.js +45 -0
- package/test/spec/modules/magniteAnalyticsAdapter_spec.js +16 -36
- package/test/spec/modules/mass_spec.js +2 -0
- package/test/spec/modules/mgidBidAdapter_spec.js +9 -9
- package/test/spec/modules/minutemediaBidAdapter_spec.js +18 -0
- package/test/spec/modules/minutemediaplusBidAdapter_spec.js +3 -2
- package/test/spec/modules/permutiveRtdProvider_spec.js +0 -20
- package/test/spec/modules/prebidServerBidAdapter_spec.js +96 -1
- package/test/spec/modules/pubmaticAnalyticsAdapter_spec.js +6 -1
- package/test/spec/modules/retailspotBidAdapter_spec.js +426 -0
- package/test/spec/modules/riseBidAdapter_spec.js +18 -0
- package/test/spec/modules/rubiconBidAdapter_spec.js +143 -67
- package/test/spec/modules/silverpushBidAdapter_spec.js +394 -0
- package/test/spec/modules/ttdBidAdapter_spec.js +129 -2
- package/test/spec/modules/underdogmediaBidAdapter_spec.js +1 -1
- package/test/spec/modules/vidazooBidAdapter_spec.js +3 -2
- package/test/spec/modules/videoModule/shared/helpers_spec.js +22 -0
- package/test/spec/modules/yahoosspBidAdapter_spec.js +60 -1
- package/test/spec/modules/yieldlabBidAdapter_spec.js +8 -1
- package/test/spec/unit/core/bidderFactory_spec.js +9 -9
- package/test/spec/unit/pbjs_api_spec.js +59 -1
- package/test/spec/unit/utils/cpm_spec.js +56 -1
|
@@ -192,6 +192,7 @@ describe('the rubicon adapter', function () {
|
|
|
192
192
|
* @param {boolean} [gdprApplies]
|
|
193
193
|
*/
|
|
194
194
|
function createGdprBidderRequest(gdprApplies) {
|
|
195
|
+
const bidderRequest = getBidderRequest();
|
|
195
196
|
if (typeof gdprApplies === 'boolean') {
|
|
196
197
|
bidderRequest.gdprConsent = {
|
|
197
198
|
'consentString': 'BOJ/P2HOJ/P2HABABMAAAAAZ+A==',
|
|
@@ -202,15 +203,16 @@ describe('the rubicon adapter', function () {
|
|
|
202
203
|
'consentString': 'BOJ/P2HOJ/P2HABABMAAAAAZ+A=='
|
|
203
204
|
};
|
|
204
205
|
}
|
|
206
|
+
return bidderRequest;
|
|
205
207
|
}
|
|
206
208
|
|
|
207
|
-
function
|
|
209
|
+
function addUspToBidderRequest(bidderRequest) {
|
|
208
210
|
bidderRequest.uspConsent = '1NYN';
|
|
209
211
|
}
|
|
210
212
|
|
|
211
213
|
function createVideoBidderRequest() {
|
|
212
|
-
createGdprBidderRequest(true);
|
|
213
|
-
|
|
214
|
+
const bidderRequest = createGdprBidderRequest(true);
|
|
215
|
+
addUspToBidderRequest(bidderRequest);
|
|
214
216
|
|
|
215
217
|
let bid = bidderRequest.bids[0];
|
|
216
218
|
bid.mediaTypes = {
|
|
@@ -260,9 +262,10 @@ describe('the rubicon adapter', function () {
|
|
|
260
262
|
criteoId: '1111',
|
|
261
263
|
};
|
|
262
264
|
bid.userIdAsEids = createEidsArray(bid.userId);
|
|
265
|
+
return bidderRequest;
|
|
263
266
|
}
|
|
264
267
|
|
|
265
|
-
function
|
|
268
|
+
function removeVideoParamFromBidderRequest(bidderRequest) {
|
|
266
269
|
let bid = bidderRequest.bids[0];
|
|
267
270
|
bid.mediaTypes = {
|
|
268
271
|
video: {
|
|
@@ -273,7 +276,9 @@ describe('the rubicon adapter', function () {
|
|
|
273
276
|
}
|
|
274
277
|
|
|
275
278
|
function createVideoBidderRequestOutstream() {
|
|
279
|
+
const bidderRequest = createGdprBidderRequest(false);
|
|
276
280
|
let bid = bidderRequest.bids[0];
|
|
281
|
+
delete bid.sizes;
|
|
277
282
|
bid.mediaTypes = {
|
|
278
283
|
video: {
|
|
279
284
|
context: 'outstream',
|
|
@@ -291,17 +296,20 @@ describe('the rubicon adapter', function () {
|
|
|
291
296
|
protocols: [1, 2, 3, 4, 5, 6]
|
|
292
297
|
},
|
|
293
298
|
};
|
|
294
|
-
bid.params
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
299
|
+
bid.params = {
|
|
300
|
+
accountId: 14062,
|
|
301
|
+
siteId: 70608,
|
|
302
|
+
zoneId: 335918,
|
|
303
|
+
video: {
|
|
304
|
+
'language': 'en',
|
|
305
|
+
'skip': 1,
|
|
306
|
+
'skipafter': 15,
|
|
307
|
+
'playerHeight': 320,
|
|
308
|
+
'playerWidth': 640,
|
|
309
|
+
'size_id': 203
|
|
310
|
+
}
|
|
311
|
+
}
|
|
312
|
+
return bidderRequest;
|
|
305
313
|
}
|
|
306
314
|
|
|
307
315
|
beforeEach(function () {
|
|
@@ -744,7 +752,7 @@ describe('the rubicon adapter', function () {
|
|
|
744
752
|
|
|
745
753
|
describe('GDPR consent config', function () {
|
|
746
754
|
it('should send "gdpr" and "gdpr_consent", when gdprConsent defines consentString and gdprApplies', function () {
|
|
747
|
-
createGdprBidderRequest(true);
|
|
755
|
+
const bidderRequest = createGdprBidderRequest(true);
|
|
748
756
|
let [request] = spec.buildRequests(bidderRequest.bids, bidderRequest);
|
|
749
757
|
let data = parseQuery(request.data);
|
|
750
758
|
|
|
@@ -753,7 +761,7 @@ describe('the rubicon adapter', function () {
|
|
|
753
761
|
});
|
|
754
762
|
|
|
755
763
|
it('should send only "gdpr_consent", when gdprConsent defines only consentString', function () {
|
|
756
|
-
createGdprBidderRequest();
|
|
764
|
+
const bidderRequest = createGdprBidderRequest();
|
|
757
765
|
let [request] = spec.buildRequests(bidderRequest.bids, bidderRequest);
|
|
758
766
|
let data = parseQuery(request.data);
|
|
759
767
|
|
|
@@ -770,12 +778,12 @@ describe('the rubicon adapter', function () {
|
|
|
770
778
|
});
|
|
771
779
|
|
|
772
780
|
it('should set "gdpr" value as 1 or 0, using "gdprApplies" value of either true/false', function () {
|
|
773
|
-
createGdprBidderRequest(true);
|
|
781
|
+
let bidderRequest = createGdprBidderRequest(true);
|
|
774
782
|
let [request] = spec.buildRequests(bidderRequest.bids, bidderRequest);
|
|
775
783
|
let data = parseQuery(request.data);
|
|
776
784
|
expect(data['gdpr']).to.equal('1');
|
|
777
785
|
|
|
778
|
-
createGdprBidderRequest(false);
|
|
786
|
+
bidderRequest = createGdprBidderRequest(false);
|
|
779
787
|
[request] = spec.buildRequests(bidderRequest.bids, bidderRequest);
|
|
780
788
|
data = parseQuery(request.data);
|
|
781
789
|
expect(data['gdpr']).to.equal('0');
|
|
@@ -784,7 +792,7 @@ describe('the rubicon adapter', function () {
|
|
|
784
792
|
|
|
785
793
|
describe('USP Consent', function () {
|
|
786
794
|
it('should send us_privacy if bidderRequest has a value for uspConsent', function () {
|
|
787
|
-
|
|
795
|
+
addUspToBidderRequest(bidderRequest);
|
|
788
796
|
let [request] = spec.buildRequests(bidderRequest.bids, bidderRequest);
|
|
789
797
|
let data = parseQuery(request.data);
|
|
790
798
|
|
|
@@ -1542,7 +1550,7 @@ describe('the rubicon adapter', function () {
|
|
|
1542
1550
|
if (FEATURES.VIDEO) {
|
|
1543
1551
|
describe('for video requests', function () {
|
|
1544
1552
|
it('should make a well-formed video request', function () {
|
|
1545
|
-
createVideoBidderRequest();
|
|
1553
|
+
const bidderRequest = createVideoBidderRequest();
|
|
1546
1554
|
|
|
1547
1555
|
sandbox.stub(Date, 'now').callsFake(() =>
|
|
1548
1556
|
bidderRequest.auctionStart + 100
|
|
@@ -1628,7 +1636,7 @@ describe('the rubicon adapter', function () {
|
|
|
1628
1636
|
});
|
|
1629
1637
|
|
|
1630
1638
|
it('should add ortb values to video requests', function () {
|
|
1631
|
-
createVideoBidderRequest();
|
|
1639
|
+
const bidderRequest = createVideoBidderRequest();
|
|
1632
1640
|
|
|
1633
1641
|
sandbox.stub(Date, 'now').callsFake(() =>
|
|
1634
1642
|
bidderRequest.auctionStart + 100
|
|
@@ -1661,7 +1669,7 @@ describe('the rubicon adapter', function () {
|
|
|
1661
1669
|
});
|
|
1662
1670
|
|
|
1663
1671
|
it('should correctly set bidfloor on imp when getfloor in scope', function () {
|
|
1664
|
-
createVideoBidderRequest();
|
|
1672
|
+
const bidderRequest = createVideoBidderRequest();
|
|
1665
1673
|
// default getFloor response is empty object so should not break and not send hard_floor
|
|
1666
1674
|
bidderRequest.bids[0].getFloor = () => getFloorResponse;
|
|
1667
1675
|
sinon.spy(bidderRequest.bids[0], 'getFloor');
|
|
@@ -1706,7 +1714,7 @@ describe('the rubicon adapter', function () {
|
|
|
1706
1714
|
});
|
|
1707
1715
|
|
|
1708
1716
|
it('should continue with auction if getFloor throws error', function () {
|
|
1709
|
-
createVideoBidderRequest();
|
|
1717
|
+
const bidderRequest = createVideoBidderRequest();
|
|
1710
1718
|
// default getFloor response is empty object so should not break and not send hard_floor
|
|
1711
1719
|
bidderRequest.bids[0].getFloor = () => {
|
|
1712
1720
|
throw new Error('An exception!');
|
|
@@ -1727,7 +1735,7 @@ describe('the rubicon adapter', function () {
|
|
|
1727
1735
|
});
|
|
1728
1736
|
|
|
1729
1737
|
it('should add alias name to PBS Request', function () {
|
|
1730
|
-
createVideoBidderRequest();
|
|
1738
|
+
const bidderRequest = createVideoBidderRequest();
|
|
1731
1739
|
adapterManager.aliasRegistry['superRubicon'] = 'rubicon';
|
|
1732
1740
|
bidderRequest.bidderCode = 'superRubicon';
|
|
1733
1741
|
bidderRequest.bids[0].bidder = 'superRubicon';
|
|
@@ -1743,7 +1751,7 @@ describe('the rubicon adapter', function () {
|
|
|
1743
1751
|
});
|
|
1744
1752
|
|
|
1745
1753
|
it('should add floors flag correctly to PBS Request', function () {
|
|
1746
|
-
createVideoBidderRequest();
|
|
1754
|
+
const bidderRequest = createVideoBidderRequest();
|
|
1747
1755
|
let [request] = spec.buildRequests(bidderRequest.bids, bidderRequest);
|
|
1748
1756
|
|
|
1749
1757
|
// should not pass if undefined
|
|
@@ -1759,7 +1767,7 @@ describe('the rubicon adapter', function () {
|
|
|
1759
1767
|
});
|
|
1760
1768
|
|
|
1761
1769
|
it('should add multibid configuration to PBS Request', function () {
|
|
1762
|
-
createVideoBidderRequest();
|
|
1770
|
+
const bidderRequest = createVideoBidderRequest();
|
|
1763
1771
|
|
|
1764
1772
|
const multibid = [{
|
|
1765
1773
|
bidder: 'bidderA',
|
|
@@ -1786,7 +1794,7 @@ describe('the rubicon adapter', function () {
|
|
|
1786
1794
|
});
|
|
1787
1795
|
|
|
1788
1796
|
it('should pass client analytics to PBS endpoint if all modules included', function () {
|
|
1789
|
-
createVideoBidderRequest();
|
|
1797
|
+
const bidderRequest = createVideoBidderRequest();
|
|
1790
1798
|
$$PREBID_GLOBAL$$.installedModules = [];
|
|
1791
1799
|
let [request] = spec.buildRequests(bidderRequest.bids, bidderRequest);
|
|
1792
1800
|
let payload = request.data;
|
|
@@ -1796,7 +1804,7 @@ describe('the rubicon adapter', function () {
|
|
|
1796
1804
|
});
|
|
1797
1805
|
|
|
1798
1806
|
it('should pass client analytics to PBS endpoint if rubicon analytics adapter is included', function () {
|
|
1799
|
-
createVideoBidderRequest();
|
|
1807
|
+
const bidderRequest = createVideoBidderRequest();
|
|
1800
1808
|
$$PREBID_GLOBAL$$.installedModules = ['rubiconBidAdapter', 'rubiconAnalyticsAdapter'];
|
|
1801
1809
|
let [request] = spec.buildRequests(bidderRequest.bids, bidderRequest);
|
|
1802
1810
|
let payload = request.data;
|
|
@@ -1806,7 +1814,7 @@ describe('the rubicon adapter', function () {
|
|
|
1806
1814
|
});
|
|
1807
1815
|
|
|
1808
1816
|
it('should not pass client analytics to PBS endpoint if rubicon analytics adapter is not included', function () {
|
|
1809
|
-
createVideoBidderRequest();
|
|
1817
|
+
const bidderRequest = createVideoBidderRequest();
|
|
1810
1818
|
$$PREBID_GLOBAL$$.installedModules = ['rubiconBidAdapter'];
|
|
1811
1819
|
let [request] = spec.buildRequests(bidderRequest.bids, bidderRequest);
|
|
1812
1820
|
let payload = request.data;
|
|
@@ -1815,7 +1823,7 @@ describe('the rubicon adapter', function () {
|
|
|
1815
1823
|
});
|
|
1816
1824
|
|
|
1817
1825
|
it('should send video exp param correctly when set', function () {
|
|
1818
|
-
createVideoBidderRequest();
|
|
1826
|
+
const bidderRequest = createVideoBidderRequest();
|
|
1819
1827
|
config.setConfig({s2sConfig: {defaultTtl: 600}});
|
|
1820
1828
|
let [request] = spec.buildRequests(bidderRequest.bids, bidderRequest);
|
|
1821
1829
|
let post = request.data;
|
|
@@ -1826,7 +1834,7 @@ describe('the rubicon adapter', function () {
|
|
|
1826
1834
|
});
|
|
1827
1835
|
|
|
1828
1836
|
it('should not send video exp at all if not set in s2sConfig config', function () {
|
|
1829
|
-
createVideoBidderRequest();
|
|
1837
|
+
const bidderRequest = createVideoBidderRequest();
|
|
1830
1838
|
let [request] = spec.buildRequests(bidderRequest.bids, bidderRequest);
|
|
1831
1839
|
let post = request.data;
|
|
1832
1840
|
|
|
@@ -1837,7 +1845,7 @@ describe('the rubicon adapter', function () {
|
|
|
1837
1845
|
});
|
|
1838
1846
|
|
|
1839
1847
|
it('should send tmax as the bidderRequest timeout value', function () {
|
|
1840
|
-
createVideoBidderRequest();
|
|
1848
|
+
const bidderRequest = createVideoBidderRequest();
|
|
1841
1849
|
bidderRequest.timeout = 3333;
|
|
1842
1850
|
let [request] = spec.buildRequests(bidderRequest.bids, bidderRequest);
|
|
1843
1851
|
let post = request.data;
|
|
@@ -1845,7 +1853,7 @@ describe('the rubicon adapter', function () {
|
|
|
1845
1853
|
});
|
|
1846
1854
|
|
|
1847
1855
|
it('should send correct bidfloor to PBS', function () {
|
|
1848
|
-
createVideoBidderRequest();
|
|
1856
|
+
const bidderRequest = createVideoBidderRequest();
|
|
1849
1857
|
|
|
1850
1858
|
bidderRequest.bids[0].params.floor = 0.1;
|
|
1851
1859
|
let [request] = spec.buildRequests(bidderRequest.bids, bidderRequest);
|
|
@@ -1873,7 +1881,7 @@ describe('the rubicon adapter', function () {
|
|
|
1873
1881
|
});
|
|
1874
1882
|
|
|
1875
1883
|
it('should send request with proper ad position', function () {
|
|
1876
|
-
createVideoBidderRequest();
|
|
1884
|
+
const bidderRequest = createVideoBidderRequest();
|
|
1877
1885
|
let positionBidderRequest = utils.deepClone(bidderRequest);
|
|
1878
1886
|
positionBidderRequest.bids[0].mediaTypes.video.pos = 1;
|
|
1879
1887
|
let [request] = spec.buildRequests(positionBidderRequest.bids, positionBidderRequest);
|
|
@@ -1943,7 +1951,7 @@ describe('the rubicon adapter', function () {
|
|
|
1943
1951
|
});
|
|
1944
1952
|
|
|
1945
1953
|
it('should enforce the new required mediaTypes.video params', function () {
|
|
1946
|
-
createVideoBidderRequest();
|
|
1954
|
+
let bidderRequest = createVideoBidderRequest();
|
|
1947
1955
|
|
|
1948
1956
|
sandbox.stub(Date, 'now').callsFake(() =>
|
|
1949
1957
|
bidderRequest.auctionStart + 100
|
|
@@ -1952,48 +1960,48 @@ describe('the rubicon adapter', function () {
|
|
|
1952
1960
|
expect(spec.isBidRequestValid(bidderRequest.bids[0])).to.equal(true);
|
|
1953
1961
|
|
|
1954
1962
|
// change mimes to a non array, no good
|
|
1955
|
-
createVideoBidderRequest();
|
|
1963
|
+
bidderRequest = createVideoBidderRequest();
|
|
1956
1964
|
bidderRequest.bids[0].mediaTypes.video.mimes = 'video/mp4';
|
|
1957
1965
|
expect(spec.isBidRequestValid(bidderRequest.bids[0])).to.equal(false);
|
|
1958
1966
|
|
|
1959
1967
|
// delete mimes, no good
|
|
1960
|
-
createVideoBidderRequest();
|
|
1968
|
+
bidderRequest = createVideoBidderRequest();
|
|
1961
1969
|
delete bidderRequest.bids[0].mediaTypes.video.mimes;
|
|
1962
1970
|
expect(spec.isBidRequestValid(bidderRequest.bids[0])).to.equal(false);
|
|
1963
1971
|
|
|
1964
1972
|
// change protocols to an int not array of ints, no good
|
|
1965
|
-
createVideoBidderRequest();
|
|
1973
|
+
bidderRequest = createVideoBidderRequest();
|
|
1966
1974
|
bidderRequest.bids[0].mediaTypes.video.protocols = 1;
|
|
1967
1975
|
expect(spec.isBidRequestValid(bidderRequest.bids[0])).to.equal(false);
|
|
1968
1976
|
|
|
1969
1977
|
// delete protocols, no good
|
|
1970
|
-
createVideoBidderRequest();
|
|
1978
|
+
bidderRequest = createVideoBidderRequest();
|
|
1971
1979
|
delete bidderRequest.bids[0].mediaTypes.video.protocols;
|
|
1972
1980
|
expect(spec.isBidRequestValid(bidderRequest.bids[0])).to.equal(false);
|
|
1973
1981
|
|
|
1974
1982
|
// change linearity to an string, no good
|
|
1975
|
-
createVideoBidderRequest();
|
|
1983
|
+
bidderRequest = createVideoBidderRequest();
|
|
1976
1984
|
bidderRequest.bids[0].mediaTypes.video.linearity = 'string';
|
|
1977
1985
|
expect(spec.isBidRequestValid(bidderRequest.bids[0])).to.equal(false);
|
|
1978
1986
|
|
|
1979
1987
|
// delete linearity, no good
|
|
1980
|
-
createVideoBidderRequest();
|
|
1988
|
+
bidderRequest = createVideoBidderRequest();
|
|
1981
1989
|
delete bidderRequest.bids[0].mediaTypes.video.linearity;
|
|
1982
1990
|
expect(spec.isBidRequestValid(bidderRequest.bids[0])).to.equal(false);
|
|
1983
1991
|
|
|
1984
1992
|
// change api to an string, no good
|
|
1985
|
-
createVideoBidderRequest();
|
|
1993
|
+
bidderRequest = createVideoBidderRequest();
|
|
1986
1994
|
bidderRequest.bids[0].mediaTypes.video.api = 'string';
|
|
1987
1995
|
expect(spec.isBidRequestValid(bidderRequest.bids[0])).to.equal(false);
|
|
1988
1996
|
|
|
1989
1997
|
// delete api, no good
|
|
1990
|
-
createVideoBidderRequest();
|
|
1998
|
+
bidderRequest = createVideoBidderRequest();
|
|
1991
1999
|
delete bidderRequest.bids[0].mediaTypes.video.api;
|
|
1992
2000
|
expect(spec.isBidRequestValid(bidderRequest.bids[0])).to.equal(false);
|
|
1993
2001
|
});
|
|
1994
2002
|
|
|
1995
2003
|
it('bid request is valid when video context is outstream', function () {
|
|
1996
|
-
createVideoBidderRequestOutstream();
|
|
2004
|
+
const bidderRequest = createVideoBidderRequestOutstream();
|
|
1997
2005
|
sandbox.stub(Date, 'now').callsFake(() =>
|
|
1998
2006
|
bidderRequest.auctionStart + 100
|
|
1999
2007
|
);
|
|
@@ -2035,7 +2043,7 @@ describe('the rubicon adapter', function () {
|
|
|
2035
2043
|
});
|
|
2036
2044
|
|
|
2037
2045
|
it('should send request as banner when invalid video bid in multiple mediaType bidRequest', function () {
|
|
2038
|
-
|
|
2046
|
+
removeVideoParamFromBidderRequest(bidderRequest);
|
|
2039
2047
|
|
|
2040
2048
|
let bid = bidderRequest.bids[0];
|
|
2041
2049
|
bid.mediaTypes.banner = {
|
|
@@ -2054,7 +2062,7 @@ describe('the rubicon adapter', function () {
|
|
|
2054
2062
|
});
|
|
2055
2063
|
|
|
2056
2064
|
it('should include coppa flag in video bid request', () => {
|
|
2057
|
-
createVideoBidderRequest();
|
|
2065
|
+
const bidderRequest = createVideoBidderRequest();
|
|
2058
2066
|
|
|
2059
2067
|
sandbox.stub(Date, 'now').callsFake(() =>
|
|
2060
2068
|
bidderRequest.auctionStart + 100
|
|
@@ -2071,7 +2079,7 @@ describe('the rubicon adapter', function () {
|
|
|
2071
2079
|
});
|
|
2072
2080
|
|
|
2073
2081
|
it('should include first party data', () => {
|
|
2074
|
-
createVideoBidderRequest();
|
|
2082
|
+
const bidderRequest = createVideoBidderRequest();
|
|
2075
2083
|
|
|
2076
2084
|
const site = {
|
|
2077
2085
|
ext: {
|
|
@@ -2123,7 +2131,7 @@ describe('the rubicon adapter', function () {
|
|
|
2123
2131
|
});
|
|
2124
2132
|
|
|
2125
2133
|
it('should include pbadslot in bid request', function () {
|
|
2126
|
-
createVideoBidderRequest();
|
|
2134
|
+
const bidderRequest = createVideoBidderRequest();
|
|
2127
2135
|
bidderRequest.bids[0].ortb2Imp = {
|
|
2128
2136
|
ext: {
|
|
2129
2137
|
data: {
|
|
@@ -2141,7 +2149,7 @@ describe('the rubicon adapter', function () {
|
|
|
2141
2149
|
});
|
|
2142
2150
|
|
|
2143
2151
|
it('should NOT include storedrequests in pbs payload', function () {
|
|
2144
|
-
createVideoBidderRequest();
|
|
2152
|
+
const bidderRequest = createVideoBidderRequest();
|
|
2145
2153
|
bidderRequest.bids[0].ortb2 = {
|
|
2146
2154
|
ext: {
|
|
2147
2155
|
prebid: {
|
|
@@ -2168,7 +2176,7 @@ describe('the rubicon adapter', function () {
|
|
|
2168
2176
|
});
|
|
2169
2177
|
|
|
2170
2178
|
it('should include GAM ad unit in bid request', function () {
|
|
2171
|
-
createVideoBidderRequest();
|
|
2179
|
+
const bidderRequest = createVideoBidderRequest();
|
|
2172
2180
|
bidderRequest.bids[0].ortb2Imp = {
|
|
2173
2181
|
ext: {
|
|
2174
2182
|
data: {
|
|
@@ -2190,7 +2198,7 @@ describe('the rubicon adapter', function () {
|
|
|
2190
2198
|
});
|
|
2191
2199
|
|
|
2192
2200
|
it('should use the integration type provided in the config instead of the default', () => {
|
|
2193
|
-
createVideoBidderRequest();
|
|
2201
|
+
const bidderRequest = createVideoBidderRequest();
|
|
2194
2202
|
config.setConfig({rubicon: {int_type: 'testType'}});
|
|
2195
2203
|
const [request] = spec.buildRequests(bidderRequest.bids, bidderRequest);
|
|
2196
2204
|
expect(request.data.ext.prebid.bidders.rubicon.integration).to.equal('testType');
|
|
@@ -2198,7 +2206,7 @@ describe('the rubicon adapter', function () {
|
|
|
2198
2206
|
|
|
2199
2207
|
it('should pass the user.id provided in the config', function () {
|
|
2200
2208
|
config.setConfig({user: {id: '123'}});
|
|
2201
|
-
createVideoBidderRequest();
|
|
2209
|
+
const bidderRequest = createVideoBidderRequest();
|
|
2202
2210
|
|
|
2203
2211
|
sandbox.stub(Date, 'now').callsFake(() =>
|
|
2204
2212
|
bidderRequest.auctionStart + 100
|
|
@@ -2321,13 +2329,13 @@ describe('the rubicon adapter', function () {
|
|
|
2321
2329
|
|
|
2322
2330
|
describe('classifiedAsVideo', function () {
|
|
2323
2331
|
it('should return true if mediaTypes is video', function () {
|
|
2324
|
-
createVideoBidderRequest();
|
|
2332
|
+
const bidderRequest = createVideoBidderRequest();
|
|
2325
2333
|
const bidClassifiedAsVideo = classifiedAsVideo(bidderRequest.bids[0]);
|
|
2326
2334
|
expect(bidClassifiedAsVideo).is.equal(true);
|
|
2327
2335
|
});
|
|
2328
2336
|
|
|
2329
2337
|
it('should return false if trying to use legacy mediaType with video', function () {
|
|
2330
|
-
createVideoBidderRequest();
|
|
2338
|
+
const bidderRequest = createVideoBidderRequest();
|
|
2331
2339
|
delete bidderRequest.bids[0].mediaTypes;
|
|
2332
2340
|
bidderRequest.bids[0].mediaType = 'video';
|
|
2333
2341
|
const legacyVideoTypeBidRequest = classifiedAsVideo(bidderRequest.bids[0]);
|
|
@@ -2345,13 +2353,13 @@ describe('the rubicon adapter', function () {
|
|
|
2345
2353
|
});
|
|
2346
2354
|
|
|
2347
2355
|
it('Should return false if both banner and video mediaTypes are set and params.video is not an object', function () {
|
|
2348
|
-
|
|
2356
|
+
removeVideoParamFromBidderRequest(bidderRequest);
|
|
2349
2357
|
let bid = bidderRequest.bids[0];
|
|
2350
2358
|
bid.mediaTypes.banner = {flag: true};
|
|
2351
2359
|
expect(classifiedAsVideo(bid)).to.equal(false);
|
|
2352
2360
|
});
|
|
2353
2361
|
it('Should return true if both banner and video mediaTypes are set and params.video is an object', function () {
|
|
2354
|
-
|
|
2362
|
+
removeVideoParamFromBidderRequest(bidderRequest);
|
|
2355
2363
|
let bid = bidderRequest.bids[0];
|
|
2356
2364
|
bid.mediaTypes.banner = {flag: true};
|
|
2357
2365
|
bid.params.video = {};
|
|
@@ -2359,7 +2367,7 @@ describe('the rubicon adapter', function () {
|
|
|
2359
2367
|
});
|
|
2360
2368
|
|
|
2361
2369
|
it('Should return true and create a params.video object if one is not already present', function () {
|
|
2362
|
-
|
|
2370
|
+
removeVideoParamFromBidderRequest(bidderRequest);
|
|
2363
2371
|
let bid = bidderRequest.bids[0]
|
|
2364
2372
|
expect(classifiedAsVideo(bid)).to.equal(true);
|
|
2365
2373
|
expect(bid.params.video).to.not.be.undefined;
|
|
@@ -3213,11 +3221,8 @@ describe('the rubicon adapter', function () {
|
|
|
3213
3221
|
|
|
3214
3222
|
if (FEATURES.VIDEO) {
|
|
3215
3223
|
describe('for video', function () {
|
|
3216
|
-
beforeEach(function () {
|
|
3217
|
-
createVideoBidderRequest();
|
|
3218
|
-
});
|
|
3219
|
-
|
|
3220
3224
|
it('should register a successful bid', function () {
|
|
3225
|
+
const bidderRequest = createVideoBidderRequest();
|
|
3221
3226
|
let response = {
|
|
3222
3227
|
cur: 'USD',
|
|
3223
3228
|
seatbid: [{
|
|
@@ -3288,7 +3293,6 @@ describe('the rubicon adapter', function () {
|
|
|
3288
3293
|
describe('for outstream video', function () {
|
|
3289
3294
|
const sandbox = sinon.createSandbox();
|
|
3290
3295
|
beforeEach(function () {
|
|
3291
|
-
createVideoBidderRequestOutstream();
|
|
3292
3296
|
config.setConfig({rubicon: {
|
|
3293
3297
|
rendererConfig: {
|
|
3294
3298
|
align: 'left',
|
|
@@ -3309,6 +3313,7 @@ describe('the rubicon adapter', function () {
|
|
|
3309
3313
|
});
|
|
3310
3314
|
|
|
3311
3315
|
it('should register a successful bid', function () {
|
|
3316
|
+
const bidderRequest = createVideoBidderRequestOutstream();
|
|
3312
3317
|
let response = {
|
|
3313
3318
|
cur: 'USD',
|
|
3314
3319
|
seatbid: [{
|
|
@@ -3369,6 +3374,7 @@ describe('the rubicon adapter', function () {
|
|
|
3369
3374
|
});
|
|
3370
3375
|
|
|
3371
3376
|
it('should render ad with Magnite renderer', function () {
|
|
3377
|
+
const bidderRequest = createVideoBidderRequestOutstream();
|
|
3372
3378
|
let response = {
|
|
3373
3379
|
cur: 'USD',
|
|
3374
3380
|
seatbid: [{
|
|
@@ -3430,6 +3436,75 @@ describe('the rubicon adapter', function () {
|
|
|
3430
3436
|
// cleanup
|
|
3431
3437
|
adUnit.parentNode.removeChild(adUnit);
|
|
3432
3438
|
});
|
|
3439
|
+
|
|
3440
|
+
it('should render ad with Magnite renderer without video object', function () {
|
|
3441
|
+
const bidderRequest = createVideoBidderRequestOutstream();
|
|
3442
|
+
delete bidderRequest.bids[0].params.video;
|
|
3443
|
+
bidderRequest.bids[0].params.bidonmultiformat = true;
|
|
3444
|
+
bidderRequest.bids[0].mediaTypes.video.placement = 3;
|
|
3445
|
+
bidderRequest.bids[0].mediaTypes.video.playerSize = [640, 480];
|
|
3446
|
+
|
|
3447
|
+
let response = {
|
|
3448
|
+
cur: 'USD',
|
|
3449
|
+
seatbid: [{
|
|
3450
|
+
bid: [{
|
|
3451
|
+
id: '0',
|
|
3452
|
+
impid: '/19968336/header-bid-tag-0',
|
|
3453
|
+
adomain: ['test.com'],
|
|
3454
|
+
price: 2,
|
|
3455
|
+
crid: '4259970',
|
|
3456
|
+
ext: {
|
|
3457
|
+
bidder: {
|
|
3458
|
+
rp: {
|
|
3459
|
+
mime: 'application/javascript',
|
|
3460
|
+
size_id: 201,
|
|
3461
|
+
advid: 12345
|
|
3462
|
+
}
|
|
3463
|
+
},
|
|
3464
|
+
prebid: {
|
|
3465
|
+
targeting: {
|
|
3466
|
+
hb_uuid: '0c498f63-5111-4bed-98e2-9be7cb932a64'
|
|
3467
|
+
},
|
|
3468
|
+
type: 'video'
|
|
3469
|
+
}
|
|
3470
|
+
},
|
|
3471
|
+
nurl: 'https://test.com/vast.xml'
|
|
3472
|
+
}],
|
|
3473
|
+
group: 0,
|
|
3474
|
+
seat: 'rubicon'
|
|
3475
|
+
}],
|
|
3476
|
+
};
|
|
3477
|
+
|
|
3478
|
+
const request = converter.toORTB({bidderRequest, bidRequests: bidderRequest.bids});
|
|
3479
|
+
|
|
3480
|
+
sinon.spy(window.MagniteApex, 'renderAd');
|
|
3481
|
+
|
|
3482
|
+
let bids = spec.interpretResponse({body: response}, {data: request});
|
|
3483
|
+
const bid = bids[0];
|
|
3484
|
+
bid.adUnitCode = 'outstream_video1_placement';
|
|
3485
|
+
const adUnit = document.createElement('div');
|
|
3486
|
+
adUnit.id = bid.adUnitCode;
|
|
3487
|
+
document.body.appendChild(adUnit);
|
|
3488
|
+
|
|
3489
|
+
bid.renderer.render(bid);
|
|
3490
|
+
|
|
3491
|
+
const renderCall = window.MagniteApex.renderAd.getCall(0);
|
|
3492
|
+
expect(renderCall.args[0]).to.deep.equal({
|
|
3493
|
+
closeButton: true,
|
|
3494
|
+
collapse: true,
|
|
3495
|
+
height: 480,
|
|
3496
|
+
label: undefined,
|
|
3497
|
+
placement: {
|
|
3498
|
+
align: 'left',
|
|
3499
|
+
attachTo: adUnit,
|
|
3500
|
+
position: 'append',
|
|
3501
|
+
},
|
|
3502
|
+
vastUrl: 'https://test.com/vast.xml',
|
|
3503
|
+
width: 640
|
|
3504
|
+
});
|
|
3505
|
+
// cleanup
|
|
3506
|
+
adUnit.parentNode.removeChild(adUnit);
|
|
3507
|
+
});
|
|
3433
3508
|
});
|
|
3434
3509
|
}
|
|
3435
3510
|
|
|
@@ -3681,7 +3756,7 @@ describe('the rubicon adapter', function () {
|
|
|
3681
3756
|
});
|
|
3682
3757
|
|
|
3683
3758
|
it('should copy the schain JSON to to bid.source.ext.schain', () => {
|
|
3684
|
-
createVideoBidderRequest();
|
|
3759
|
+
const bidderRequest = createVideoBidderRequest();
|
|
3685
3760
|
const schain = getSupplyChainConfig();
|
|
3686
3761
|
bidderRequest.bids[0].schain = schain;
|
|
3687
3762
|
const request = spec.buildRequests(bidderRequest.bids, bidderRequest);
|
|
@@ -3717,12 +3792,13 @@ describe('the rubicon adapter', function () {
|
|
|
3717
3792
|
});
|
|
3718
3793
|
|
|
3719
3794
|
// banner
|
|
3720
|
-
|
|
3795
|
+
const bannerBidderRequest = createGdprBidderRequest(false);
|
|
3796
|
+
let [bannerRequest] = spec.buildRequests(bannerBidderRequest.bids, bannerBidderRequest);
|
|
3721
3797
|
expect(bannerRequest.url).to.equal('https://fastlane-qa.rubiconproject.com/a/api/fastlane.json');
|
|
3722
3798
|
|
|
3723
3799
|
// video and returnVast
|
|
3724
|
-
createVideoBidderRequest();
|
|
3725
|
-
let [videoRequest] = spec.buildRequests(
|
|
3800
|
+
const videoBidderRequest = createVideoBidderRequest();
|
|
3801
|
+
let [videoRequest] = spec.buildRequests(videoBidderRequest.bids, videoBidderRequest);
|
|
3726
3802
|
let post = videoRequest.data;
|
|
3727
3803
|
expect(videoRequest.url).to.equal('https://prebid-server-qa.rubiconproject.com/openrtb2/auction');
|
|
3728
3804
|
expect(post.ext.prebid.cache.vastxml).to.have.property('returnCreative').that.is.an('boolean');
|