prebid.js 7.19.0 → 7.20.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/dist/33acrossBidAdapter.js +1 -1
- package/dist/33acrossIdSystem.js +1 -1
- package/dist/adWMGAnalyticsAdapter.js +1 -1
- package/dist/adagioAnalyticsAdapter.js +1 -1
- package/dist/adagioBidAdapter.js +1 -1
- package/dist/adbookpspBidAdapter.js +1 -1
- package/dist/adgenerationBidAdapter.js +1 -1
- package/dist/adkernelAdnAnalyticsAdapter.js +1 -1
- package/dist/adkernelBidAdapter.js +1 -1
- package/dist/adlooxAdServerVideo.js +1 -1
- package/dist/adlooxAnalyticsAdapter.js +1 -1
- package/dist/adlooxRtdProvider.js +1 -1
- package/dist/adomikAnalyticsAdapter.js +1 -1
- package/dist/adrelevantisBidAdapter.js +1 -1
- package/dist/adtrgtmeBidAdapter.js +1 -1
- package/dist/adxcgAnalyticsAdapter.js +1 -1
- package/dist/adxcgBidAdapter.js +1 -1
- package/dist/adxpremiumAnalyticsAdapter.js +1 -1
- package/dist/ajaBidAdapter.js +1 -1
- package/dist/amxBidAdapter.js +1 -1
- package/dist/amxIdSystem.js +1 -1
- package/dist/aolBidAdapter.js +1 -1
- package/dist/appierAnalyticsAdapter.js +1 -1
- package/dist/appnexusBidAdapter.js +1 -1
- package/dist/asoBidAdapter.js +1 -1
- package/dist/atsAnalyticsAdapter.js +1 -1
- package/dist/axonixBidAdapter.js +1 -1
- package/dist/bidViewability.js +1 -1
- package/dist/bidglassBidAdapter.js +1 -1
- package/dist/bidwatchAnalyticsAdapter.js +1 -1
- package/dist/big-richmediaBidAdapter.js +1 -1
- package/dist/bridgewellBidAdapter.js +1 -1
- package/dist/brightMountainMediaBidAdapter.js +1 -1
- package/dist/byDataAnalyticsAdapter.js +1 -1
- package/dist/carodaBidAdapter.js +1 -1
- package/dist/categoryTranslation.js +1 -1
- package/dist/concertAnalyticsAdapter.js +1 -1
- package/dist/concertBidAdapter.js +1 -1
- package/dist/connectIdSystem.js +1 -1
- package/dist/connectadBidAdapter.js +1 -1
- package/dist/consentManagement.js +1 -1
- package/dist/consentManagementUsp.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/currency.js +1 -1
- package/dist/datablocksAnalyticsAdapter.js +1 -1
- package/dist/dchain.js +1 -1
- package/dist/debugging-standalone.js +1 -1
- package/dist/debugging.js +1 -1
- package/dist/dependencies.json +3 -0
- package/dist/dfpAdServerVideo.js +1 -1
- package/dist/dspxBidAdapter.js +1 -1
- package/dist/eplanningAnalyticsAdapter.js +1 -1
- package/dist/eplanningBidAdapter.js +1 -1
- package/dist/finativeBidAdapter.js +1 -1
- package/dist/fintezaAnalyticsAdapter.js +1 -1
- package/dist/ftrackIdSystem.js +1 -1
- package/dist/gdprEnforcement.js +1 -1
- package/dist/glimpseBidAdapter.js +1 -1
- package/dist/gmosspBidAdapter.js +1 -1
- package/dist/goldbachBidAdapter.js +1 -1
- package/dist/googleAnalyticsAdapter.js +1 -1
- package/dist/gridBidAdapter.js +1 -1
- package/dist/gridNMBidAdapter.js +1 -1
- package/dist/gumgumBidAdapter.js +1 -1
- package/dist/h12mediaBidAdapter.js +1 -1
- package/dist/hadronAnalyticsAdapter.js +1 -1
- package/dist/id5AnalyticsAdapter.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/invisiblyAnalyticsAdapter.js +1 -1
- package/dist/ixBidAdapter.js +1 -1
- package/dist/justpremiumBidAdapter.js +1 -1
- package/dist/kargoAnalyticsAdapter.js +1 -1
- package/dist/kinessoIdSystem.js +1 -1
- package/dist/konduitAnalyticsAdapter.js +1 -1
- package/dist/kueezBidAdapter.js +1 -1
- package/dist/lassoBidAdapter.js +1 -1
- package/dist/lifestreetBidAdapter.js +1 -1
- package/dist/liveIntentAnalyticsAdapter.js +1 -1
- package/dist/liveIntentIdSystem.js +1 -1
- package/dist/livewrappedAnalyticsAdapter.js +1 -1
- package/dist/liveyieldAnalyticsAdapter.js +1 -1
- package/dist/logicadBidAdapter.js +1 -1
- package/dist/loglyliftBidAdapter.js +1 -1
- package/dist/lotamePanoramaIdSystem.js +1 -1
- package/dist/magniteAnalyticsAdapter.js +1 -0
- package/dist/malltvAnalyticsAdapter.js +1 -1
- package/dist/marsmediaAnalyticsAdapter.js +1 -1
- package/dist/marsmediaBidAdapter.js +1 -1
- package/dist/mass.js +1 -1
- package/dist/mediafuseBidAdapter.js +1 -1
- package/dist/medianetAnalyticsAdapter.js +1 -1
- package/dist/mediasquareBidAdapter.js +1 -1
- package/dist/mgidBidAdapter.js +1 -1
- package/dist/minutemediaBidAdapter.js +1 -1
- package/dist/multibid.js +1 -1
- package/dist/not-for-prod/prebid.js +186 -184
- package/dist/oguryBidAdapter.js +1 -1
- package/dist/onetagBidAdapter.js +1 -1
- package/dist/ooloAnalyticsAdapter.js +1 -1
- package/dist/openxAnalyticsAdapter.js +1 -1
- package/dist/optimonAnalyticsAdapter.js +1 -1
- package/dist/outbrainBidAdapter.js +1 -1
- package/dist/parrableIdSystem.js +1 -1
- package/dist/pianoDmpAnalyticsAdapter.js +1 -1
- package/dist/pixfutureBidAdapter.js +1 -1
- package/dist/prebid-core.js +2 -2
- package/dist/prebidServerBidAdapter.js +1 -1
- package/dist/prebidmanagerAnalyticsAdapter.js +1 -1
- package/dist/priceFloors.js +1 -1
- package/dist/publinkIdSystem.js +1 -1
- package/dist/pubmaticAnalyticsAdapter.js +1 -1
- package/dist/pubmaticBidAdapter.js +1 -1
- package/dist/pubperfAnalyticsAdapter.js +1 -1
- package/dist/pubstackAnalyticsAdapter.js +1 -1
- package/dist/pubwiseAnalyticsAdapter.js +1 -1
- package/dist/pubxaiAnalyticsAdapter.js +1 -1
- package/dist/pulsepointAnalyticsAdapter.js +1 -1
- package/dist/pxyzBidAdapter.js +1 -1
- package/dist/quantcastBidAdapter.js +1 -1
- package/dist/quantcastIdSystem.js +1 -1
- package/dist/readpeakBidAdapter.js +1 -1
- package/dist/realvuAnalyticsAdapter.js +1 -1
- package/dist/relaidoBidAdapter.js +1 -1
- package/dist/relevantAnalyticsAdapter.js +1 -1
- package/dist/rhythmoneBidAdapter.js +1 -1
- package/dist/riseBidAdapter.js +1 -1
- package/dist/rivrAnalyticsAdapter.js +1 -1
- package/dist/roxotAnalyticsAdapter.js +1 -1
- package/dist/rtdModule.js +1 -1
- package/dist/rubiconAnalyticsAdapter.js +1 -1
- package/dist/rubiconBidAdapter.js +1 -1
- package/dist/s2sTesting.js +1 -1
- package/dist/scaleableAnalyticsAdapter.js +1 -1
- package/dist/schain.js +1 -1
- package/dist/seedingAllianceBidAdapter.js +1 -1
- package/dist/seedtagBidAdapter.js +1 -1
- package/dist/sharedIdSystem.js +1 -1
- package/dist/sharethroughAnalyticsAdapter.js +1 -1
- package/dist/sharethroughBidAdapter.js +1 -1
- package/dist/shinezBidAdapter.js +1 -1
- package/dist/sigmoidAnalyticsAdapter.js +1 -1
- 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/sonobiAnalyticsAdapter.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/staqAnalyticsAdapter.js +1 -1
- package/dist/sublimeBidAdapter.js +1 -1
- package/dist/synacormediaBidAdapter.js +1 -1
- package/dist/taboolaBidAdapter.js +1 -1
- package/dist/tapadIdSystem.js +1 -1
- package/dist/targetVideoBidAdapter.js +1 -1
- package/dist/teadsBidAdapter.js +1 -1
- package/dist/teadsIdSystem.js +1 -0
- package/dist/terceptAnalyticsAdapter.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/underdogmediaBidAdapter.js +1 -1
- package/dist/undertoneBidAdapter.js +1 -1
- package/dist/userId.js +1 -1
- package/dist/vidazooBidAdapter.js +1 -1
- package/dist/videobyteBidAdapter.js +1 -1
- package/dist/visxBidAdapter.js +1 -1
- package/dist/vrtcalBidAdapter.js +1 -1
- package/dist/vuukleBidAdapter.js +1 -1
- package/dist/weboramaRtdProvider.js +1 -1
- package/dist/widespaceBidAdapter.js +1 -1
- package/dist/winrBidAdapter.js +1 -1
- package/dist/yahoosspBidAdapter.js +1 -1
- package/dist/yieldmoBidAdapter.js +1 -1
- package/dist/yieldoneAnalyticsAdapter.js +1 -1
- package/dist/yuktamediaAnalyticsAdapter.js +1 -1
- package/dist/zeta_global_sspAnalyticsAdapter.js +1 -1
- package/modules/.submodules.json +1 -0
- package/modules/adkernelBidAdapter.js +2 -2
- package/modules/aolBidAdapter.js +25 -2
- package/modules/appnexusBidAdapter.js +19 -2
- package/modules/categoryTranslation.js +4 -4
- package/modules/connectIdSystem.js +16 -1
- package/modules/currency.js +11 -11
- package/modules/dchain.js +2 -2
- package/modules/debugging/legacy.js +2 -2
- package/modules/eplanningBidAdapter.js +48 -2
- package/modules/lotamePanoramaIdSystem.js +10 -6
- package/modules/magniteAnalyticsAdapter.js +902 -0
- package/modules/magniteAnalyticsAdapter.md +18 -0
- package/modules/mass.js +2 -2
- package/modules/multibid/index.js +5 -5
- package/modules/pixfutureBidAdapter.js +46 -15
- package/modules/prebidServerBidAdapter/index.js +10 -6
- package/modules/priceFloors.js +8 -22
- package/modules/rubiconAnalyticsAdapter.js +14 -9
- package/modules/taboolaBidAdapter.js +4 -4
- package/modules/teadsIdSystem.js +234 -0
- package/modules/teadsIdSystem.md +22 -0
- package/modules/userId/index.js +21 -14
- package/modules/vrtcalBidAdapter.js +7 -1
- package/modules/yahoosspBidAdapter.js +1 -1
- package/package.json +1 -1
- package/src/adapters/bidderFactory.js +13 -11
- package/src/auction.js +140 -69
- package/src/constants.json +8 -0
- package/src/prebid.js +2 -3
- package/src/targeting.js +31 -14
- package/test/fixtures/fixtures.js +2 -1
- package/test/spec/auctionmanager_spec.js +109 -21
- package/test/spec/modules/aolBidAdapter_spec.js +42 -9
- package/test/spec/modules/appnexusBidAdapter_spec.js +24 -0
- package/test/spec/modules/connectIdSystem_spec.js +20 -0
- package/test/spec/modules/currency_spec.js +14 -6
- package/test/spec/modules/eplanningBidAdapter_spec.js +285 -1
- package/test/spec/modules/lotamePanoramaIdSystem_spec.js +0 -1
- package/test/spec/modules/magniteAnalyticsAdapter_spec.js +1942 -0
- package/test/spec/modules/prebidServerBidAdapter_spec.js +43 -11
- package/test/spec/modules/priceFloors_spec.js +5 -5
- package/test/spec/modules/rubiconAnalyticsAdapter_spec.js +2 -3
- package/test/spec/modules/taboolaBidAdapter_spec.js +110 -11
- package/test/spec/modules/teadsIdSystem_spec.js +271 -0
- package/test/spec/modules/userId_spec.js +39 -4
- package/test/spec/modules/vrtcalBidAdapter_spec.js +12 -1
- package/test/spec/modules/yahoosspBidAdapter_spec.js +45 -0
- package/test/spec/unit/core/bidderFactory_spec.js +66 -11
- package/test/spec/unit/core/targeting_spec.js +28 -9
- package/test/spec/unit/pbjs_api_spec.js +4 -2
|
@@ -21,6 +21,7 @@ import {auctionManager} from '../../src/auctionManager.js';
|
|
|
21
21
|
import 'modules/debugging/index.js' // some tests look for debugging side effects
|
|
22
22
|
import {AuctionIndex} from '../../src/auctionIndex.js';
|
|
23
23
|
import {expect} from 'chai';
|
|
24
|
+
import {deepClone} from '../../src/utils.js';
|
|
24
25
|
|
|
25
26
|
var assert = require('assert');
|
|
26
27
|
|
|
@@ -57,7 +58,16 @@ function mockBid(opts) {
|
|
|
57
58
|
'currency': 'USD',
|
|
58
59
|
'netRevenue': true,
|
|
59
60
|
'ttl': 360,
|
|
60
|
-
getSize: () => '300x250'
|
|
61
|
+
getSize: () => '300x250',
|
|
62
|
+
getIdentifiers() {
|
|
63
|
+
return {
|
|
64
|
+
src: this.source,
|
|
65
|
+
bidder: this.bidderCode,
|
|
66
|
+
bidId: this.requestId,
|
|
67
|
+
transactionId: this.transactionId,
|
|
68
|
+
auctionId: this.auctionId
|
|
69
|
+
}
|
|
70
|
+
}
|
|
61
71
|
};
|
|
62
72
|
}
|
|
63
73
|
|
|
@@ -1323,6 +1333,7 @@ describe('auctionmanager.js', function () {
|
|
|
1323
1333
|
getAdUnits: () => getBidRequests().flatMap(br => br.bids).map(br => ({ code: br.adUnitCode, transactionId: br.transactionId, mediaTypes: br.mediaTypes })),
|
|
1324
1334
|
getAuctionId: () => '1',
|
|
1325
1335
|
addBidReceived: () => true,
|
|
1336
|
+
addBidRejected: () => true,
|
|
1326
1337
|
getTimeout: () => 1000,
|
|
1327
1338
|
getAuctionStart: () => start,
|
|
1328
1339
|
}
|
|
@@ -1382,26 +1393,32 @@ describe('auctionmanager.js', function () {
|
|
|
1382
1393
|
bidRequests = null;
|
|
1383
1394
|
});
|
|
1384
1395
|
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
|
|
1396
|
+
Object.entries({
|
|
1397
|
+
'added to': (cbs) => cbs.addBidResponse,
|
|
1398
|
+
'rejected from': (cbs) => cbs.addBidResponse.reject,
|
|
1399
|
+
}).forEach(([t, getMethod]) => {
|
|
1400
|
+
it(`should call auction done after bid is ${t} auction for mediaType banner`, function () {
|
|
1401
|
+
let ADUNIT_CODE2 = 'adUnitCode2';
|
|
1402
|
+
let BIDDER_CODE2 = 'sampleBidder2';
|
|
1403
|
+
|
|
1404
|
+
let bids1 = [mockBid({ bidderCode: BIDDER_CODE1, transactionId: ADUNIT_CODE1 })];
|
|
1405
|
+
let bids2 = [mockBid({ bidderCode: BIDDER_CODE2, transactionId: ADUNIT_CODE2 })];
|
|
1406
|
+
bidRequests = [
|
|
1407
|
+
mockBidRequest(bids[0]),
|
|
1408
|
+
mockBidRequest(bids1[0], { adUnitCode: ADUNIT_CODE1 }),
|
|
1409
|
+
mockBidRequest(bids2[0], { adUnitCode: ADUNIT_CODE2 })
|
|
1410
|
+
];
|
|
1411
|
+
let cbs = auctionCallbacks(doneSpy, auction);
|
|
1412
|
+
const method = getMethod(cbs);
|
|
1413
|
+
method(ADUNIT_CODE, bids[0]);
|
|
1414
|
+
cbs.adapterDone.call(bidRequests[0]);
|
|
1415
|
+
method(ADUNIT_CODE1, bids1[0]);
|
|
1416
|
+
cbs.adapterDone.call(bidRequests[1]);
|
|
1417
|
+
method(ADUNIT_CODE2, bids2[0]);
|
|
1418
|
+
cbs.adapterDone.call(bidRequests[2]);
|
|
1419
|
+
assert.equal(doneSpy.callCount, 1);
|
|
1420
|
+
});
|
|
1421
|
+
})
|
|
1405
1422
|
|
|
1406
1423
|
it('should call auction done after prebid cache is complete for mediaType video', function() {
|
|
1407
1424
|
bids[0].mediaType = 'video';
|
|
@@ -1543,6 +1560,77 @@ describe('auctionmanager.js', function () {
|
|
|
1543
1560
|
});
|
|
1544
1561
|
})
|
|
1545
1562
|
});
|
|
1563
|
+
|
|
1564
|
+
describe('when bids are rejected', () => {
|
|
1565
|
+
let cbs, bid, expectedRejection;
|
|
1566
|
+
const onBidRejected = sinon.stub();
|
|
1567
|
+
const REJECTION_REASON = 'Bid rejected';
|
|
1568
|
+
const AU_CODE = 'au';
|
|
1569
|
+
|
|
1570
|
+
function rejectHook(fn, adUnitCode, bid, reject) {
|
|
1571
|
+
reject(REJECTION_REASON);
|
|
1572
|
+
reject(REJECTION_REASON); // second call should do nothing
|
|
1573
|
+
}
|
|
1574
|
+
|
|
1575
|
+
before(() => {
|
|
1576
|
+
addBidResponse.before(rejectHook, 999);
|
|
1577
|
+
events.on(CONSTANTS.EVENTS.BID_REJECTED, onBidRejected);
|
|
1578
|
+
});
|
|
1579
|
+
|
|
1580
|
+
after(() => {
|
|
1581
|
+
addBidResponse.getHooks({hook: rejectHook}).remove();
|
|
1582
|
+
events.off(CONSTANTS.EVENTS.BID_REJECTED, onBidRejected);
|
|
1583
|
+
});
|
|
1584
|
+
|
|
1585
|
+
beforeEach(() => {
|
|
1586
|
+
onBidRejected.reset();
|
|
1587
|
+
bid = mockBid({bidderCode: BIDDER_CODE});
|
|
1588
|
+
bidRequests = [
|
|
1589
|
+
mockBidRequest(bid),
|
|
1590
|
+
];
|
|
1591
|
+
cbs = auctionCallbacks(doneSpy, auction);
|
|
1592
|
+
expectedRejection = sinon.match(Object.assign({}, bid, {
|
|
1593
|
+
rejectionReason: REJECTION_REASON,
|
|
1594
|
+
adUnitCode: AU_CODE
|
|
1595
|
+
}));
|
|
1596
|
+
auction.addBidRejected = sinon.stub();
|
|
1597
|
+
});
|
|
1598
|
+
|
|
1599
|
+
Object.entries({
|
|
1600
|
+
'with addBidResponse.reject': () => cbs.addBidResponse.reject(AU_CODE, deepClone(bid), REJECTION_REASON),
|
|
1601
|
+
'from addBidResponse hooks': () => cbs.addBidResponse(AU_CODE, deepClone(bid))
|
|
1602
|
+
}).forEach(([t, rejectBid]) => {
|
|
1603
|
+
describe(t, () => {
|
|
1604
|
+
it('should emit a BID_REJECTED event', () => {
|
|
1605
|
+
rejectBid();
|
|
1606
|
+
sinon.assert.calledWith(onBidRejected, expectedRejection);
|
|
1607
|
+
});
|
|
1608
|
+
|
|
1609
|
+
it('should pass bid to auction.addBidRejected', () => {
|
|
1610
|
+
rejectBid();
|
|
1611
|
+
sinon.assert.calledWith(auction.addBidRejected, expectedRejection);
|
|
1612
|
+
});
|
|
1613
|
+
})
|
|
1614
|
+
});
|
|
1615
|
+
|
|
1616
|
+
it('should return a NO_BID replacement', () => {
|
|
1617
|
+
const noBid = cbs.addBidResponse.reject(AU_CODE, {...bid, statusMessage: 'Bid available', status: CONSTANTS.BID_STATUS.RENDERED}, 'Rejected');
|
|
1618
|
+
sinon.assert.match(noBid, {
|
|
1619
|
+
status: CONSTANTS.BID_STATUS.BID_REJECTED,
|
|
1620
|
+
statusMessage: 'Bid returned empty or error response',
|
|
1621
|
+
cpm: 0,
|
|
1622
|
+
requestId: bid.requestId,
|
|
1623
|
+
auctionId: bid.auctionId,
|
|
1624
|
+
adUnitCode: AU_CODE,
|
|
1625
|
+
rejectionReason: undefined,
|
|
1626
|
+
});
|
|
1627
|
+
});
|
|
1628
|
+
|
|
1629
|
+
it('addBidResponse hooks should not be able to reject the same bid twice', () => {
|
|
1630
|
+
cbs.addBidResponse(AU_CODE, bid);
|
|
1631
|
+
expect(auction.addBidRejected.calledOnce).to.be.true;
|
|
1632
|
+
});
|
|
1633
|
+
})
|
|
1546
1634
|
});
|
|
1547
1635
|
|
|
1548
1636
|
describe('auctionOptions', function() {
|
|
@@ -81,20 +81,46 @@ describe('AolAdapter', function () {
|
|
|
81
81
|
const ONE_DISPLAY_TTL = 60;
|
|
82
82
|
const ONE_MOBILE_TTL = 3600;
|
|
83
83
|
const SUPPORTED_USER_ID_SOURCES = {
|
|
84
|
-
'
|
|
85
|
-
'
|
|
86
|
-
'
|
|
87
|
-
'
|
|
88
|
-
'
|
|
89
|
-
'
|
|
90
|
-
'
|
|
91
|
-
'
|
|
84
|
+
'admixer.net': '100',
|
|
85
|
+
'adserver.org': '200',
|
|
86
|
+
'adtelligent.com': '300',
|
|
87
|
+
'amxrtb.com': '500',
|
|
88
|
+
'audigent.com': '600',
|
|
89
|
+
'britepool.com': '700',
|
|
90
|
+
'criteo.com': '800',
|
|
91
|
+
'crwdcntrl.net': '900',
|
|
92
|
+
'deepintent.com': '1000',
|
|
93
|
+
'epsilon.com': '1100',
|
|
94
|
+
'hcn.health': '1200',
|
|
95
|
+
'id5-sync.com': '1300',
|
|
96
|
+
'idx.lat': '1400',
|
|
97
|
+
'intentiq.com': '1500',
|
|
98
|
+
'intimatemerger.com': '1600',
|
|
99
|
+
'liveintent.com': '1700',
|
|
100
|
+
'liveramp.com': '1800',
|
|
101
|
+
'mediawallahscript.com': '1900',
|
|
102
|
+
'netid.de': '2100',
|
|
103
|
+
'neustar.biz': '2200',
|
|
104
|
+
'pubcid.org': '2600',
|
|
105
|
+
'quantcast.com': '2700',
|
|
106
|
+
'tapad.com': '2800',
|
|
107
|
+
'zeotap.com': '3200'
|
|
92
108
|
};
|
|
93
109
|
|
|
94
110
|
const USER_ID_DATA = {
|
|
111
|
+
admixerId: SUPPORTED_USER_ID_SOURCES['admixer.net'],
|
|
112
|
+
adtelligentId: SUPPORTED_USER_ID_SOURCES['adtelligent.com'],
|
|
113
|
+
amxId: SUPPORTED_USER_ID_SOURCES['amxrtb.com'],
|
|
114
|
+
britepoolid: SUPPORTED_USER_ID_SOURCES['britepool.com'],
|
|
95
115
|
criteoId: SUPPORTED_USER_ID_SOURCES['criteo.com'],
|
|
96
116
|
connectid: SUPPORTED_USER_ID_SOURCES['verizonmedia.com'],
|
|
117
|
+
dmdId: SUPPORTED_USER_ID_SOURCES['hcn.health'],
|
|
118
|
+
hadronId: SUPPORTED_USER_ID_SOURCES['audigent.com'],
|
|
119
|
+
lotamePanoramaId: SUPPORTED_USER_ID_SOURCES['crwdcntrl.net'],
|
|
120
|
+
deepintentId: SUPPORTED_USER_ID_SOURCES['deepintent.com'],
|
|
121
|
+
fabrickId: SUPPORTED_USER_ID_SOURCES['neustar.biz'],
|
|
97
122
|
idl_env: SUPPORTED_USER_ID_SOURCES['liveramp.com'],
|
|
123
|
+
IDP: SUPPORTED_USER_ID_SOURCES['zeotap.com'],
|
|
98
124
|
lipb: {
|
|
99
125
|
lipbid: SUPPORTED_USER_ID_SOURCES['liveintent.com'],
|
|
100
126
|
segments: ['100', '200']
|
|
@@ -104,8 +130,15 @@ describe('AolAdapter', function () {
|
|
|
104
130
|
uid: SUPPORTED_USER_ID_SOURCES['id5-sync.com'],
|
|
105
131
|
ext: {foo: 'bar'}
|
|
106
132
|
},
|
|
133
|
+
idx: SUPPORTED_USER_ID_SOURCES['idx.lat'],
|
|
134
|
+
imuid: SUPPORTED_USER_ID_SOURCES['intimatemerger.com'],
|
|
107
135
|
intentIqId: SUPPORTED_USER_ID_SOURCES['intentiq.com'],
|
|
108
|
-
|
|
136
|
+
mwOpenLinkId: SUPPORTED_USER_ID_SOURCES['mediawallahscript.com'],
|
|
137
|
+
netId: SUPPORTED_USER_ID_SOURCES['netid.de'],
|
|
138
|
+
quantcastId: SUPPORTED_USER_ID_SOURCES['quantcast.com'],
|
|
139
|
+
publinkId: SUPPORTED_USER_ID_SOURCES['epsilon.com'],
|
|
140
|
+
pubcid: SUPPORTED_USER_ID_SOURCES['pubcid.org'],
|
|
141
|
+
tapadId: SUPPORTED_USER_ID_SOURCES['tapad.com']
|
|
109
142
|
};
|
|
110
143
|
|
|
111
144
|
function createCustomBidRequest({bids, params} = {}) {
|
|
@@ -4,6 +4,7 @@ import { newBidder } from 'src/adapters/bidderFactory.js';
|
|
|
4
4
|
import * as bidderFactory from 'src/adapters/bidderFactory.js';
|
|
5
5
|
import { auctionManager } from 'src/auctionManager.js';
|
|
6
6
|
import { deepClone } from 'src/utils.js';
|
|
7
|
+
import * as utils from 'src/utils.js';
|
|
7
8
|
import { config } from 'src/config.js';
|
|
8
9
|
|
|
9
10
|
const ENDPOINT = 'https://ib.adnxs.com/ut/v3/prebid';
|
|
@@ -370,6 +371,29 @@ describe('AppNexusAdapter', function () {
|
|
|
370
371
|
});
|
|
371
372
|
});
|
|
372
373
|
|
|
374
|
+
it('should add debug params from query', function () {
|
|
375
|
+
let getParamStub = sinon.stub(utils, 'getParameterByName').callsFake(function(par) {
|
|
376
|
+
if (par === 'apn_debug_dongle') return 'abcdef';
|
|
377
|
+
if (par === 'apn_debug_member_id') return '1234';
|
|
378
|
+
if (par === 'apn_debug_timeout') return '1000';
|
|
379
|
+
|
|
380
|
+
return '';
|
|
381
|
+
});
|
|
382
|
+
|
|
383
|
+
let bidRequest = deepClone(bidRequests[0]);
|
|
384
|
+
const request = spec.buildRequests([bidRequest]);
|
|
385
|
+
const payload = JSON.parse(request.data);
|
|
386
|
+
|
|
387
|
+
expect(payload.debug).to.exist.and.to.deep.equal({
|
|
388
|
+
'dongle': 'abcdef',
|
|
389
|
+
'enabled': true,
|
|
390
|
+
'member_id': 1234,
|
|
391
|
+
'debug_timeout': 1000
|
|
392
|
+
});
|
|
393
|
+
|
|
394
|
+
getParamStub.restore();
|
|
395
|
+
});
|
|
396
|
+
|
|
373
397
|
it('should attach reserve param when either bid param or getFloor function exists', function () {
|
|
374
398
|
let getFloorResponse = { currency: 'USD', floor: 3 };
|
|
375
399
|
let request, payload = null;
|
|
@@ -76,6 +76,26 @@ describe('Yahoo ConnectID Submodule', () => {
|
|
|
76
76
|
expect(result.callback).to.be.a('function');
|
|
77
77
|
});
|
|
78
78
|
|
|
79
|
+
it('returns an undefined if the Yahoo specific opt-out key is present in local storage', () => {
|
|
80
|
+
localStorage.setItem('connectIdOptOut', '1');
|
|
81
|
+
expect(invokeGetIdAPI({
|
|
82
|
+
he: HASHED_EMAIL,
|
|
83
|
+
pixelId: PIXEL_ID
|
|
84
|
+
}, consentData)).to.be.undefined;
|
|
85
|
+
localStorage.removeItem('connectIdOptOut');
|
|
86
|
+
});
|
|
87
|
+
|
|
88
|
+
it('returns an object with the callback function if the correct params are passed and Yahoo opt-out value is not "1"', () => {
|
|
89
|
+
localStorage.setItem('connectIdOptOut', 'true');
|
|
90
|
+
let result = invokeGetIdAPI({
|
|
91
|
+
he: HASHED_EMAIL,
|
|
92
|
+
pixelId: PIXEL_ID
|
|
93
|
+
}, consentData);
|
|
94
|
+
expect(result).to.be.an('object').that.has.all.keys('callback');
|
|
95
|
+
expect(result.callback).to.be.a('function');
|
|
96
|
+
localStorage.removeItem('connectIdOptOut');
|
|
97
|
+
});
|
|
98
|
+
|
|
79
99
|
it('Makes an ajax GET request to the production API endpoint with query params', () => {
|
|
80
100
|
invokeGetIdAPI({
|
|
81
101
|
he: HASHED_EMAIL,
|
|
@@ -351,6 +351,11 @@ describe('currency', function () {
|
|
|
351
351
|
});
|
|
352
352
|
|
|
353
353
|
describe('currency.addBidResponseDecorator', function () {
|
|
354
|
+
let reject;
|
|
355
|
+
beforeEach(() => {
|
|
356
|
+
reject = sinon.stub().returns({status: 'rejected'});
|
|
357
|
+
});
|
|
358
|
+
|
|
354
359
|
it('should leave bid at 1 when currency support is not enabled and fromCurrency is USD', function () {
|
|
355
360
|
setConfig({});
|
|
356
361
|
var bid = makeBid({ 'cpm': 1, 'currency': 'USD' });
|
|
@@ -368,8 +373,9 @@ describe('currency', function () {
|
|
|
368
373
|
var innerBid;
|
|
369
374
|
addBidResponseHook(function(adCodeId, bid) {
|
|
370
375
|
innerBid = bid;
|
|
371
|
-
}, 'elementId', bid);
|
|
372
|
-
expect(innerBid.
|
|
376
|
+
}, 'elementId', bid, reject);
|
|
377
|
+
expect(innerBid.status).to.equal('rejected');
|
|
378
|
+
expect(reject.calledOnce).to.be.true;
|
|
373
379
|
});
|
|
374
380
|
|
|
375
381
|
it('should not buffer bid when currency is already in desired currency', function () {
|
|
@@ -395,8 +401,9 @@ describe('currency', function () {
|
|
|
395
401
|
var innerBid;
|
|
396
402
|
addBidResponseHook(function(adCodeId, bid) {
|
|
397
403
|
innerBid = bid;
|
|
398
|
-
}, 'elementId', bid);
|
|
399
|
-
expect(innerBid.
|
|
404
|
+
}, 'elementId', bid, reject);
|
|
405
|
+
expect(innerBid.status).to.equal('rejected');
|
|
406
|
+
expect(reject.calledOnce).to.be.true;
|
|
400
407
|
});
|
|
401
408
|
|
|
402
409
|
it('should result in NO_BID when adServerCurrency is not supported in file', function () {
|
|
@@ -407,8 +414,9 @@ describe('currency', function () {
|
|
|
407
414
|
var innerBid;
|
|
408
415
|
addBidResponseHook(function(adCodeId, bid) {
|
|
409
416
|
innerBid = bid;
|
|
410
|
-
}, 'elementId', bid);
|
|
411
|
-
expect(innerBid.
|
|
417
|
+
}, 'elementId', bid, reject);
|
|
418
|
+
expect(innerBid.status).to.equal('rejected');
|
|
419
|
+
expect(reject.calledOnce).to.be.true;
|
|
412
420
|
});
|
|
413
421
|
|
|
414
422
|
it('should return 1 when currency support is enabled and same currency code is requested as is set to adServerCurrency', function () {
|