prebid.js 8.26.0 → 8.28.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/33acrossAnalyticsAdapter.js +1 -1
- package/dist/33acrossBidAdapter.js +1 -1
- package/dist/33acrossIdSystem.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/adnuntiusBidAdapter.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/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/bizzclickBidAdapter.js +1 -1
- package/dist/bridBidAdapter.js +1 -1
- package/dist/bridgewellBidAdapter.js +1 -1
- package/dist/brightMountainMediaBidAdapter.js +1 -1
- package/dist/browsiRtdProvider.js +1 -1
- package/dist/carodaBidAdapter.js +1 -1
- package/dist/chtnwBidAdapter.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/craftBidAdapter.js +1 -1
- package/dist/criteoBidAdapter.js +1 -1
- package/dist/cwireBidAdapter.js +1 -1
- package/dist/deepintentBidAdapter.js +1 -1
- package/dist/dependencies.json +3 -0
- 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/feedadBidAdapter.js +1 -1
- package/dist/finativeBidAdapter.js +1 -1
- package/dist/flippBidAdapter.js +1 -1
- package/dist/freewheel-sspBidAdapter.js +1 -1
- package/dist/geoedgeRtdProvider.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/growthCodeRtdProvider.js +1 -1
- package/dist/gumgumBidAdapter.js +1 -1
- package/dist/h12mediaBidAdapter.js +1 -1
- package/dist/hypelabBidAdapter.js +1 -1
- package/dist/id5IdSystem.js +1 -1
- package/dist/identityLinkIdSystem.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/invibesBidAdapter.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/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/magniteAnalyticsAdapter.js +1 -1
- package/dist/malltvAnalyticsAdapter.js +1 -1
- package/dist/marsmediaBidAdapter.js +1 -1
- package/dist/mediafuseBidAdapter.js +1 -1
- package/dist/mediagoBidAdapter.js +1 -1
- package/dist/mediasquareBidAdapter.js +1 -1
- package/dist/mgidBidAdapter.js +1 -1
- package/dist/mgidXBidAdapter.js +1 -1
- package/dist/minutemediaBidAdapter.js +1 -1
- package/dist/minutemediaplusBidAdapter.js +1 -1
- package/dist/nextMillenniumBidAdapter.js +1 -1
- package/dist/nexx360BidAdapter.js +1 -1
- package/dist/not-for-prod/prebid.js +156 -156
- package/dist/oguryBidAdapter.js +1 -1
- package/dist/onetagBidAdapter.js +1 -1
- package/dist/ooloAnalyticsAdapter.js +1 -1
- package/dist/openxBidAdapter.js +1 -1
- package/dist/optidigitalBidAdapter.js +1 -1
- package/dist/outbrainBidAdapter.js +1 -1
- package/dist/parrableIdSystem.js +1 -1
- package/dist/pgamsspBidAdapter.js +1 -1
- package/dist/pixfutureBidAdapter.js +1 -1
- package/dist/prebid-core.js +2 -2
- 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 -1
- package/dist/rhythmoneBidAdapter.js +1 -1
- package/dist/riseBidAdapter.js +1 -1
- package/dist/rtdModule.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/sonobiBidAdapter.js +1 -1
- package/dist/sovrnAnalyticsAdapter.js +1 -1
- package/dist/sovrnBidAdapter.js +1 -1
- package/dist/sparteoBidAdapter.js +1 -1
- package/dist/sspBCBidAdapter.js +1 -1
- package/dist/stvBidAdapter.js +1 -1
- package/dist/sublimeBidAdapter.js +1 -1
- package/dist/taboolaBidAdapter.js +1 -1
- package/dist/targetVideoBidAdapter.js +1 -1
- package/dist/teadsBidAdapter.js +1 -1
- package/dist/theAdxBidAdapter.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/unrulyBidAdapter.js +1 -1
- package/dist/userId.js +1 -1
- package/dist/viantOrtbBidAdapter.js +1 -1
- package/dist/vidazooBidAdapter.js +1 -1
- package/dist/videobyteBidAdapter.js +1 -1
- package/dist/visxBidAdapter.js +1 -1
- package/dist/voxBidAdapter.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/yieldmoBidAdapter.js +1 -1
- package/dist/yieldoneAnalyticsAdapter.js +1 -1
- package/modules/adagioAnalyticsAdapter.js +52 -6
- package/modules/adagioBidAdapter.js +25 -16
- package/modules/adnuntiusBidAdapter.js +25 -21
- package/modules/bizzclickBidAdapter.js +55 -300
- package/modules/bizzclickBidAdapter.md +94 -89
- package/modules/browsiRtdProvider.js +2 -2
- package/modules/criteoBidAdapter.js +1 -0
- package/modules/deepintentBidAdapter.js +2 -0
- package/modules/flippBidAdapter.js +1 -1
- package/modules/geoedgeRtdProvider.js +4 -2
- package/modules/growthCodeRtdProvider.js +2 -2
- package/modules/gumgumBidAdapter.js +3 -3
- package/modules/identityLinkIdSystem.js +1 -2
- package/modules/invibesBidAdapter.js +50 -6
- package/modules/liveIntentIdSystem.js +17 -1
- package/modules/mediagoBidAdapter.js +106 -34
- package/modules/mgidXBidAdapter.js +6 -1
- package/modules/minutemediaBidAdapter.js +9 -7
- package/modules/minutemediaBidAdapter.md +1 -0
- package/modules/nextMillenniumBidAdapter.js +170 -113
- package/modules/pgamsspBidAdapter.js +18 -1
- package/modules/pubmaticAnalyticsAdapter.js +30 -9
- package/modules/pubmaticBidAdapter.js +3 -1
- package/modules/riseBidAdapter.js +11 -8
- package/modules/riseBidAdapter.md +1 -0
- package/modules/rtdModule/index.js +2 -1
- package/modules/sovrnBidAdapter.js +5 -0
- package/modules/sparteoBidAdapter.js +10 -5
- package/modules/taboolaBidAdapter.js +8 -0
- package/modules/teadsBidAdapter.js +7 -0
- package/modules/theAdxBidAdapter.js +10 -2
- package/modules/theAdxBidAdapter.md +10 -9
- package/modules/unrulyBidAdapter.js +8 -1
- package/modules/userId/eids.js +2 -2
- package/modules/viantOrtbBidAdapter.js +1 -1
- package/modules/visxBidAdapter.js +23 -0
- package/modules/voxBidAdapter.js +2 -0
- package/package.json +1 -1
- package/src/auction.js +1 -1
- package/src/constants.json +5 -2
- package/src/events.js +1 -1
- package/test/spec/modules/adagioAnalyticsAdapter_spec.js +83 -26
- package/test/spec/modules/adagioBidAdapter_spec.js +0 -11
- package/test/spec/modules/adnuntiusBidAdapter_spec.js +1 -1
- package/test/spec/modules/bizzclickBidAdapter_spec.js +229 -340
- package/test/spec/modules/browsiRtdProvider_spec.js +0 -6
- package/test/spec/modules/criteoBidAdapter_spec.js +24 -0
- package/test/spec/modules/eids_spec.js +35 -2
- package/test/spec/modules/geoedgeRtdProvider_spec.js +10 -0
- package/test/spec/modules/gumgumBidAdapter_spec.js +8 -0
- package/test/spec/modules/identityLinkIdSystem_spec.js +0 -18
- package/test/spec/modules/invibesBidAdapter_spec.js +99 -0
- package/test/spec/modules/liveIntentIdMinimalSystem_spec.js +5 -0
- package/test/spec/modules/liveIntentIdSystem_spec.js +5 -0
- package/test/spec/modules/mediagoBidAdapter_spec.js +107 -23
- package/test/spec/modules/mgidXBidAdapter_spec.js +9 -4
- package/test/spec/modules/minutemediaBidAdapter_spec.js +10 -0
- package/test/spec/modules/nextMillenniumBidAdapter_spec.js +503 -80
- package/test/spec/modules/pgamsspBidAdapter_spec.js +1 -0
- package/test/spec/modules/pubmaticAnalyticsAdapter_spec.js +51 -0
- package/test/spec/modules/pubmaticBidAdapter_spec.js +8 -0
- package/test/spec/modules/riseBidAdapter_spec.js +11 -1
- package/test/spec/modules/sovrnBidAdapter_spec.js +35 -0
- package/test/spec/modules/sparteoBidAdapter_spec.js +8 -2
- package/test/spec/modules/taboolaBidAdapter_spec.js +45 -1
- package/test/spec/modules/teadsBidAdapter_spec.js +58 -0
- package/test/spec/modules/theAdxBidAdapter_spec.js +72 -0
- package/test/spec/modules/unrulyBidAdapter_spec.js +7 -4
- package/test/spec/modules/userId_spec.js +19 -1
- package/test/spec/modules/viantOrtbBidAdapter_spec.js +1 -1
- package/test/spec/modules/visxBidAdapter_spec.js +39 -1
- package/test/spec/unit/core/events_spec.js +17 -2
- package/test/spec/unit/pbjs_api_spec.js +7 -0
|
@@ -238,6 +238,39 @@ describe('eids array generation for known sub-modules', function() {
|
|
|
238
238
|
});
|
|
239
239
|
});
|
|
240
240
|
|
|
241
|
+
it('sovrn', function() {
|
|
242
|
+
const userId = {
|
|
243
|
+
sovrn: {'id': 'sample_id'}
|
|
244
|
+
};
|
|
245
|
+
const newEids = createEidsArray(userId);
|
|
246
|
+
expect(newEids.length).to.equal(1);
|
|
247
|
+
expect(newEids[0]).to.deep.equal({
|
|
248
|
+
source: 'liveintent.sovrn.com',
|
|
249
|
+
uids: [{
|
|
250
|
+
id: 'sample_id',
|
|
251
|
+
atype: 3
|
|
252
|
+
}]
|
|
253
|
+
});
|
|
254
|
+
});
|
|
255
|
+
|
|
256
|
+
it('sovrn with ext', function() {
|
|
257
|
+
const userId = {
|
|
258
|
+
sovrn: {'id': 'sample_id', 'ext': {'provider': 'some.provider.com'}}
|
|
259
|
+
};
|
|
260
|
+
const newEids = createEidsArray(userId);
|
|
261
|
+
expect(newEids.length).to.equal(1);
|
|
262
|
+
expect(newEids[0]).to.deep.equal({
|
|
263
|
+
source: 'liveintent.sovrn.com',
|
|
264
|
+
uids: [{
|
|
265
|
+
id: 'sample_id',
|
|
266
|
+
atype: 3,
|
|
267
|
+
ext: {
|
|
268
|
+
provider: 'some.provider.com'
|
|
269
|
+
}
|
|
270
|
+
}]
|
|
271
|
+
});
|
|
272
|
+
});
|
|
273
|
+
|
|
241
274
|
it('magnite', function() {
|
|
242
275
|
const userId = {
|
|
243
276
|
magnite: {'id': 'sample_id'}
|
|
@@ -311,7 +344,7 @@ describe('eids array generation for known sub-modules', function() {
|
|
|
311
344
|
const newEids = createEidsArray(userId);
|
|
312
345
|
expect(newEids.length).to.equal(1);
|
|
313
346
|
expect(newEids[0]).to.deep.equal({
|
|
314
|
-
source: 'openx.
|
|
347
|
+
source: 'openx.net',
|
|
315
348
|
uids: [{
|
|
316
349
|
id: 'sample_id',
|
|
317
350
|
atype: 3
|
|
@@ -326,7 +359,7 @@ describe('eids array generation for known sub-modules', function() {
|
|
|
326
359
|
const newEids = createEidsArray(userId);
|
|
327
360
|
expect(newEids.length).to.equal(1);
|
|
328
361
|
expect(newEids[0]).to.deep.equal({
|
|
329
|
-
source: 'openx.
|
|
362
|
+
source: 'openx.net',
|
|
330
363
|
uids: [{
|
|
331
364
|
id: 'sample_id',
|
|
332
365
|
atype: 3,
|
|
@@ -6,6 +6,7 @@ import {
|
|
|
6
6
|
getInPageUrl,
|
|
7
7
|
htmlPlaceholder,
|
|
8
8
|
setWrapper,
|
|
9
|
+
getMacros,
|
|
9
10
|
wrapper,
|
|
10
11
|
WRAPPER_URL
|
|
11
12
|
} from '../../../modules/geoedgeRtdProvider.js';
|
|
@@ -117,6 +118,15 @@ describe('Geoedge RTD module', function () {
|
|
|
117
118
|
expect(wrapper).to.equal(mockWrapper);
|
|
118
119
|
});
|
|
119
120
|
});
|
|
121
|
+
describe('getMacros', function () {
|
|
122
|
+
it('return a dictionary of macros replaced with values from bid object', function () {
|
|
123
|
+
let bid = mockBid('testBidder');
|
|
124
|
+
let dict = getMacros(bid, key);
|
|
125
|
+
let hasCpm = dict['%_hbCpm!'] === bid.cpm;
|
|
126
|
+
let hasCurrency = dict['%_hbCurrency!'] === bid.currency;
|
|
127
|
+
expect(hasCpm && hasCurrency);
|
|
128
|
+
});
|
|
129
|
+
});
|
|
120
130
|
describe('onBidResponseEvent', function () {
|
|
121
131
|
let bidFromA = mockBid('bidderA');
|
|
122
132
|
it('should wrap bid html when bidder is configured', function () {
|
|
@@ -297,6 +297,14 @@ describe('gumgumAdapter', function () {
|
|
|
297
297
|
expect(bidRequest.data.gpid).to.equal(pbadslot);
|
|
298
298
|
});
|
|
299
299
|
|
|
300
|
+
it('should set the global placement id (gpid) if media type is video', function () {
|
|
301
|
+
const pbadslot = 'cde456'
|
|
302
|
+
const req = { ...bidRequests[0], ortb2Imp: { ext: { data: { pbadslot } } }, params: zoneParam, mediaTypes: vidMediaTypes }
|
|
303
|
+
const bidRequest = spec.buildRequests([req])[0];
|
|
304
|
+
expect(bidRequest.data).to.have.property('gpid');
|
|
305
|
+
expect(bidRequest.data.gpid).to.equal(pbadslot);
|
|
306
|
+
});
|
|
307
|
+
|
|
300
308
|
it('should set the bid floor if getFloor module is not present but static bid floor is defined', function () {
|
|
301
309
|
const req = { ...bidRequests[0], params: { bidfloor: 42 } }
|
|
302
310
|
const bidRequest = spec.buildRequests([req])[0];
|
|
@@ -75,24 +75,6 @@ describe('IdentityLinkId tests', function () {
|
|
|
75
75
|
expect(submoduleCallback).to.be.undefined;
|
|
76
76
|
});
|
|
77
77
|
|
|
78
|
-
it('should call the LiveRamp envelope endpoint with IAB consent string v1', function () {
|
|
79
|
-
let callBackSpy = sinon.spy();
|
|
80
|
-
let consentData = {
|
|
81
|
-
gdprApplies: true,
|
|
82
|
-
consentString: 'BOkIpDSOkIpDSADABAENCc-AAAApOAFAAMAAsAMIAcAA_g'
|
|
83
|
-
};
|
|
84
|
-
let submoduleCallback = identityLinkSubmodule.getId(defaultConfigParams, consentData).callback;
|
|
85
|
-
submoduleCallback(callBackSpy);
|
|
86
|
-
let request = server.requests[0];
|
|
87
|
-
expect(request.url).to.be.eq('https://api.rlcdn.com/api/identity/envelope?pid=14&ct=1&cv=BOkIpDSOkIpDSADABAENCc-AAAApOAFAAMAAsAMIAcAA_g');
|
|
88
|
-
request.respond(
|
|
89
|
-
200,
|
|
90
|
-
responseHeader,
|
|
91
|
-
JSON.stringify({})
|
|
92
|
-
);
|
|
93
|
-
expect(callBackSpy.calledOnce).to.be.true;
|
|
94
|
-
});
|
|
95
|
-
|
|
96
78
|
it('should call the LiveRamp envelope endpoint with IAB consent string v2', function () {
|
|
97
79
|
let callBackSpy = sinon.spy();
|
|
98
80
|
let consentData = {
|
|
@@ -44,6 +44,78 @@ describe('invibesBidAdapter:', function () {
|
|
|
44
44
|
}
|
|
45
45
|
];
|
|
46
46
|
|
|
47
|
+
let bidRequestsWithDuplicatedplacementId = [
|
|
48
|
+
{
|
|
49
|
+
bidId: 'b1',
|
|
50
|
+
bidder: BIDDER_CODE,
|
|
51
|
+
bidderRequestId: 'r1',
|
|
52
|
+
params: {
|
|
53
|
+
placementId: PLACEMENT_ID,
|
|
54
|
+
disableUserSyncs: false
|
|
55
|
+
|
|
56
|
+
},
|
|
57
|
+
adUnitCode: 'test-div1',
|
|
58
|
+
auctionId: 'a1',
|
|
59
|
+
sizes: [
|
|
60
|
+
[300, 250],
|
|
61
|
+
[400, 300],
|
|
62
|
+
[125, 125]
|
|
63
|
+
],
|
|
64
|
+
transactionId: 't1'
|
|
65
|
+
}, {
|
|
66
|
+
bidId: 'b2',
|
|
67
|
+
bidder: BIDDER_CODE,
|
|
68
|
+
bidderRequestId: 'r2',
|
|
69
|
+
params: {
|
|
70
|
+
placementId: PLACEMENT_ID,
|
|
71
|
+
disableUserSyncs: false
|
|
72
|
+
},
|
|
73
|
+
adUnitCode: 'test-div2',
|
|
74
|
+
auctionId: 'a2',
|
|
75
|
+
sizes: [
|
|
76
|
+
[300, 250],
|
|
77
|
+
[400, 300]
|
|
78
|
+
],
|
|
79
|
+
transactionId: 't2'
|
|
80
|
+
}
|
|
81
|
+
];
|
|
82
|
+
|
|
83
|
+
let bidRequestsWithUniquePlacementId = [
|
|
84
|
+
{
|
|
85
|
+
bidId: 'b1',
|
|
86
|
+
bidder: BIDDER_CODE,
|
|
87
|
+
bidderRequestId: 'r1',
|
|
88
|
+
params: {
|
|
89
|
+
placementId: 'PLACEMENT_ID_1',
|
|
90
|
+
disableUserSyncs: false
|
|
91
|
+
|
|
92
|
+
},
|
|
93
|
+
adUnitCode: 'test-div1',
|
|
94
|
+
auctionId: 'a1',
|
|
95
|
+
sizes: [
|
|
96
|
+
[300, 250],
|
|
97
|
+
[400, 300],
|
|
98
|
+
[125, 125]
|
|
99
|
+
],
|
|
100
|
+
transactionId: 't1'
|
|
101
|
+
}, {
|
|
102
|
+
bidId: 'b2',
|
|
103
|
+
bidder: BIDDER_CODE,
|
|
104
|
+
bidderRequestId: 'r2',
|
|
105
|
+
params: {
|
|
106
|
+
placementId: 'PLACEMENT_ID_2',
|
|
107
|
+
disableUserSyncs: false
|
|
108
|
+
},
|
|
109
|
+
adUnitCode: 'test-div2',
|
|
110
|
+
auctionId: 'a2',
|
|
111
|
+
sizes: [
|
|
112
|
+
[300, 250],
|
|
113
|
+
[400, 300]
|
|
114
|
+
],
|
|
115
|
+
transactionId: 't2'
|
|
116
|
+
}
|
|
117
|
+
];
|
|
118
|
+
|
|
47
119
|
let bidRequestsWithUserId = [
|
|
48
120
|
{
|
|
49
121
|
bidId: 'b1',
|
|
@@ -185,17 +257,44 @@ describe('invibesBidAdapter:', function () {
|
|
|
185
257
|
expect(request.data.preventPageViewEvent).to.be.false;
|
|
186
258
|
});
|
|
187
259
|
|
|
260
|
+
it('sends isPlacementRefresh as false when the placement ids are used for the first time', function () {
|
|
261
|
+
let request = spec.buildRequests(bidRequestsWithUniquePlacementId, bidderRequestWithPageInfo);
|
|
262
|
+
expect(request.data.isPlacementRefresh).to.be.false;
|
|
263
|
+
});
|
|
264
|
+
|
|
188
265
|
it('sends preventPageViewEvent as true on 2nd call', function () {
|
|
189
266
|
let request = spec.buildRequests(bidRequests, bidderRequestWithPageInfo);
|
|
190
267
|
expect(request.data.preventPageViewEvent).to.be.true;
|
|
191
268
|
});
|
|
192
269
|
|
|
270
|
+
it('sends isPlacementRefresh as true on multi requests on the same placement id', function () {
|
|
271
|
+
let request = spec.buildRequests(bidRequestsWithDuplicatedplacementId, bidderRequestWithPageInfo);
|
|
272
|
+
expect(request.data.isPlacementRefresh).to.be.true;
|
|
273
|
+
});
|
|
274
|
+
|
|
275
|
+
it('sends isInfiniteScrollPage as false initially', function () {
|
|
276
|
+
let request = spec.buildRequests(bidRequests, bidderRequestWithPageInfo);
|
|
277
|
+
expect(request.data.isInfiniteScrollPage).to.be.false;
|
|
278
|
+
});
|
|
279
|
+
|
|
280
|
+
it('sends isPlacementRefresh as true on multi requests multiple calls with the same placement id from second call', function () {
|
|
281
|
+
let request = spec.buildRequests(bidRequests, bidderRequestWithPageInfo);
|
|
282
|
+
expect(request.data.isInfiniteScrollPage).to.be.false;
|
|
283
|
+
let duplicatedRequest = spec.buildRequests(bidRequests, bidderRequestWithPageInfo);
|
|
284
|
+
expect(duplicatedRequest.data.isPlacementRefresh).to.be.true;
|
|
285
|
+
});
|
|
286
|
+
|
|
193
287
|
it('sends bid request to ENDPOINT via GET', function () {
|
|
194
288
|
const request = spec.buildRequests(bidRequests, bidderRequestWithPageInfo);
|
|
195
289
|
expect(request.url).to.equal(ENDPOINT);
|
|
196
290
|
expect(request.method).to.equal('GET');
|
|
197
291
|
});
|
|
198
292
|
|
|
293
|
+
it('generates a visitId of length 32', function () {
|
|
294
|
+
spec.buildRequests(bidRequests, bidderRequestWithPageInfo);
|
|
295
|
+
expect(top.window.invibes.visitId.length).to.equal(32);
|
|
296
|
+
});
|
|
297
|
+
|
|
199
298
|
it('sends bid request to custom endpoint via GET', function () {
|
|
200
299
|
const request = spec.buildRequests([{
|
|
201
300
|
bidId: 'b1',
|
|
@@ -261,6 +261,11 @@ describe('LiveIntentMinimalId', function() {
|
|
|
261
261
|
expect(result).to.eql({'lipb': {'lipbid': 'foo', 'nonId': 'foo', 'medianet': 'bar'}, 'medianet': {'id': 'bar', 'ext': {'provider': 'liveintent.com'}}});
|
|
262
262
|
});
|
|
263
263
|
|
|
264
|
+
it('should decode a sovrn id to a seperate object when present', function() {
|
|
265
|
+
const result = liveIntentIdSubmodule.decode({ nonId: 'foo', sovrn: 'bar' });
|
|
266
|
+
expect(result).to.eql({'lipb': {'lipbid': 'foo', 'nonId': 'foo', 'sovrn': 'bar'}, 'sovrn': {'id': 'bar', 'ext': {'provider': 'liveintent.com'}}});
|
|
267
|
+
});
|
|
268
|
+
|
|
264
269
|
it('should decode a magnite id to a seperate object when present', function() {
|
|
265
270
|
const result = liveIntentIdSubmodule.decode({ nonId: 'foo', magnite: 'bar' });
|
|
266
271
|
expect(result).to.eql({'lipb': {'lipbid': 'foo', 'nonId': 'foo', 'magnite': 'bar'}, 'magnite': {'id': 'bar', 'ext': {'provider': 'liveintent.com'}}});
|
|
@@ -388,6 +388,11 @@ describe('LiveIntentId', function() {
|
|
|
388
388
|
expect(result).to.eql({'lipb': {'lipbid': 'foo', 'nonId': 'foo', 'medianet': 'bar'}, 'medianet': {'id': 'bar', 'ext': {'provider': 'liveintent.com'}}});
|
|
389
389
|
});
|
|
390
390
|
|
|
391
|
+
it('should decode a sovrn id to a seperate object when present', function() {
|
|
392
|
+
const result = liveIntentIdSubmodule.decode({ nonId: 'foo', sovrn: 'bar' });
|
|
393
|
+
expect(result).to.eql({'lipb': {'lipbid': 'foo', 'nonId': 'foo', 'sovrn': 'bar'}, 'sovrn': {'id': 'bar', 'ext': {'provider': 'liveintent.com'}}});
|
|
394
|
+
});
|
|
395
|
+
|
|
391
396
|
it('should decode a magnite id to a seperate object when present', function() {
|
|
392
397
|
const result = liveIntentIdSubmodule.decode({ nonId: 'foo', magnite: 'bar' });
|
|
393
398
|
expect(result).to.eql({'lipb': {'lipbid': 'foo', 'nonId': 'foo', 'magnite': 'bar'}, 'magnite': {'id': 'bar', 'ext': {'provider': 'liveintent.com'}}});
|
|
@@ -23,29 +23,37 @@ describe('mediago:BidAdapterTests', function () {
|
|
|
23
23
|
tid: 'tid_01',
|
|
24
24
|
data: {
|
|
25
25
|
browsi: {
|
|
26
|
-
browsiViewability: 'NA'
|
|
26
|
+
browsiViewability: 'NA'
|
|
27
27
|
},
|
|
28
28
|
adserver: {
|
|
29
29
|
name: 'adserver_name',
|
|
30
|
-
adslot: 'adslot_name'
|
|
30
|
+
adslot: 'adslot_name'
|
|
31
31
|
},
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
32
|
+
pbadslot: '/12345/my-gpt-tag-0'
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
35
36
|
},
|
|
36
37
|
mediaTypes: {
|
|
37
38
|
banner: {
|
|
38
39
|
sizes: [[300, 250]],
|
|
39
|
-
pos: 'left'
|
|
40
|
-
}
|
|
40
|
+
pos: 'left'
|
|
41
|
+
}
|
|
41
42
|
},
|
|
42
43
|
ortb2: {
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
44
|
+
site: {
|
|
45
|
+
cat: ['IAB2'],
|
|
46
|
+
keywords: 'power tools, drills, tools=industrial',
|
|
47
|
+
content: {
|
|
48
|
+
keywords: 'video, source=streaming'
|
|
47
49
|
},
|
|
50
|
+
|
|
48
51
|
},
|
|
52
|
+
user: {
|
|
53
|
+
ext: {
|
|
54
|
+
data: {}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
49
57
|
},
|
|
50
58
|
adUnitCode: 'regular_iframe',
|
|
51
59
|
transactionId: '7b26fdae-96e6-4c35-a18b-218dda11397d',
|
|
@@ -56,9 +64,83 @@ describe('mediago:BidAdapterTests', function () {
|
|
|
56
64
|
src: 'client',
|
|
57
65
|
bidRequestsCount: 1,
|
|
58
66
|
bidderRequestsCount: 1,
|
|
59
|
-
bidderWinsCount: 0
|
|
60
|
-
}
|
|
67
|
+
bidderWinsCount: 0
|
|
68
|
+
}
|
|
61
69
|
],
|
|
70
|
+
gdprConsent: {
|
|
71
|
+
consentString: 'BOJ8RZsOJ8RZsABAB8AAAAAZ+A==',
|
|
72
|
+
gdprApplies: true,
|
|
73
|
+
apiVersion: 2,
|
|
74
|
+
vendorData: {
|
|
75
|
+
purpose: {
|
|
76
|
+
consents: {
|
|
77
|
+
1: false
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
},
|
|
82
|
+
userId: {
|
|
83
|
+
tdid: 'sample-userid',
|
|
84
|
+
uid2: { id: 'sample-uid2-value' },
|
|
85
|
+
criteoId: 'sample-criteo-userid',
|
|
86
|
+
netId: 'sample-netId-userid',
|
|
87
|
+
idl_env: 'sample-idl-userid',
|
|
88
|
+
pubProvidedId: [
|
|
89
|
+
{
|
|
90
|
+
source: 'puburl.com',
|
|
91
|
+
uids: [
|
|
92
|
+
{
|
|
93
|
+
id: 'pubid2',
|
|
94
|
+
atype: 1,
|
|
95
|
+
ext: {
|
|
96
|
+
stype: 'ppuid'
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
]
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
source: 'puburl2.com',
|
|
103
|
+
uids: [
|
|
104
|
+
{
|
|
105
|
+
id: 'pubid2'
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
id: 'pubid2-123'
|
|
109
|
+
}
|
|
110
|
+
]
|
|
111
|
+
}
|
|
112
|
+
]
|
|
113
|
+
},
|
|
114
|
+
userIdAsEids: [
|
|
115
|
+
{
|
|
116
|
+
source: 'adserver.org',
|
|
117
|
+
uids: [{ id: 'sample-userid' }]
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
source: 'criteo.com',
|
|
121
|
+
uids: [{ id: 'sample-criteo-userid' }]
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
source: 'netid.de',
|
|
125
|
+
uids: [{ id: 'sample-netId-userid' }]
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
source: 'liveramp.com',
|
|
129
|
+
uids: [{ id: 'sample-idl-userid' }]
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
source: 'uidapi.com',
|
|
133
|
+
uids: [{ id: 'sample-uid2-value' }]
|
|
134
|
+
},
|
|
135
|
+
{
|
|
136
|
+
source: 'puburl.com',
|
|
137
|
+
uids: [{ id: 'pubid1' }]
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
source: 'puburl2.com',
|
|
141
|
+
uids: [{ id: 'pubid2' }, { id: 'pubid2-123' }]
|
|
142
|
+
}
|
|
143
|
+
]
|
|
62
144
|
};
|
|
63
145
|
let request = [];
|
|
64
146
|
|
|
@@ -67,8 +149,8 @@ describe('mediago:BidAdapterTests', function () {
|
|
|
67
149
|
spec.isBidRequestValid({
|
|
68
150
|
bidder: 'mediago',
|
|
69
151
|
params: {
|
|
70
|
-
token: ['85a6b01e41ac36d49744fad726e3655d']
|
|
71
|
-
}
|
|
152
|
+
token: ['85a6b01e41ac36d49744fad726e3655d']
|
|
153
|
+
}
|
|
72
154
|
})
|
|
73
155
|
).to.equal(true);
|
|
74
156
|
});
|
|
@@ -80,10 +162,12 @@ describe('mediago:BidAdapterTests', function () {
|
|
|
80
162
|
});
|
|
81
163
|
|
|
82
164
|
it('mediago:validate_response_params', function () {
|
|
83
|
-
let adm =
|
|
165
|
+
let adm =
|
|
166
|
+
'<link rel="stylesheet" href="https://cdn.mediago.io/js/style/style_banner_300*250.css"><div id="mgcontainer-99afea272c2b0e8626489674ddb7a0bb" class="mediago-placement imgTopTitleBottom" style="position:relative;width:298px;height:248px;overflow:hidden"><a href="https://trace.mediago.io/api/bidder/track?tn=39934c2bda4debbe4c680be1dd02f5d3&price=djUJcggeuWWfbm28q4WXHdgMFkO28DrGw49FnubQ0Bk&evt=102&rid=6e28cfaf115a354ea1ad8e1304d6d7b8&campaignid=1339145&impid=44-300x250-1&offerid=24054386&test=0&time=1660789795&cp=jZDh1xu6_QqJLlKVtCkiHIP_TER6gL9jeTrlHCBoxOM&clickid=44_6e28cfaf115a354ea1ad8e1304d6d7b8_44-300x250-1&acid=599&trackingid=99afea272c2b0e8626489674ddb7a0bb&uid=a865b9ae-fa9e-4c09-8204-2db99ac7c8f7&jt=2&url=oxZA2i2aUVY76Xy2t3HffaK_ZtBDsgFwFc_Nbnw-bz3yCxmoUyZvATKnFc9ZkUfT1eQizhtczCwDzjHwwwDgTehUnp1EwdY4g1LRcuOwlRpXnVTt3zPQdaVx5nVDw25by7lQ0q469LCv2eEFDTAv_FOuVT32WiOx_ArOIlxCnDGpjPLUNyxm3cTZFGOJn4B7&bm=2&la=en&cn=us&cid=3998296&info=Si3oM-qfCbw2iZRYs01BkUWyH6c5CQWHrA8CQLE0VHcXAcf4ljY9dyLzQ4vAlTWd6-j_ou4ySor3e70Ll7wlKiiauQKaUkZqNoTizHm73C4FK8DYJSTP3VkhJV8RzrYk&sid=128__110__1__12__28__38__163__96__58__24__47__99&sp=djUJcggeuWWfbm28q4WXHdgMFkO28DrGw49FnubQ0Bk&scp=zK0DRYY1UV-syqSpmcMYBpOebtoQJV9ZEJT0JFqbTQg&acu=USD&scu=USD&sgcp=zK0DRYY1UV-syqSpmcMYBpOebtoQJV9ZEJT0JFqbTQg&gprice=djUJcggeuWWfbm28q4WXHdgMFkO28DrGw49FnubQ0Bk&gcp=zK0DRYY1UV-syqSpmcMYBpOebtoQJV9ZEJT0JFqbTQg&ah=&pb=&de=wjh.popin.cc&cat=&iv=0" target="_blank" class="mediago-placement-track" style="display: inline-block;"><img alt="Ranger\'s spot giant lion - vet is shocked when looking at the ultrasound" src="https://d2cli4kgl5uxre.cloudfront.net/ML/ff32b6f9b3bbc45c00b78b6674a2952e__scv1__300x175.png" style="height:70%;width:100%;border-width:0;border:none;"><h3 class="title" style="font-size:16px;">Ranger\'s spot giant lion - vet is shocked when looking at the ultrasound</h3></a><span class="source"><a class="sourcename" href="//www.mediago.io" target="_blank"><span>Ad</span> </a><a class="mgmgsrcnameadslabelurl" href="//www.mediago.io/privacy" target="_blank"><span>soo-healthy</span></a></span></div>';
|
|
84
167
|
let temp = '%3Cscr';
|
|
85
168
|
temp += 'ipt%3E';
|
|
86
|
-
temp +=
|
|
169
|
+
temp +=
|
|
170
|
+
'!function()%7B%22use%20strict%22%3Bfunction%20f(t)%7Breturn(f%3D%22function%22%3D%3Dtypeof%20Symbol%26%26%22symbol%22%3D%3Dtypeof%20Symbol.iterator%3Ffunction(t)%7Breturn%20typeof%20t%7D%3Afunction(t)%7Breturn%20t%26%26%22function%22%3D%3Dtypeof%20Symbol%26%26t.constructor%3D%3D%3DSymbol%26%26t!%3D%3DSymbol.prototype%3F%22symbol%22%3Atypeof%20t%7D)(t)%7Dfunction%20l(t)%7Bvar%20e%3D0%3Carguments.length%26%26void%200!%3D%3Dt%3Ft%3A%7B%7D%3Btry%7Be.random_t%3D(new%20Date).getTime()%2Cg(function(t)%7Bvar%20e%3D1%3Carguments.length%26%26void%200!%3D%3Darguments%5B1%5D%3Farguments%5B1%5D%3A%22%22%3Bif(%22object%22!%3D%3Df(t))return%20e%3Bvar%20n%3Dfunction(t)%7Bfor(var%20e%2Cn%3D%5B%5D%2Co%3D0%2Ci%3DObject.keys(t)%3Bo%3Ci.length%3Bo%2B%2B)e%3Di%5Bo%5D%2Cn.push(%22%22.concat(e%2C%22%3D%22).concat(t%5Be%5D))%3Breturn%20n%7D(t).join(%22%26%22)%2Co%3De.indexOf(%22%23%22)%2Ci%3De%2Ct%3D%22%22%3Breturn-1!%3D%3Do%26%26(i%3De.slice(0%2Co)%2Ct%3De.slice(o))%2Cn%26%26(i%26%26-1!%3D%3Di.indexOf(%22%3F%22)%3Fi%2B%3D%22%26%22%2Bn%3Ai%2B%3D%22%3F%22%2Bn)%2Ci%2Bt%7D(e%2C%22https%3A%2F%2Ftrace.mediago.io%2Fapi%2Flog%2Ftrack%22))%7Dcatch(t)%7B%7D%7Dfunction%20g(t%2Ce%2Cn)%7B(t%3Dt%3Ft.split(%22%3B%3B%3B%22)%3A%5B%5D).map(function(t)%7Btry%7B0%3C%3Dt.indexOf(%22%2Fapi%2Fbidder%2Ftrack%22)%26%26n%26%26(t%2B%3D%22%26inIframe%3D%22.concat(!(!self.frameElement%7C%7C%22IFRAME%22!%3Dself.frameElement.tagName)%7C%7Cwindow.frames.length!%3Dparent.frames.length%7C%7Cself!%3Dtop)%2Ct%2B%3D%22%26pos_x%3D%22.concat(n.left%2C%22%26pos_y%3D%22).concat(n.top%2C%22%26page_w%3D%22).concat(n.page_width%2C%22%26page_h%3D%22).concat(n.page_height))%7Dcatch(t)%7Bl(%7Btn%3As%2Cwinloss%3A1%2Cfe%3A2%2Cpos_err_c%3A1002%2Cpos_err_m%3At.toString()%7D)%7Dvar%20e%3Dnew%20Image%3Be.src%3Dt%2Ce.style.display%3D%22none%22%2Ce.style.visibility%3D%22hidden%22%2Ce.width%3D0%2Ce.height%3D0%2Cdocument.body.appendChild(e)%7D)%7Dvar%20d%3D%5B%22https%3A%2F%2Ftrace.mediago.io%2Fapi%2Fbidder%2Ftrack%3Ftn%3D39934c2bda4debbe4c680be1dd02f5d3%26price%3DdjUJcggeuWWfbm28q4WXHdgMFkO28DrGw49FnubQ0Bk%26evt%3D101%26rid%3D6e28cfaf115a354ea1ad8e1304d6d7b8%26campaignid%3D1339145%26impid%3D44-300x250-1%26offerid%3D24054386%26test%3D0%26time%3D1660789795%26cp%3DjZDh1xu6_QqJLlKVtCkiHIP_TER6gL9jeTrlHCBoxOM%26acid%3D599%26trackingid%3D99afea272c2b0e8626489674ddb7a0bb%26uid%3Da865b9ae-fa9e-4c09-8204-2db99ac7c8f7%26bm%3D2%26la%3Den%26cn%3Dus%26cid%3D3998296%26info%3DSi3oM-qfCbw2iZRYs01BkUWyH6c5CQWHrA8CQLE0VHcXAcf4ljY9dyLzQ4vAlTWd6-j_ou4ySor3e70Ll7wlKiiauQKaUkZqNoTizHm73C4FK8DYJSTP3VkhJV8RzrYk%26sid%3D128__110__1__12__28__38__163__96__58__24__47__99%26sp%3DdjUJcggeuWWfbm28q4WXHdgMFkO28DrGw49FnubQ0Bk%26scp%3DzK0DRYY1UV-syqSpmcMYBpOebtoQJV9ZEJT0JFqbTQg%26acu%3DUSD%26scu%3DUSD%26sgcp%3DzK0DRYY1UV-syqSpmcMYBpOebtoQJV9ZEJT0JFqbTQg%26gprice%3DdjUJcggeuWWfbm28q4WXHdgMFkO28DrGw49FnubQ0Bk%26gcp%3DzK0DRYY1UV-syqSpmcMYBpOebtoQJV9ZEJT0JFqbTQg%26ah%3D%26de%3Dwjh.popin.cc%26iv%3D0%22%2C%22%24%7BITRACKER2%7D%22%2C%22%24%7BITRACKER3%7D%22%2C%22%24%7BITRACKER4%7D%22%2C%22%24%7BITRACKER5%7D%22%2C%22%24%7BITRACKER6%7D%22%5D%2Cp%3D%5B%22https%3A%2F%2Ftrace.mediago.io%2Fapi%2Fbidder%2Ftrack%3Ftn%3D39934c2bda4debbe4c680be1dd02f5d3%26price%3DdjUJcggeuWWfbm28q4WXHdgMFkO28DrGw49FnubQ0Bk%26evt%3D104%26rid%3D6e28cfaf115a354ea1ad8e1304d6d7b8%26campaignid%3D1339145%26impid%3D44-300x250-1%26offerid%3D24054386%26test%3D0%26time%3D1660789795%26cp%3DjZDh1xu6_QqJLlKVtCkiHIP_TER6gL9jeTrlHCBoxOM%26acid%3D599%26trackingid%3D99afea272c2b0e8626489674ddb7a0bb%26uid%3Da865b9ae-fa9e-4c09-8204-2db99ac7c8f7%26sid%3D128__110__1__12__28__38__163__96__58__24__47__99%26format%3D%26crid%3Dff32b6f9b3bbc45c00b78b6674a2952e%26bm%3D2%26la%3Den%26cn%3Dus%26cid%3D3998296%26info%3DSi3oM-qfCbw2iZRYs01BkUWyH6c5CQWHrA8CQLE0VHcXAcf4ljY9dyLzQ4vAlTWd6-j_ou4ySor3e70Ll7wlKiiauQKaUkZqNoTizHm73C4FK8DYJSTP3VkhJV8RzrYk%26sp%3DdjUJcggeuWWfbm28q4WXHdgMFkO28DrGw49FnubQ0Bk%26scp%3DzK0DRYY1UV-syqSpmcMYBpOebtoQJV9ZEJT0JFqbTQg%26acu%3DUSD%26scu%3DUSD%26sgcp%3DzK0DRYY1UV-syqSpmcMYBpOebtoQJV9ZEJT0JFqbTQg%26gprice%3DdjUJcggeuWWfbm28q4WXHdgMFkO28DrGw49FnubQ0Bk%26gcp%3DzK0DRYY1UV-syqSpmcMYBpOebtoQJV9ZEJT0JFqbTQg%26ah%3D%26de%3Dwjh.popin.cc%26iv%3D0%22%2C%22%24%7BVTRACKER2%7D%22%2C%22%24%7BVTRACKER3%7D%22%2C%22%24%7BVTRACKER4%7D%22%2C%22%24%7BVTRACKER5%7D%22%2C%22%24%7BVTRACKER6%7D%22%5D%2Cs%3D%22f9f2b1ef23fe2759c2cad0953029a94b%22%2Cn%3Ddocument.getElementById(%22mgcontainer-99afea272c2b0e8626489674ddb7a0bb%22)%3Bn%26%26function()%7Bvar%20a%3Dn.getElementsByClassName(%22mediago-placement-track%22)%3Bif(a%26%26a.length)%7Bvar%20t%2Ce%3Dfunction(t)%7Bvar%20e%2Cn%2Co%2Ci%2Cc%2Cr%3B%22object%22%3D%3D%3Df(r%3Da%5Bt%5D)%26%26(e%3Dfunction(t)%7Btry%7Bvar%20e%3Dt.getBoundingClientRect()%2Cn%3De%26%26e.top%7C%7C-1%2Co%3De%26%26e.left%7C%7C-1%2Ci%3Ddocument.body.scrollWidth%7C%7C-1%2Ce%3Ddocument.body.scrollHeight%7C%7C-1%3Breturn%7Btop%3An.toFixed(0)%2Cleft%3Ao.toFixed(0)%2Cpage_width%3Ai%2Cpage_height%3Ae%7D%7Dcatch(o)%7Breturn%20l(%7Btn%3As%2Cwinloss%3A1%2Cfe%3A2%2Cpos_err_c%3A1001%2Cpos_err_m%3Ao.toString()%7D)%2C%7Btop%3A%22-1%22%2Cleft%3A%22-1%22%2Cpage_width%3A%22-1%22%2Cpage_height%3A%22-1%22%7D%7D%7D(r)%2C(n%3Dd%5Bt%5D)%26%26g(n%2C0%2Ce)%2Co%3Dp%5Bt%5D%2Ci%3D!1%2C(c%3Dfunction()%7BsetTimeout(function()%7Bvar%20t%2Ce%3B!i%26%26(t%3Dr%2Ce%3Dwindow.innerHeight%7C%7Cdocument.documentElement.clientHeight%7C%7Cdocument.body.clientHeight%2C(t.getBoundingClientRect()%26%26t.getBoundingClientRect().top)%3C%3De-.75*(t.offsetHeight%7C%7Ct.clientHeight))%3F(i%3D!0%2Co%26%26g(o))%3Ac()%7D%2C500)%7D)())%7D%3Bfor(t%20in%20a)e(t)%7D%7D()%7D()';
|
|
87
171
|
temp += '%3B%3C%2Fscri';
|
|
88
172
|
temp += 'pt%3E';
|
|
89
173
|
adm += decodeURIComponent(temp);
|
|
@@ -101,13 +185,13 @@ describe('mediago:BidAdapterTests', function () {
|
|
|
101
185
|
cid: '1339145',
|
|
102
186
|
crid: 'ff32b6f9b3bbc45c00b78b6674a2952e',
|
|
103
187
|
w: 300,
|
|
104
|
-
h: 250
|
|
105
|
-
}
|
|
106
|
-
]
|
|
107
|
-
}
|
|
188
|
+
h: 250
|
|
189
|
+
}
|
|
190
|
+
]
|
|
191
|
+
}
|
|
108
192
|
],
|
|
109
|
-
cur: 'USD'
|
|
110
|
-
}
|
|
193
|
+
cur: 'USD'
|
|
194
|
+
}
|
|
111
195
|
};
|
|
112
196
|
|
|
113
197
|
let bids = spec.interpretResponse(serverResponse);
|
|
@@ -76,7 +76,10 @@ describe('MGIDXBidAdapter', function () {
|
|
|
76
76
|
|
|
77
77
|
const bidderRequest = {
|
|
78
78
|
uspConsent: '1---',
|
|
79
|
-
gdprConsent:
|
|
79
|
+
gdprConsent: {
|
|
80
|
+
consentString: 'COvFyGBOvFyGBAbAAAENAPCAAOAAAAAAAAAAAEEUACCKAAA.IFoEUQQgAIQwgIwQABAEAAAAOIAACAIAAAAQAIAgEAACEAAAAAgAQBAAAAAAAGBAAgAAAAAAAFAAECAAAgAAQARAEQAAAAAJAAIAAgAAAYQEAAAQmAgBC3ZAYzUw',
|
|
81
|
+
vendorData: {}
|
|
82
|
+
},
|
|
80
83
|
refererInfo: {
|
|
81
84
|
referer: 'https://test.com'
|
|
82
85
|
}
|
|
@@ -131,7 +134,7 @@ describe('MGIDXBidAdapter', function () {
|
|
|
131
134
|
expect(data.host).to.be.a('string');
|
|
132
135
|
expect(data.page).to.be.a('string');
|
|
133
136
|
expect(data.coppa).to.be.a('number');
|
|
134
|
-
expect(data.gdpr).to.be.a('
|
|
137
|
+
expect(data.gdpr).to.be.a('object');
|
|
135
138
|
expect(data.ccpa).to.be.a('string');
|
|
136
139
|
expect(data.tmax).to.be.a('number');
|
|
137
140
|
expect(data.placements).to.have.lengthOf(3);
|
|
@@ -172,8 +175,10 @@ describe('MGIDXBidAdapter', function () {
|
|
|
172
175
|
serverRequest = spec.buildRequests(bids, bidderRequest);
|
|
173
176
|
let data = serverRequest.data;
|
|
174
177
|
expect(data.gdpr).to.exist;
|
|
175
|
-
expect(data.gdpr).to.be.a('
|
|
176
|
-
expect(data.gdpr).to.
|
|
178
|
+
expect(data.gdpr).to.be.a('object');
|
|
179
|
+
expect(data.gdpr).to.have.property('consentString');
|
|
180
|
+
expect(data.gdpr).to.not.have.property('vendorData');
|
|
181
|
+
expect(data.gdpr.consentString).to.equal(bidderRequest.gdprConsent.consentString);
|
|
177
182
|
expect(data.ccpa).to.not.exist;
|
|
178
183
|
delete bidderRequest.gdprConsent;
|
|
179
184
|
});
|
|
@@ -178,6 +178,16 @@ describe('minutemediaAdapter', function () {
|
|
|
178
178
|
expect(request.data.bids[1].mediaType).to.equal(BANNER)
|
|
179
179
|
});
|
|
180
180
|
|
|
181
|
+
it('should send the correct currency in bid request', function () {
|
|
182
|
+
const bid = utils.deepClone(bidRequests[0]);
|
|
183
|
+
bid.params = {
|
|
184
|
+
'currency': 'EUR'
|
|
185
|
+
};
|
|
186
|
+
const expectedCurrency = bid.params.currency;
|
|
187
|
+
const request = spec.buildRequests([bid], bidderRequest);
|
|
188
|
+
expect(request.data.bids[0].currency).to.equal(expectedCurrency);
|
|
189
|
+
});
|
|
190
|
+
|
|
181
191
|
it('should respect syncEnabled option', function() {
|
|
182
192
|
config.setConfig({
|
|
183
193
|
userSync: {
|