prebid.js 9.3.0 → 9.4.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/creative/constants.js +2 -1
- package/creative/crossDomain.js +16 -4
- package/dist/33acrossAnalyticsAdapter.js +1 -1
- package/dist/33acrossBidAdapter.js +1 -1
- package/dist/33acrossIdSystem.js +1 -1
- package/dist/BTBidAdapter.js +1 -1
- package/dist/adagioAnalyticsAdapter.js +1 -1
- package/dist/adagioBidAdapter.js +1 -1
- package/dist/adagioRtdProvider.js +1 -1
- package/dist/adagioUtils.js +1 -1
- package/dist/addefendBidAdapter.js +1 -1
- package/dist/adfBidAdapter.js +1 -1
- package/dist/adgenerationBidAdapter.js +1 -1
- package/dist/adlooxRtdProvider.js +1 -1
- package/dist/adqueryBidAdapter.js +1 -1
- package/dist/adrelevantisBidAdapter.js +1 -1
- package/dist/adstirBidAdapter.js +1 -1
- package/dist/adtrgtmeBidAdapter.js +1 -1
- package/dist/adxcgAnalyticsAdapter.js +1 -1
- package/dist/adxcgBidAdapter.js +1 -1
- package/dist/adyoulikeBidAdapter.js +1 -1
- package/dist/agmaAnalyticsAdapter.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/bidglassBidAdapter.js +1 -1
- package/dist/big-richmediaBidAdapter.js +1 -1
- package/dist/bridBidAdapter.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/chunk-core.js +1 -1
- package/dist/codefuelBidAdapter.js +1 -1
- package/dist/concertBidAdapter.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/cpmstarBidAdapter.js +1 -1
- package/dist/craftBidAdapter.js +1 -1
- package/dist/criteoBidAdapter.js +1 -1
- package/dist/cwireBidAdapter.js +1 -1
- package/dist/dailymotionBidAdapter.js +1 -1
- package/dist/deltaprojectsBidAdapter.js +1 -1
- package/dist/dependencies.json +33 -9
- package/dist/dianomiBidAdapter.js +1 -1
- package/dist/dspxBidAdapter.js +1 -1
- package/dist/dxkultureBidAdapter.js +1 -1
- package/dist/eplanningBidAdapter.js +1 -1
- package/dist/euidIdSystem.js +1 -1
- package/dist/exadsBidAdapter.js +1 -1
- package/dist/feedadBidAdapter.js +1 -1
- package/dist/finativeBidAdapter.js +1 -1
- package/dist/freewheel-sspBidAdapter.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/hypelabBidAdapter.js +1 -1
- package/dist/id5AnalyticsAdapter.js +1 -1
- package/dist/id5IdSystem.js +1 -1
- package/dist/illuminBidAdapter.js +1 -1
- package/dist/imdsBidAdapter.js +1 -1
- package/dist/improvedigitalBidAdapter.js +1 -1
- package/dist/insticatorBidAdapter.js +1 -1
- package/dist/ixBidAdapter.js +1 -1
- package/dist/jixieBidAdapter.js +1 -1
- package/dist/justpremiumBidAdapter.js +1 -1
- package/dist/kargoBidAdapter.js +1 -1
- package/dist/kimberliteBidAdapter.js +1 -1
- package/dist/konduitAnalyticsAdapter.js +1 -1
- package/dist/kueezBidAdapter.js +1 -1
- package/dist/kueezRtbBidAdapter.js +1 -1
- package/dist/lassoBidAdapter.js +1 -1
- package/dist/lifestreetBidAdapter.js +1 -1
- package/dist/liveIntentIdSystem.js +1 -1
- package/dist/logicadBidAdapter.js +1 -1
- package/dist/loglyliftBidAdapter.js +1 -1
- package/dist/luceadBidAdapter.js +1 -1
- package/dist/luponmediaBidAdapter.js +1 -1
- package/dist/mabidderBidAdapter.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/medianetAnalyticsAdapter.js +1 -1
- package/dist/medianetBidAdapter.js +1 -1
- package/dist/mediasquareBidAdapter.js +1 -1
- package/dist/mgidBidAdapter.js +1 -1
- package/dist/minutemediaBidAdapter.js +1 -1
- package/dist/missenaBidAdapter.js +1 -1
- package/dist/nexx360BidAdapter.js +1 -1
- package/dist/nobidAnalyticsAdapter.js +1 -1
- package/dist/nobidBidAdapter.js +1 -1
- package/dist/not-for-prod/prebid.js +171 -170
- package/dist/oguryBidAdapter.js +1 -1
- package/dist/onetagBidAdapter.js +1 -1
- package/dist/ooloAnalyticsAdapter.js +1 -1
- package/dist/openwebBidAdapter.js +1 -1
- package/dist/openxBidAdapter.js +1 -1
- package/dist/optidigitalBidAdapter.js +1 -1
- package/dist/orbidderBidAdapter.js +1 -1
- package/dist/outbrainBidAdapter.js +1 -1
- package/dist/ozoneBidAdapter.js +1 -1
- package/dist/pixfutureBidAdapter.js +1 -1
- package/dist/processResponse.js +1 -0
- package/dist/publinkIdSystem.js +1 -1
- package/dist/publirBidAdapter.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 -1
- package/dist/rhythmoneBidAdapter.js +1 -1
- package/dist/riseBidAdapter.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/shinezRtbBidAdapter.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/snigelBidAdapter.js +1 -1
- package/dist/sonobiBidAdapter.js +1 -1
- package/dist/sovrnBidAdapter.js +1 -1
- package/dist/sspBCBidAdapter.js +1 -1
- package/dist/stnBidAdapter.js +1 -1
- package/dist/stvBidAdapter.js +1 -1
- package/dist/sublimeBidAdapter.js +1 -1
- package/dist/taboolaBidAdapter.js +1 -1
- package/dist/tagorasBidAdapter.js +1 -1
- package/dist/tappxBidAdapter.js +1 -1
- package/dist/targetVideoBidAdapter.js +1 -1
- package/dist/teadsBidAdapter.js +1 -1
- package/dist/terceptAnalyticsAdapter.js +1 -1
- package/dist/themoneytizerBidAdapter.js +1 -1
- package/dist/trionBidAdapter.js +1 -1
- package/dist/tripleliftBidAdapter.js +1 -1
- package/dist/ttdBidAdapter.js +1 -1
- package/dist/twistDigitalBidAdapter.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/unrulyBidAdapter.js +1 -1
- package/dist/viantOrtbBidAdapter.js +1 -1
- package/dist/vidazooBidAdapter.js +1 -1
- package/dist/vidazooUtils.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/yahooAdsBidAdapter.js +1 -1
- package/dist/yieldmoBidAdapter.js +1 -1
- package/dist/yieldoneAnalyticsAdapter.js +1 -1
- package/dist/zeta_global_sspBidAdapter.js +1 -1
- package/integrationExamples/gpt/x-domain/creative.html +1 -1
- package/libraries/processResponse/index.js +12 -0
- package/libraries/vidazooUtils/bidderUtils.js +9 -10
- package/modules/adagioRtdProvider.js +9 -7
- package/modules/adfBidAdapter.js +1 -10
- package/modules/carodaBidAdapter.js +3 -8
- package/modules/codefuelBidAdapter.js +1 -10
- package/modules/cpmstarBidAdapter.js +52 -36
- package/modules/cpmstarBidAdapter.md +1 -4
- package/modules/dailymotionBidAdapter.js +1 -1
- package/modules/deltaprojectsBidAdapter.js +2 -11
- package/modules/dianomiBidAdapter.js +1 -9
- package/modules/finativeBidAdapter.js +1 -10
- package/modules/gridBidAdapter.js +2 -12
- package/modules/illuminBidAdapter.js +9 -304
- package/modules/kueezRtbBidAdapter.js +17 -312
- package/modules/luponmediaBidAdapter.js +4 -10
- package/modules/mgidBidAdapter.js +1 -10
- package/modules/outbrainBidAdapter.js +8 -43
- package/modules/ozoneBidAdapter.js +9 -7
- package/modules/shinezRtbBidAdapter.js +12 -304
- package/modules/tagorasBidAdapter.js +13 -316
- package/modules/twistDigitalBidAdapter.js +9 -422
- package/modules/viantOrtbBidAdapter.js +20 -0
- package/modules/vidazooBidAdapter.js +3 -3
- package/modules/visxBidAdapter.js +27 -29
- package/modules/zeta_global_sspBidAdapter.js +2 -2
- package/package.json +1 -1
- package/src/adRendering.js +25 -2
- package/src/constants.js +2 -0
- package/src/prebid.js +2 -1
- package/src/utils.js +19 -1
- package/test/spec/creative/crossDomainCreative_spec.js +38 -2
- package/test/spec/libraries/processResponse_spec.js +60 -0
- package/test/spec/modules/adagioRtdProvider_spec.js +12 -0
- package/test/spec/modules/cpmstarBidAdapter_spec.js +1 -1
- package/test/spec/modules/dailymotionBidAdapter_spec.js +18 -14
- package/test/spec/modules/illuminBidAdapter_spec.js +26 -13
- package/test/spec/modules/kueezRtbBidAdapter_spec.js +26 -15
- package/test/spec/modules/outbrainBidAdapter_spec.js +32 -1
- package/test/spec/modules/shinezRtbBidAdapter_spec.js +26 -14
- package/test/spec/modules/tagorasBidAdapter_spec.js +26 -15
- package/test/spec/modules/twistDigitalBidAdapter_spec.js +15 -20
- package/test/spec/modules/viantOrtbBidAdapter_spec.js +87 -6
- package/test/spec/modules/visxBidAdapter_spec.js +180 -0
- package/test/spec/modules/zeta_global_sspBidAdapter_spec.js +11 -0
- package/test/spec/unit/pbjs_api_spec.js +6 -1
|
@@ -2,6 +2,14 @@ import {expect} from 'chai';
|
|
|
2
2
|
import {
|
|
3
3
|
spec as adapter,
|
|
4
4
|
createDomain,
|
|
5
|
+
storage
|
|
6
|
+
} from 'modules/tagorasBidAdapter';
|
|
7
|
+
import * as utils from 'src/utils.js';
|
|
8
|
+
import {version} from 'package.json';
|
|
9
|
+
import {useFakeTimers} from 'sinon';
|
|
10
|
+
import {BANNER, VIDEO} from '../../../src/mediaTypes';
|
|
11
|
+
import {config} from '../../../src/config';
|
|
12
|
+
import {
|
|
5
13
|
hashCode,
|
|
6
14
|
extractPID,
|
|
7
15
|
extractCID,
|
|
@@ -10,12 +18,7 @@ import {
|
|
|
10
18
|
setStorageItem,
|
|
11
19
|
tryParseJSON,
|
|
12
20
|
getUniqueDealId,
|
|
13
|
-
} from '
|
|
14
|
-
import * as utils from 'src/utils.js';
|
|
15
|
-
import {version} from 'package.json';
|
|
16
|
-
import {useFakeTimers} from 'sinon';
|
|
17
|
-
import {BANNER, VIDEO} from '../../../src/mediaTypes';
|
|
18
|
-
import {config} from '../../../src/config';
|
|
21
|
+
} from '../../../libraries/vidazooUtils/bidderUtils.js';
|
|
19
22
|
|
|
20
23
|
export const TEST_ID_SYSTEMS = ['britepoolid', 'criteoId', 'id5id', 'idl_env', 'lipb', 'netId', 'parrableId', 'pubcid', 'tdid', 'pubProvidedId'];
|
|
21
24
|
|
|
@@ -324,7 +327,12 @@ describe('TagorasBidAdapter', function () {
|
|
|
324
327
|
startdelay: 0
|
|
325
328
|
}
|
|
326
329
|
},
|
|
327
|
-
gpid: ''
|
|
330
|
+
gpid: '',
|
|
331
|
+
cat: [],
|
|
332
|
+
contentData: [],
|
|
333
|
+
isStorageAllowed: true,
|
|
334
|
+
pagecat: [],
|
|
335
|
+
userData: []
|
|
328
336
|
}
|
|
329
337
|
});
|
|
330
338
|
});
|
|
@@ -385,6 +393,11 @@ describe('TagorasBidAdapter', function () {
|
|
|
385
393
|
uqs: getTopWindowQueryParams(),
|
|
386
394
|
'ext.param1': 'loremipsum',
|
|
387
395
|
'ext.param2': 'dolorsitamet',
|
|
396
|
+
cat: [],
|
|
397
|
+
contentData: [],
|
|
398
|
+
isStorageAllowed: true,
|
|
399
|
+
pagecat: [],
|
|
400
|
+
userData: []
|
|
388
401
|
}
|
|
389
402
|
});
|
|
390
403
|
});
|
|
@@ -527,8 +540,6 @@ describe('TagorasBidAdapter', function () {
|
|
|
527
540
|
switch (idSystemProvider) {
|
|
528
541
|
case 'lipb':
|
|
529
542
|
return {lipbid: id};
|
|
530
|
-
case 'parrableId':
|
|
531
|
-
return {eid: id};
|
|
532
543
|
case 'id5id':
|
|
533
544
|
return {uid: id};
|
|
534
545
|
default:
|
|
@@ -581,13 +592,13 @@ describe('TagorasBidAdapter', function () {
|
|
|
581
592
|
const key = 'myKey';
|
|
582
593
|
let uniqueDealId;
|
|
583
594
|
beforeEach(() => {
|
|
584
|
-
uniqueDealId = getUniqueDealId(key, 0);
|
|
595
|
+
uniqueDealId = getUniqueDealId(storage, key, 0);
|
|
585
596
|
})
|
|
586
597
|
|
|
587
598
|
it('should get current unique deal id', function (done) {
|
|
588
599
|
// waiting some time so `now` will become past
|
|
589
600
|
setTimeout(() => {
|
|
590
|
-
const current = getUniqueDealId(key);
|
|
601
|
+
const current = getUniqueDealId(storage, key);
|
|
591
602
|
expect(current).to.be.equal(uniqueDealId);
|
|
592
603
|
done();
|
|
593
604
|
}, 200);
|
|
@@ -595,7 +606,7 @@ describe('TagorasBidAdapter', function () {
|
|
|
595
606
|
|
|
596
607
|
it('should get new unique deal id on expiration', function (done) {
|
|
597
608
|
setTimeout(() => {
|
|
598
|
-
const current = getUniqueDealId(key, 100);
|
|
609
|
+
const current = getUniqueDealId(storage, key, 100);
|
|
599
610
|
expect(current).to.not.be.equal(uniqueDealId);
|
|
600
611
|
done();
|
|
601
612
|
}, 200)
|
|
@@ -619,8 +630,8 @@ describe('TagorasBidAdapter', function () {
|
|
|
619
630
|
shouldAdvanceTime: true,
|
|
620
631
|
now
|
|
621
632
|
});
|
|
622
|
-
setStorageItem('myKey', 2020);
|
|
623
|
-
const {value, created} = getStorageItem('myKey');
|
|
633
|
+
setStorageItem(storage, 'myKey', 2020);
|
|
634
|
+
const {value, created} = getStorageItem(storage, 'myKey');
|
|
624
635
|
expect(created).to.be.equal(now);
|
|
625
636
|
expect(value).to.be.equal(2020);
|
|
626
637
|
expect(typeof value).to.be.equal('number');
|
|
@@ -631,7 +642,7 @@ describe('TagorasBidAdapter', function () {
|
|
|
631
642
|
it('should get external stored value', function () {
|
|
632
643
|
const value = 'superman'
|
|
633
644
|
window.localStorage.setItem('myExternalKey', value);
|
|
634
|
-
const item = getStorageItem('myExternalKey');
|
|
645
|
+
const item = getStorageItem(storage, 'myExternalKey');
|
|
635
646
|
expect(item).to.be.equal(value);
|
|
636
647
|
});
|
|
637
648
|
|
|
@@ -2,12 +2,7 @@ import {expect} from 'chai';
|
|
|
2
2
|
import {
|
|
3
3
|
spec as adapter,
|
|
4
4
|
createDomain,
|
|
5
|
-
|
|
6
|
-
getStorageItem,
|
|
7
|
-
setStorageItem,
|
|
8
|
-
tryParseJSON,
|
|
9
|
-
getUniqueDealId,
|
|
10
|
-
webSessionId
|
|
5
|
+
storage
|
|
11
6
|
} from 'modules/twistDigitalBidAdapter.js';
|
|
12
7
|
import * as utils from 'src/utils.js';
|
|
13
8
|
import {version} from 'package.json';
|
|
@@ -18,7 +13,12 @@ import {deepSetValue} from 'src/utils.js';
|
|
|
18
13
|
import {
|
|
19
14
|
extractPID,
|
|
20
15
|
extractCID,
|
|
21
|
-
extractSubDomain
|
|
16
|
+
extractSubDomain,
|
|
17
|
+
hashCode,
|
|
18
|
+
getStorageItem,
|
|
19
|
+
setStorageItem,
|
|
20
|
+
tryParseJSON,
|
|
21
|
+
getUniqueDealId
|
|
22
22
|
} from '../../../libraries/vidazooUtils/bidderUtils.js';
|
|
23
23
|
|
|
24
24
|
export const TEST_ID_SYSTEMS = ['britepoolid', 'criteoId', 'id5id', 'idl_env', 'lipb', 'netId', 'parrableId', 'pubcid', 'tdid', 'pubProvidedId'];
|
|
@@ -357,7 +357,6 @@ describe('TwistDigitalBidAdapter', function () {
|
|
|
357
357
|
uniqueDealId: `${hashUrl}_${Date.now().toString()}`,
|
|
358
358
|
uqs: getTopWindowQueryParams(),
|
|
359
359
|
isStorageAllowed: true,
|
|
360
|
-
webSessionId: webSessionId,
|
|
361
360
|
mediaTypes: {
|
|
362
361
|
video: {
|
|
363
362
|
api: [2],
|
|
@@ -455,8 +454,7 @@ describe('TwistDigitalBidAdapter', function () {
|
|
|
455
454
|
name: 'example.com',
|
|
456
455
|
segment: [{id: '243'}],
|
|
457
456
|
},
|
|
458
|
-
]
|
|
459
|
-
webSessionId: webSessionId
|
|
457
|
+
]
|
|
460
458
|
}
|
|
461
459
|
});
|
|
462
460
|
});
|
|
@@ -542,8 +540,7 @@ describe('TwistDigitalBidAdapter', function () {
|
|
|
542
540
|
name: 'example.com',
|
|
543
541
|
segment: [{id: '243'}],
|
|
544
542
|
},
|
|
545
|
-
]
|
|
546
|
-
webSessionId: webSessionId
|
|
543
|
+
]
|
|
547
544
|
};
|
|
548
545
|
|
|
549
546
|
const REQUEST_DATA2 = utils.deepClone(REQUEST_DATA);
|
|
@@ -740,8 +737,6 @@ describe('TwistDigitalBidAdapter', function () {
|
|
|
740
737
|
switch (idSystemProvider) {
|
|
741
738
|
case 'lipb':
|
|
742
739
|
return {lipbid: id};
|
|
743
|
-
case 'parrableId':
|
|
744
|
-
return {eid: id};
|
|
745
740
|
case 'id5id':
|
|
746
741
|
return {uid: id};
|
|
747
742
|
default:
|
|
@@ -807,13 +802,13 @@ describe('TwistDigitalBidAdapter', function () {
|
|
|
807
802
|
const key = 'myKey';
|
|
808
803
|
let uniqueDealId;
|
|
809
804
|
beforeEach(() => {
|
|
810
|
-
uniqueDealId = getUniqueDealId(key, 0);
|
|
805
|
+
uniqueDealId = getUniqueDealId(storage, key, 0);
|
|
811
806
|
})
|
|
812
807
|
|
|
813
808
|
it('should get current unique deal id', function (done) {
|
|
814
809
|
// waiting some time so `now` will become past
|
|
815
810
|
setTimeout(() => {
|
|
816
|
-
const current = getUniqueDealId(key);
|
|
811
|
+
const current = getUniqueDealId(storage, key);
|
|
817
812
|
expect(current).to.be.equal(uniqueDealId);
|
|
818
813
|
done();
|
|
819
814
|
}, 200);
|
|
@@ -821,7 +816,7 @@ describe('TwistDigitalBidAdapter', function () {
|
|
|
821
816
|
|
|
822
817
|
it('should get new unique deal id on expiration', function (done) {
|
|
823
818
|
setTimeout(() => {
|
|
824
|
-
const current = getUniqueDealId(key, 100);
|
|
819
|
+
const current = getUniqueDealId(storage, key, 100);
|
|
825
820
|
expect(current).to.not.be.equal(uniqueDealId);
|
|
826
821
|
done();
|
|
827
822
|
}, 200)
|
|
@@ -845,8 +840,8 @@ describe('TwistDigitalBidAdapter', function () {
|
|
|
845
840
|
shouldAdvanceTime: true,
|
|
846
841
|
now
|
|
847
842
|
});
|
|
848
|
-
setStorageItem('myKey', 2020);
|
|
849
|
-
const {value, created} = getStorageItem('myKey');
|
|
843
|
+
setStorageItem(storage, 'myKey', 2020);
|
|
844
|
+
const {value, created} = getStorageItem(storage, 'myKey');
|
|
850
845
|
expect(created).to.be.equal(now);
|
|
851
846
|
expect(value).to.be.equal(2020);
|
|
852
847
|
expect(typeof value).to.be.equal('number');
|
|
@@ -857,7 +852,7 @@ describe('TwistDigitalBidAdapter', function () {
|
|
|
857
852
|
it('should get external stored value', function () {
|
|
858
853
|
const value = 'superman'
|
|
859
854
|
window.localStorage.setItem('myExternalKey', value);
|
|
860
|
-
const item = getStorageItem('myExternalKey');
|
|
855
|
+
const item = getStorageItem(storage, 'myExternalKey');
|
|
861
856
|
expect(item).to.be.equal(value);
|
|
862
857
|
});
|
|
863
858
|
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {spec, converter} from 'modules/viantOrtbBidAdapter.js';
|
|
2
2
|
import {assert, expect} from 'chai';
|
|
3
|
-
import {
|
|
3
|
+
import {deepClone} from '../../../src/utils';
|
|
4
4
|
import {buildWindowTree} from '../../helpers/refererDetectionHelper';
|
|
5
5
|
import {detectReferer} from '../../../src/refererDetection';
|
|
6
|
+
|
|
6
7
|
describe('viantOrtbBidAdapter', function () {
|
|
7
8
|
function testBuildRequests(bidRequests, bidderRequestBase) {
|
|
8
9
|
let clonedBidderRequest = deepClone(bidderRequestBase);
|
|
@@ -10,7 +11,8 @@ describe('viantOrtbBidAdapter', function () {
|
|
|
10
11
|
let requests = spec.buildRequests(bidRequests, clonedBidderRequest);
|
|
11
12
|
return requests
|
|
12
13
|
}
|
|
13
|
-
|
|
14
|
+
|
|
15
|
+
describe('isBidRequestValid', function () {
|
|
14
16
|
function makeBid() {
|
|
15
17
|
return {
|
|
16
18
|
'bidder': 'viant',
|
|
@@ -46,9 +48,7 @@ describe('viantOrtbBidAdapter', function () {
|
|
|
46
48
|
it('should return true if placementId is not passed ', function () {
|
|
47
49
|
let bid = makeBid();
|
|
48
50
|
delete bid.params.placementId;
|
|
49
|
-
bid.ortb2Imp = {
|
|
50
|
-
|
|
51
|
-
}
|
|
51
|
+
bid.ortb2Imp = {}
|
|
52
52
|
expect(spec.isBidRequestValid(bid)).to.equal(true);
|
|
53
53
|
});
|
|
54
54
|
|
|
@@ -98,6 +98,7 @@ describe('viantOrtbBidAdapter', function () {
|
|
|
98
98
|
'transactionId': '4008d88a-8137-410b-aa35-fbfdabcb478e'
|
|
99
99
|
}
|
|
100
100
|
}
|
|
101
|
+
|
|
101
102
|
it('should return true when required params found', function () {
|
|
102
103
|
expect(spec.isBidRequestValid(makeBid())).to.equal(true);
|
|
103
104
|
});
|
|
@@ -141,6 +142,7 @@ describe('viantOrtbBidAdapter', function () {
|
|
|
141
142
|
'transactionId': '4008d88a-8137-410b-aa35-fbfdabcb478e'
|
|
142
143
|
}
|
|
143
144
|
}
|
|
145
|
+
|
|
144
146
|
it('should return true when required params found', function () {
|
|
145
147
|
expect(spec.isBidRequestValid(makeBid())).to.equal(true);
|
|
146
148
|
});
|
|
@@ -180,6 +182,57 @@ describe('viantOrtbBidAdapter', function () {
|
|
|
180
182
|
'src': 'client',
|
|
181
183
|
'bidRequestsCount': 1
|
|
182
184
|
}];
|
|
185
|
+
const basePMPDealsBidRequests = [{
|
|
186
|
+
'bidder': 'viant',
|
|
187
|
+
'params': {
|
|
188
|
+
'publisherId': '464',
|
|
189
|
+
'placementId': '1'
|
|
190
|
+
},
|
|
191
|
+
'ortb2Imp': {
|
|
192
|
+
'pmp': {
|
|
193
|
+
'private_auction': 0,
|
|
194
|
+
'deals': [
|
|
195
|
+
{
|
|
196
|
+
'id': '1234567',
|
|
197
|
+
'at': 3,
|
|
198
|
+
'bidfloor': 25,
|
|
199
|
+
'bidfloorcur': 'USD',
|
|
200
|
+
'ext': {
|
|
201
|
+
'must_bid': 1,
|
|
202
|
+
'private_auction': 1
|
|
203
|
+
}
|
|
204
|
+
},
|
|
205
|
+
{
|
|
206
|
+
'id': '1234568',
|
|
207
|
+
'at': 3,
|
|
208
|
+
'bidfloor': 25,
|
|
209
|
+
'bidfloorcur': 'USD',
|
|
210
|
+
'ext': {
|
|
211
|
+
'must_bid': 0
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
]
|
|
215
|
+
},
|
|
216
|
+
},
|
|
217
|
+
'mediaTypes': {
|
|
218
|
+
'banner': {
|
|
219
|
+
'sizes': [[728, 90]]
|
|
220
|
+
}
|
|
221
|
+
},
|
|
222
|
+
'gdprConsent': {
|
|
223
|
+
'consentString': 'consentString',
|
|
224
|
+
'gdprApplies': true,
|
|
225
|
+
},
|
|
226
|
+
'uspConsent': '1YYY',
|
|
227
|
+
'sizes': [[728, 90]],
|
|
228
|
+
'transactionId': '1111474f-58b1-4368-b812-84f8c937a099',
|
|
229
|
+
'adUnitCode': 'div-gpt-ad-1460505748561-0',
|
|
230
|
+
'bidId': '243310435309b5',
|
|
231
|
+
'bidderRequestId': '18084284054531',
|
|
232
|
+
'auctionId': 'e7b34fa3-8654-424e-8c49-03e509e53d8c',
|
|
233
|
+
'src': 'client',
|
|
234
|
+
'bidRequestsCount': 1
|
|
235
|
+
}];
|
|
183
236
|
|
|
184
237
|
const testWindow = buildWindowTree(['https://www.example.com/test', 'https://www.example.com/other/page', 'https://www.example.com/third/page'], 'https://othersite.com/', 'https://example.com/canonical/page');
|
|
185
238
|
const baseBidderRequestReferer = detectReferer(testWindow)();
|
|
@@ -236,6 +289,34 @@ describe('viantOrtbBidAdapter', function () {
|
|
|
236
289
|
const requestBody = testBuildRequests(clonedBannerRequests, baseBidderRequest)[0].data;
|
|
237
290
|
expect(requestBody.imp[0].banner.pos).to.equal(1);
|
|
238
291
|
});
|
|
292
|
+
it('includes the deals in the bid request', function () {
|
|
293
|
+
const requestBody = testBuildRequests(basePMPDealsBidRequests, baseBidderRequest)[0].data;
|
|
294
|
+
expect(requestBody.imp[0].pmp).to.be.not.null;
|
|
295
|
+
expect(requestBody.imp[0].pmp).to.deep.equal({
|
|
296
|
+
'private_auction': 0,
|
|
297
|
+
'deals': [
|
|
298
|
+
{
|
|
299
|
+
'id': '1234567',
|
|
300
|
+
'at': 3,
|
|
301
|
+
'bidfloor': 25,
|
|
302
|
+
'bidfloorcur': 'USD',
|
|
303
|
+
'ext': {
|
|
304
|
+
'must_bid': 1,
|
|
305
|
+
'private_auction': 1
|
|
306
|
+
}
|
|
307
|
+
},
|
|
308
|
+
{
|
|
309
|
+
'id': '1234568',
|
|
310
|
+
'at': 3,
|
|
311
|
+
'bidfloor': 25,
|
|
312
|
+
'bidfloorcur': 'USD',
|
|
313
|
+
'ext': {
|
|
314
|
+
'must_bid': 0
|
|
315
|
+
}
|
|
316
|
+
}
|
|
317
|
+
]
|
|
318
|
+
});
|
|
319
|
+
});
|
|
239
320
|
});
|
|
240
321
|
|
|
241
322
|
if (FEATURES.VIDEO) {
|
|
@@ -4,6 +4,7 @@ import { config } from 'src/config.js';
|
|
|
4
4
|
import { newBidder } from 'src/adapters/bidderFactory.js';
|
|
5
5
|
import * as utils from 'src/utils.js';
|
|
6
6
|
import { makeSlot } from '../integration/faker/googletag.js';
|
|
7
|
+
import { mergeDeep } from '../../../src/utils.js';
|
|
7
8
|
|
|
8
9
|
describe('VisxAdapter', function () {
|
|
9
10
|
const adapter = newBidder(spec);
|
|
@@ -2161,4 +2162,183 @@ describe('VisxAdapter', function () {
|
|
|
2161
2162
|
expect(request.data.user.ext.vads).to.be.a('string');
|
|
2162
2163
|
});
|
|
2163
2164
|
});
|
|
2165
|
+
|
|
2166
|
+
describe('ortb2 data', function () {
|
|
2167
|
+
const bidRequests = [
|
|
2168
|
+
{
|
|
2169
|
+
'bidder': 'visx',
|
|
2170
|
+
'params': {
|
|
2171
|
+
'uid': 903535
|
|
2172
|
+
},
|
|
2173
|
+
'adUnitCode': 'adunit-code-1',
|
|
2174
|
+
'sizes': [[300, 250], [300, 600]],
|
|
2175
|
+
'bidId': '30b31c1838de1e',
|
|
2176
|
+
'bidderRequestId': '22edbae2733bf6',
|
|
2177
|
+
'auctionId': '1d1a030790a475'
|
|
2178
|
+
}
|
|
2179
|
+
];
|
|
2180
|
+
const bidderRequest = {
|
|
2181
|
+
timeout: 3000,
|
|
2182
|
+
refererInfo: {
|
|
2183
|
+
page: 'https://example.com'
|
|
2184
|
+
},
|
|
2185
|
+
'ortb2': {
|
|
2186
|
+
'device': {
|
|
2187
|
+
'w': 1259,
|
|
2188
|
+
'h': 934,
|
|
2189
|
+
'dnt': 0,
|
|
2190
|
+
'ua': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36',
|
|
2191
|
+
'language': 'tr',
|
|
2192
|
+
'sua': {
|
|
2193
|
+
'source': 1,
|
|
2194
|
+
'platform': {
|
|
2195
|
+
'brand': 'macOS'
|
|
2196
|
+
},
|
|
2197
|
+
'browsers': [
|
|
2198
|
+
{
|
|
2199
|
+
'brand': 'Chromium',
|
|
2200
|
+
'version': [ '124' ]
|
|
2201
|
+
},
|
|
2202
|
+
{
|
|
2203
|
+
'brand': 'Google Chrome',
|
|
2204
|
+
'version': [ '124' ]
|
|
2205
|
+
},
|
|
2206
|
+
{
|
|
2207
|
+
'brand': 'Not-A.Brand',
|
|
2208
|
+
'version': [ '99' ]
|
|
2209
|
+
}
|
|
2210
|
+
],
|
|
2211
|
+
'mobile': 0
|
|
2212
|
+
},
|
|
2213
|
+
'ext': {
|
|
2214
|
+
'cdep': 'treatment_1.1'
|
|
2215
|
+
}
|
|
2216
|
+
},
|
|
2217
|
+
'site': {
|
|
2218
|
+
'domain': 'localhost:9999',
|
|
2219
|
+
'publisher': {
|
|
2220
|
+
'domain': 'localhost:9999'
|
|
2221
|
+
},
|
|
2222
|
+
'page': 'http://localhost:9999/integrationExamples/gpt/hello_world.html'
|
|
2223
|
+
},
|
|
2224
|
+
'user': {
|
|
2225
|
+
'keywords': 'x,y',
|
|
2226
|
+
'data': [
|
|
2227
|
+
{
|
|
2228
|
+
'name': 'exampleprovider.de',
|
|
2229
|
+
'ext': {
|
|
2230
|
+
'segtax': 5
|
|
2231
|
+
},
|
|
2232
|
+
'segment': [
|
|
2233
|
+
{
|
|
2234
|
+
'id': '1'
|
|
2235
|
+
}
|
|
2236
|
+
]
|
|
2237
|
+
},
|
|
2238
|
+
{
|
|
2239
|
+
'ext': {
|
|
2240
|
+
'segtax': 601,
|
|
2241
|
+
'segclass': '5'
|
|
2242
|
+
},
|
|
2243
|
+
'segment': [
|
|
2244
|
+
{
|
|
2245
|
+
'id': '140'
|
|
2246
|
+
}
|
|
2247
|
+
],
|
|
2248
|
+
'name': 'pa.openx.net'
|
|
2249
|
+
},
|
|
2250
|
+
{
|
|
2251
|
+
'ext': {
|
|
2252
|
+
'segtax': 601,
|
|
2253
|
+
'segclass': '5'
|
|
2254
|
+
},
|
|
2255
|
+
'segment': [
|
|
2256
|
+
{
|
|
2257
|
+
'id': '140'
|
|
2258
|
+
}
|
|
2259
|
+
],
|
|
2260
|
+
'name': 'ads.pubmatic.com'
|
|
2261
|
+
}
|
|
2262
|
+
],
|
|
2263
|
+
'ext': {
|
|
2264
|
+
'data': {
|
|
2265
|
+
'registered': true,
|
|
2266
|
+
'interests': [
|
|
2267
|
+
'ads'
|
|
2268
|
+
]
|
|
2269
|
+
}
|
|
2270
|
+
}
|
|
2271
|
+
}
|
|
2272
|
+
}
|
|
2273
|
+
};
|
|
2274
|
+
|
|
2275
|
+
it('should pass interests if ortb2 has interests in user data', function () {
|
|
2276
|
+
const request = spec.buildRequests(bidRequests, bidderRequest);
|
|
2277
|
+
expect(request.data.user.ext.data.interests).not.to.be.undefined;
|
|
2278
|
+
});
|
|
2279
|
+
|
|
2280
|
+
it('should pass device if ortb2 has device', function () {
|
|
2281
|
+
const request = spec.buildRequests(bidRequests, bidderRequest);
|
|
2282
|
+
expect(request.data.device).not.to.be.undefined;
|
|
2283
|
+
});
|
|
2284
|
+
|
|
2285
|
+
it('should pass site if ortb2 has site', function () {
|
|
2286
|
+
const request = spec.buildRequests(bidRequests, bidderRequest);
|
|
2287
|
+
expect(request.data.site).not.to.be.undefined;
|
|
2288
|
+
});
|
|
2289
|
+
|
|
2290
|
+
it('should merge if user object exists', function () {
|
|
2291
|
+
const user = {
|
|
2292
|
+
'ext': {
|
|
2293
|
+
'vads': 'cXaIRA425BmynEN1ratEnc_5e',
|
|
2294
|
+
'data': {
|
|
2295
|
+
'registered': true,
|
|
2296
|
+
'interests': [
|
|
2297
|
+
'ads'
|
|
2298
|
+
]
|
|
2299
|
+
}
|
|
2300
|
+
},
|
|
2301
|
+
'keywords': 'x,y',
|
|
2302
|
+
'data': [
|
|
2303
|
+
{
|
|
2304
|
+
'name': 'exampleprovider.de',
|
|
2305
|
+
'ext': {
|
|
2306
|
+
'segtax': 5
|
|
2307
|
+
},
|
|
2308
|
+
'segment': [
|
|
2309
|
+
{
|
|
2310
|
+
'id': '1'
|
|
2311
|
+
}
|
|
2312
|
+
]
|
|
2313
|
+
}
|
|
2314
|
+
]
|
|
2315
|
+
};
|
|
2316
|
+
const userOrtb2 = {
|
|
2317
|
+
'keywords': 'x,y',
|
|
2318
|
+
'data': [
|
|
2319
|
+
{
|
|
2320
|
+
'name': 'exampleprovider.de',
|
|
2321
|
+
'ext': {
|
|
2322
|
+
'segtax': 5
|
|
2323
|
+
},
|
|
2324
|
+
'segment': [
|
|
2325
|
+
{
|
|
2326
|
+
'id': '1'
|
|
2327
|
+
}
|
|
2328
|
+
]
|
|
2329
|
+
}
|
|
2330
|
+
],
|
|
2331
|
+
'ext': {
|
|
2332
|
+
'data': {
|
|
2333
|
+
'registered': true,
|
|
2334
|
+
'interests': [
|
|
2335
|
+
'ads'
|
|
2336
|
+
]
|
|
2337
|
+
}
|
|
2338
|
+
}
|
|
2339
|
+
}
|
|
2340
|
+
const userReq = mergeDeep(user, userOrtb2);
|
|
2341
|
+
expect(userReq.ext.vads).not.to.be.undefined;
|
|
2342
|
+
});
|
|
2343
|
+
});
|
|
2164
2344
|
});
|
|
@@ -132,6 +132,9 @@ describe('Zeta Ssp Bid Adapter', function () {
|
|
|
132
132
|
userIdAsEids: eids,
|
|
133
133
|
timeout: 500,
|
|
134
134
|
ortb2: {
|
|
135
|
+
site: {
|
|
136
|
+
inventorypartnerdomain: 'disqus.com'
|
|
137
|
+
},
|
|
135
138
|
device: {
|
|
136
139
|
sua: {
|
|
137
140
|
mobile: 1,
|
|
@@ -709,4 +712,12 @@ describe('Zeta Ssp Bid Adapter', function () {
|
|
|
709
712
|
expect(payload.ext.tags.nullTag).to.be.undefined;
|
|
710
713
|
expect(payload.ext.tags.complexEmptyTag).to.be.undefined;
|
|
711
714
|
});
|
|
715
|
+
|
|
716
|
+
it('Test that site payload param are merged from ortb2 and params', function () {
|
|
717
|
+
const request = spec.buildRequests(bannerRequest, bannerRequest[0]);
|
|
718
|
+
const payload = JSON.parse(request.data);
|
|
719
|
+
|
|
720
|
+
expect(payload.site.page).to.eql('zetaglobal.com/page');
|
|
721
|
+
expect(payload.site.inventorypartnerdomain).to.eql('disqus.com');
|
|
722
|
+
});
|
|
712
723
|
});
|
|
@@ -26,7 +26,7 @@ import {enrichFPD} from '../../../src/fpd/enrichment.js';
|
|
|
26
26
|
import {mockFpdEnrichments} from '../../helpers/fpd.js';
|
|
27
27
|
import {generateUUID} from '../../../src/utils.js';
|
|
28
28
|
import {getCreativeRenderer} from '../../../src/creativeRenderers.js';
|
|
29
|
-
import {
|
|
29
|
+
import {BID_STATUS, EVENTS, GRANULARITY_OPTIONS, PB_LOCATOR, TARGETING_KEYS} from 'src/constants.js';
|
|
30
30
|
import {getBidToRender} from '../../../src/adRendering.js';
|
|
31
31
|
|
|
32
32
|
var assert = require('chai').assert;
|
|
@@ -236,6 +236,11 @@ describe('Unit: Prebid Module', function () {
|
|
|
236
236
|
getBidToRender.getHooks({hook: getBidToRenderHook}).remove();
|
|
237
237
|
});
|
|
238
238
|
|
|
239
|
+
it('should insert a locator frame on the page', () => {
|
|
240
|
+
$$PREBID_GLOBAL$$.processQueue();
|
|
241
|
+
expect(window.frames[PB_LOCATOR]).to.exist;
|
|
242
|
+
})
|
|
243
|
+
|
|
239
244
|
describe('and global adUnits', () => {
|
|
240
245
|
const startingAdUnits = [
|
|
241
246
|
{
|