prebid.js 7.4.0 → 7.7.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/.circleci/config.yml +11 -6
- package/dist/1plusXRtdProvider.js +1 -0
- package/dist/33acrossBidAdapter.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/adoceanBidAdapter.js +1 -1
- package/dist/adotBidAdapter.js +1 -1
- package/dist/adrelevantisBidAdapter.js +1 -1
- package/dist/adrinoBidAdapter.js +1 -1
- package/dist/adtelligentBidAdapter.js +1 -1
- package/dist/adxcgBidAdapter.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/atsAnalyticsAdapter.js +1 -1
- package/dist/axonixBidAdapter.js +1 -1
- package/dist/bidglassBidAdapter.js +1 -1
- package/dist/big-richmediaBidAdapter.js +1 -1
- package/dist/bliinkBidAdapter.js +1 -1
- package/dist/bridgewellBidAdapter.js +1 -1
- package/dist/brightMountainMediaBidAdapter.js +1 -1
- package/dist/byDataAnalyticsAdapter.js +1 -1
- package/dist/concertBidAdapter.js +1 -1
- package/dist/connectadBidAdapter.js +1 -1
- package/dist/consumableBidAdapter.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/dspxBidAdapter.js +1 -1
- package/dist/eplanningBidAdapter.js +1 -1
- package/dist/finativeBidAdapter.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/gridBidAdapter.js +1 -1
- package/dist/gridNMBidAdapter.js +1 -1
- package/dist/gumgumBidAdapter.js +1 -1
- package/dist/h12mediaBidAdapter.js +1 -1
- package/dist/hadronIdSystem.js +1 -1
- package/dist/hadronRtdProvider.js +1 -1
- package/dist/id5IdSystem.js +1 -1
- package/dist/imRtdProvider.js +1 -1
- package/dist/impactifyBidAdapter.js +1 -1
- package/dist/improvedigitalBidAdapter.js +1 -1
- package/dist/inmarBidAdapter.js +1 -1
- package/dist/insticatorBidAdapter.js +1 -1
- package/dist/ixBidAdapter.js +1 -1
- package/dist/jixieBidAdapter.js +1 -1
- package/dist/justpremiumBidAdapter.js +1 -1
- package/dist/kargoAnalyticsAdapter.js +1 -1
- package/dist/konduitAnalyticsAdapter.js +1 -1
- package/dist/kueezBidAdapter.js +1 -1
- package/dist/lassoBidAdapter.js +1 -1
- package/dist/liveyieldAnalyticsAdapter.js +1 -1
- package/dist/logicadBidAdapter.js +1 -1
- package/dist/loglyliftBidAdapter.js +1 -1
- package/dist/malltvAnalyticsAdapter.js +1 -1
- package/dist/marsmediaBidAdapter.js +1 -1
- package/dist/mediafuseBidAdapter.js +1 -1
- package/dist/mediasquareBidAdapter.js +1 -1
- package/dist/mgidBidAdapter.js +1 -1
- package/dist/minutemediaBidAdapter.js +1 -1
- package/dist/naveggIdSystem.js +1 -1
- package/dist/newspassidBidAdapter.js +1 -0
- package/dist/nextMillenniumBidAdapter.js +1 -1
- package/dist/not-for-prod/prebid.js +131 -128
- package/dist/oguryBidAdapter.js +1 -1
- package/dist/onetagBidAdapter.js +1 -1
- package/dist/ooloAnalyticsAdapter.js +1 -1
- package/dist/outbrainBidAdapter.js +1 -1
- package/dist/parrableIdSystem.js +1 -1
- package/dist/pixfutureBidAdapter.js +1 -1
- package/dist/prebid-core.js +1 -1
- package/dist/prebidServerBidAdapter.js +1 -1
- package/dist/priceFloors.js +1 -1
- package/dist/pubCommonId.js +1 -1
- package/dist/publinkIdSystem.js +1 -1
- package/dist/pubmaticBidAdapter.js +1 -1
- package/dist/pubwiseAnalyticsAdapter.js +1 -1
- package/dist/pubxaiAnalyticsAdapter.js +1 -1
- package/dist/pxyzBidAdapter.js +1 -1
- package/dist/quantcastBidAdapter.js +1 -1
- package/dist/rasBidAdapter.js +1 -0
- package/dist/readpeakBidAdapter.js +1 -1
- package/dist/relaidoBidAdapter.js +1 -1
- package/dist/rhythmoneBidAdapter.js +1 -1
- package/dist/riseBidAdapter.js +1 -1
- package/dist/rubiconAnalyticsAdapter.js +1 -1
- package/dist/rubiconBidAdapter.js +1 -1
- package/dist/seedingAllianceBidAdapter.js +1 -1
- package/dist/seedtagBidAdapter.js +1 -1
- package/dist/sharedIdSystem.js +1 -1
- package/dist/sharethroughAnalyticsAdapter.js +1 -1
- package/dist/sharethroughBidAdapter.js +1 -1
- package/dist/shinezBidAdapter.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/sspBCBidAdapter.js +1 -1
- package/dist/sublimeBidAdapter.js +1 -1
- package/dist/synacormediaBidAdapter.js +1 -1
- package/dist/taboolaBidAdapter.js +1 -1
- package/dist/targetVideoBidAdapter.js +1 -1
- package/dist/teadsBidAdapter.js +1 -1
- package/dist/trionBidAdapter.js +1 -1
- package/dist/tripleliftBidAdapter.js +1 -1
- package/dist/ttdBidAdapter.js +1 -1
- package/dist/ucfunnelAnalyticsAdapter.js +1 -1
- package/dist/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/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/integrationExamples/gpt/1plusXRtdProviderExample.html +112 -0
- package/karma.conf.maker.js +3 -1
- package/modules/.submodules.json +2 -1
- package/modules/1plusXRtdProvider.js +251 -0
- package/modules/1plusXRtdProvider.md +65 -0
- package/modules/adgenerationBidAdapter.js +24 -1
- package/modules/adnuntiusBidAdapter.js +26 -8
- package/modules/adoceanBidAdapter.js +10 -3
- package/modules/adotBidAdapter.js +13 -4
- package/modules/adrinoBidAdapter.js +10 -2
- package/modules/adrinoBidAdapter.md +6 -0
- package/modules/adtelligentBidAdapter.js +2 -1
- package/modules/appnexusBidAdapter.js +3 -3
- package/modules/atsAnalyticsAdapter.js +4 -5
- package/modules/big-richmediaBidAdapter.js +3 -3
- package/modules/bliinkBidAdapter.js +120 -193
- package/modules/bliinkBidAdapter.md +2 -5
- package/modules/byDataAnalyticsAdapter.js +172 -74
- package/modules/byDataAnalyticsAdapter.md +5 -6
- package/modules/consumableBidAdapter.js +21 -1
- package/modules/criteoBidAdapter.js +7 -1
- package/modules/currency.js +2 -2
- package/modules/cwireBidAdapter.md +1 -1
- package/modules/eplanningBidAdapter.js +82 -97
- package/modules/gdprEnforcement.js +8 -14
- package/modules/gridNMBidAdapter.js +45 -4
- package/modules/hadronAnalyticsAdapter.md +5 -5
- package/modules/hadronIdSystem.js +18 -5
- package/modules/hadronIdSystem.md +15 -11
- package/modules/hadronRtdProvider.js +14 -1
- package/modules/hadronRtdProvider.md +17 -13
- package/modules/imRtdProvider.js +0 -8
- package/modules/impactifyBidAdapter.js +6 -2
- package/modules/ixBidAdapter.js +133 -23
- package/modules/ixBidAdapter.md +2 -5
- package/modules/jixieBidAdapter.js +10 -10
- package/modules/kargoAnalyticsAdapter.js +88 -6
- package/modules/kargoAnalyticsAdapter.md +33 -0
- package/modules/minutemediaBidAdapter.js +1 -0
- package/modules/naveggIdSystem.js +1 -12
- package/modules/newspassidBidAdapter.js +649 -0
- package/modules/nextMillenniumBidAdapter.js +17 -1
- package/modules/nextMillenniumBidAdapter.md +1 -1
- package/modules/oguryBidAdapter.js +2 -0
- package/modules/onetagBidAdapter.js +44 -7
- package/modules/prebidServerBidAdapter/index.js +7 -0
- package/modules/priceFloors.js +1 -1
- package/modules/pubCommonId.js +1 -2
- package/modules/pubxaiAnalyticsAdapter.js +6 -1
- package/modules/rasBidAdapter.js +149 -0
- package/modules/rasBidAdapter.md +50 -0
- package/modules/rubiconBidAdapter.js +5 -0
- package/modules/seedingAllianceBidAdapter.js +3 -0
- package/modules/seedtagBidAdapter.js +37 -1
- package/modules/sharedIdSystem.js +11 -5
- package/modules/sharethroughBidAdapter.js +9 -24
- package/modules/taboolaBidAdapter.js +1 -1
- package/modules/taboolaBidAdapter.md +3 -3
- package/modules/targetVideoBidAdapter.js +18 -0
- package/modules/userId/index.js +39 -21
- package/package.json +1 -1
- package/src/auction.js +6 -5
- package/src/consentHandler.js +11 -11
- package/src/debugging.js +5 -3
- package/src/hook.js +2 -2
- package/src/storageManager.js +4 -5
- package/src/utils/promise.js +96 -21
- package/src/utils.js +3 -2
- package/test/helpers/consentData.js +2 -1
- package/test/spec/auctionmanager_spec.js +1 -6
- package/test/spec/debugging_spec.js +2 -2
- package/test/spec/modules/1plusXRtdProvider_spec.js +430 -0
- package/test/spec/modules/adgenerationBidAdapter_spec.js +52 -4
- package/test/spec/modules/adnuntiusBidAdapter_spec.js +126 -14
- package/test/spec/modules/adoceanBidAdapter_spec.js +4 -1
- package/test/spec/modules/adotBidAdapter_spec.js +12 -9
- package/test/spec/modules/adrinoBidAdapter_spec.js +22 -0
- package/test/spec/modules/appnexusBidAdapter_spec.js +165 -156
- package/test/spec/modules/bliinkBidAdapter_spec.js +323 -136
- package/test/spec/modules/byDataAnalyticsAdapter_spec.js +74 -24
- package/test/spec/modules/consumableBidAdapter_spec.js +122 -1
- package/test/spec/modules/criteoBidAdapter_spec.js +15 -5
- package/test/spec/modules/eplanningBidAdapter_spec.js +58 -18
- package/test/spec/modules/gdprEnforcement_spec.js +53 -100
- package/test/spec/modules/gridNMBidAdapter_spec.js +32 -0
- package/test/spec/modules/hadronIdSystem_spec.js +2 -2
- package/test/spec/modules/idxIdSystem_spec.js +1 -1
- package/test/spec/modules/imRtdProvider_spec.js +0 -1
- package/test/spec/modules/ixBidAdapter_spec.js +212 -5
- package/test/spec/modules/jixieBidAdapter_spec.js +8 -8
- package/test/spec/modules/kargoAnalyticsAdapter_spec.js +42 -0
- package/test/spec/modules/minutemediaBidAdapter_spec.js +3 -0
- package/test/spec/modules/newspassidBidAdapter_spec.js +1793 -0
- package/test/spec/modules/nextMillenniumBidAdapter_spec.js +20 -0
- package/test/spec/modules/onetagBidAdapter_spec.js +53 -4
- package/test/spec/modules/parrableIdSystem_spec.js +2 -1
- package/test/spec/modules/prebidServerBidAdapter_spec.js +20 -0
- package/test/spec/modules/pubxaiAnalyticsAdapter_spec.js +5 -0
- package/test/spec/modules/rasBidAdapter_spec.js +190 -0
- package/test/spec/modules/rubiconBidAdapter_spec.js +27 -0
- package/test/spec/modules/seedtagBidAdapter_spec.js +29 -0
- package/test/spec/modules/sharethroughBidAdapter_spec.js +4 -4
- package/test/spec/modules/taboolaBidAdapter_spec.js +1 -1
- package/test/spec/modules/targetVideoBidAdapter_spec.js +43 -0
- package/test/spec/modules/userId_spec.js +15 -2
- package/test/spec/unit/pbjs_api_spec.js +1 -5
- package/test/spec/unit/utils/promise_spec.js +283 -38
- package/test/helpers/syncPromise.js +0 -71
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import {
|
|
2
2
|
deviceAccessHook,
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
internal,
|
|
3
|
+
setEnforcementConfig,
|
|
4
|
+
userSyncHook,
|
|
5
|
+
userIdHook,
|
|
7
6
|
makeBidRequestsHook,
|
|
7
|
+
validateRules,
|
|
8
|
+
enforcementRules,
|
|
8
9
|
purpose1Rule,
|
|
9
10
|
purpose2Rule,
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
validateRules
|
|
11
|
+
enableAnalyticsHook,
|
|
12
|
+
getGvlid,
|
|
13
|
+
internal
|
|
14
14
|
} from 'modules/gdprEnforcement.js';
|
|
15
|
-
import {config} from 'src/config.js';
|
|
16
|
-
import adapterManager, {gdprDataHandler} from 'src/adapterManager.js';
|
|
15
|
+
import { config } from 'src/config.js';
|
|
16
|
+
import adapterManager, { gdprDataHandler } from 'src/adapterManager.js';
|
|
17
17
|
import * as utils from 'src/utils.js';
|
|
18
|
-
import {validateStorageEnforcement} from 'src/storageManager.js';
|
|
18
|
+
import { validateStorageEnforcement } from 'src/storageManager.js';
|
|
19
19
|
import * as events from 'src/events.js';
|
|
20
20
|
|
|
21
21
|
describe('gdpr enforcement', function () {
|
|
@@ -98,9 +98,9 @@ describe('gdpr enforcement', function () {
|
|
|
98
98
|
};
|
|
99
99
|
|
|
100
100
|
after(function () {
|
|
101
|
-
validateStorageEnforcement.getHooks({hook: deviceAccessHook}).remove();
|
|
101
|
+
validateStorageEnforcement.getHooks({ hook: deviceAccessHook }).remove();
|
|
102
102
|
$$PREBID_GLOBAL$$.requestBids.getHooks().remove();
|
|
103
|
-
adapterManager.makeBidRequests.getHooks({hook: makeBidRequestsHook}).remove();
|
|
103
|
+
adapterManager.makeBidRequests.getHooks({ hook: makeBidRequestsHook }).remove();
|
|
104
104
|
})
|
|
105
105
|
|
|
106
106
|
describe('deviceAccessHook', function () {
|
|
@@ -149,7 +149,7 @@ describe('gdpr enforcement', function () {
|
|
|
149
149
|
hasEnforcementHook: true,
|
|
150
150
|
valid: false
|
|
151
151
|
}
|
|
152
|
-
sinon.assert.calledWith(nextFnSpy, undefined, undefined,
|
|
152
|
+
sinon.assert.calledWith(nextFnSpy, undefined, undefined, result);
|
|
153
153
|
});
|
|
154
154
|
|
|
155
155
|
it('should only check for consent for vendor exceptions when enforcePurpose and enforceVendor are false', function () {
|
|
@@ -199,53 +199,6 @@ describe('gdpr enforcement', function () {
|
|
|
199
199
|
expect(logWarnSpy.callCount).to.equal(1);
|
|
200
200
|
});
|
|
201
201
|
|
|
202
|
-
it('should allow device access when enforce vendor but module is vendorless ', function () {
|
|
203
|
-
adapterManagerStub.withArgs('pubCommonId').returns(getBidderSpec(1));
|
|
204
|
-
setEnforcementConfig({
|
|
205
|
-
gdpr: {
|
|
206
|
-
rules: [{
|
|
207
|
-
purpose: 'storage',
|
|
208
|
-
enforcePurpose: true,
|
|
209
|
-
enforceVendor: true,
|
|
210
|
-
}]
|
|
211
|
-
}
|
|
212
|
-
});
|
|
213
|
-
let consentData = {}
|
|
214
|
-
consentData.vendorData = staticConfig.consentData.getTCData;
|
|
215
|
-
consentData.gdprApplies = true;
|
|
216
|
-
consentData.apiVersion = 2;
|
|
217
|
-
gdprDataHandlerStub.returns(consentData);
|
|
218
|
-
|
|
219
|
-
deviceAccessHook(nextFnSpy, 1, 'pubCommonId', 'fpid-module');
|
|
220
|
-
expect(logWarnSpy.callCount).to.equal(0);
|
|
221
|
-
});
|
|
222
|
-
|
|
223
|
-
it('should not allow device access if enforce vendor, module is vendorless, but there is no consent for purpose 1', function () {
|
|
224
|
-
adapterManagerStub.withArgs('pubCommonId').returns(getBidderSpec(1));
|
|
225
|
-
setEnforcementConfig({
|
|
226
|
-
gdpr: {
|
|
227
|
-
rules: [{
|
|
228
|
-
purpose: 'storage',
|
|
229
|
-
enforcePurpose: true,
|
|
230
|
-
enforceVendor: true,
|
|
231
|
-
}]
|
|
232
|
-
}
|
|
233
|
-
});
|
|
234
|
-
|
|
235
|
-
let consentData = {}
|
|
236
|
-
// set consent for purpose 1 to false
|
|
237
|
-
const newConsentData = utils.deepClone(staticConfig);
|
|
238
|
-
newConsentData.consentData.getTCData.purpose.consents['1'] = false;
|
|
239
|
-
consentData.vendorData = newConsentData.consentData.getTCData;
|
|
240
|
-
consentData.apiVersion = 2;
|
|
241
|
-
consentData.gdprApplies = true;
|
|
242
|
-
|
|
243
|
-
gdprDataHandlerStub.returns(consentData);
|
|
244
|
-
|
|
245
|
-
deviceAccessHook(nextFnSpy, 1, 'pubCommonId', 'fpid-module');
|
|
246
|
-
expect(logWarnSpy.callCount).to.equal(1);
|
|
247
|
-
});
|
|
248
|
-
|
|
249
202
|
it('should allow device access when gdprApplies is false and hasDeviceAccess flag is true', function () {
|
|
250
203
|
adapterManagerStub.withArgs('appnexus').returns(getBidderSpec(1));
|
|
251
204
|
setEnforcementConfig({
|
|
@@ -270,10 +223,10 @@ describe('gdpr enforcement', function () {
|
|
|
270
223
|
hasEnforcementHook: true,
|
|
271
224
|
valid: true
|
|
272
225
|
}
|
|
273
|
-
sinon.assert.calledWith(nextFnSpy, 1, 'appnexus',
|
|
226
|
+
sinon.assert.calledWith(nextFnSpy, 1, 'appnexus', result);
|
|
274
227
|
});
|
|
275
228
|
|
|
276
|
-
it('should use gvlMapping set by publisher', function
|
|
229
|
+
it('should use gvlMapping set by publisher', function() {
|
|
277
230
|
config.setConfig({
|
|
278
231
|
'gvlMapping': {
|
|
279
232
|
'appnexus': 4
|
|
@@ -301,11 +254,11 @@ describe('gdpr enforcement', function () {
|
|
|
301
254
|
hasEnforcementHook: true,
|
|
302
255
|
valid: true
|
|
303
256
|
}
|
|
304
|
-
sinon.assert.calledWith(nextFnSpy, 4, 'appnexus',
|
|
257
|
+
sinon.assert.calledWith(nextFnSpy, 4, 'appnexus', result);
|
|
305
258
|
config.resetConfig();
|
|
306
259
|
});
|
|
307
260
|
|
|
308
|
-
it('should use gvl id of alias and not of parent', function
|
|
261
|
+
it('should use gvl id of alias and not of parent', function() {
|
|
309
262
|
let curBidderStub = sinon.stub(config, 'getCurrentBidder');
|
|
310
263
|
curBidderStub.returns('appnexus-alias');
|
|
311
264
|
adapterManager.aliasBidAdapter('appnexus', 'appnexus-alias');
|
|
@@ -336,7 +289,7 @@ describe('gdpr enforcement', function () {
|
|
|
336
289
|
hasEnforcementHook: true,
|
|
337
290
|
valid: true
|
|
338
291
|
}
|
|
339
|
-
sinon.assert.calledWith(nextFnSpy, 4, 'appnexus',
|
|
292
|
+
sinon.assert.calledWith(nextFnSpy, 4, 'appnexus', result);
|
|
340
293
|
config.resetConfig();
|
|
341
294
|
curBidderStub.restore();
|
|
342
295
|
});
|
|
@@ -517,7 +470,7 @@ describe('gdpr enforcement', function () {
|
|
|
517
470
|
const args = nextFnSpy.getCalls()[0].args;
|
|
518
471
|
expect(args[1].hasValidated).to.be.true;
|
|
519
472
|
expect(nextFnSpy.calledOnce).to.equal(true);
|
|
520
|
-
sinon.assert.calledWith(nextFnSpy, submodules, {...consentData, hasValidated: true});
|
|
473
|
+
sinon.assert.calledWith(nextFnSpy, submodules, { ...consentData, hasValidated: true });
|
|
521
474
|
});
|
|
522
475
|
|
|
523
476
|
it('should allow userId module if gdpr not in scope', function () {
|
|
@@ -571,7 +524,7 @@ describe('gdpr enforcement', function () {
|
|
|
571
524
|
name: 'sampleUserId'
|
|
572
525
|
}
|
|
573
526
|
}]
|
|
574
|
-
sinon.assert.calledWith(nextFnSpy, expectedSubmodules, {...consentData, hasValidated: true});
|
|
527
|
+
sinon.assert.calledWith(nextFnSpy, expectedSubmodules, { ...consentData, hasValidated: true });
|
|
575
528
|
});
|
|
576
529
|
});
|
|
577
530
|
|
|
@@ -630,17 +583,17 @@ describe('gdpr enforcement', function () {
|
|
|
630
583
|
gdprDataHandlerStub.returns(consentData);
|
|
631
584
|
adapterManagerStub.withArgs('bidder_1').returns({
|
|
632
585
|
getSpec: function () {
|
|
633
|
-
return {'gvlid': 4}
|
|
586
|
+
return { 'gvlid': 4 }
|
|
634
587
|
}
|
|
635
588
|
});
|
|
636
589
|
adapterManagerStub.withArgs('bidder_2').returns({
|
|
637
590
|
getSpec: function () {
|
|
638
|
-
return {'gvlid': 5}
|
|
591
|
+
return { 'gvlid': 5 }
|
|
639
592
|
}
|
|
640
593
|
});
|
|
641
594
|
adapterManagerStub.withArgs('bidder_3').returns({
|
|
642
595
|
getSpec: function () {
|
|
643
|
-
return {'gvlid': undefined}
|
|
596
|
+
return { 'gvlid': undefined }
|
|
644
597
|
}
|
|
645
598
|
});
|
|
646
599
|
makeBidRequestsHook(nextFnSpy, MOCK_AD_UNITS, []);
|
|
@@ -651,20 +604,20 @@ describe('gdpr enforcement', function () {
|
|
|
651
604
|
code: 'ad-unit-1',
|
|
652
605
|
mediaTypes: {},
|
|
653
606
|
bids: [
|
|
654
|
-
sinon.match({bidder: 'bidder_1'}),
|
|
655
|
-
sinon.match({bidder: 'bidder_2'})
|
|
607
|
+
sinon.match({ bidder: 'bidder_1' }),
|
|
608
|
+
sinon.match({ bidder: 'bidder_2' })
|
|
656
609
|
]
|
|
657
610
|
}, {
|
|
658
611
|
code: 'ad-unit-2',
|
|
659
612
|
mediaTypes: {},
|
|
660
613
|
bids: [
|
|
661
|
-
sinon.match({bidder: 'bidder_2'}),
|
|
662
|
-
sinon.match({bidder: 'bidder_3'}) // should be allowed even though it's doesn't have a gvlId because liTransparency is established.
|
|
614
|
+
sinon.match({ bidder: 'bidder_2' }),
|
|
615
|
+
sinon.match({ bidder: 'bidder_3' }) // should be allowed even though it's doesn't have a gvlId because liTransparency is established.
|
|
663
616
|
]
|
|
664
617
|
}], []);
|
|
665
618
|
});
|
|
666
619
|
|
|
667
|
-
it('should block bidder which does not have consent and allow bidder which has consent (liTransparency is NOT established)', function
|
|
620
|
+
it('should block bidder which does not have consent and allow bidder which has consent (liTransparency is NOT established)', function() {
|
|
668
621
|
setEnforcementConfig({
|
|
669
622
|
gdpr: {
|
|
670
623
|
rules: [{
|
|
@@ -688,17 +641,17 @@ describe('gdpr enforcement', function () {
|
|
|
688
641
|
gdprDataHandlerStub.returns(consentData);
|
|
689
642
|
adapterManagerStub.withArgs('bidder_1').returns({
|
|
690
643
|
getSpec: function () {
|
|
691
|
-
return {'gvlid': 4}
|
|
644
|
+
return { 'gvlid': 4 }
|
|
692
645
|
}
|
|
693
646
|
});
|
|
694
647
|
adapterManagerStub.withArgs('bidder_2').returns({
|
|
695
648
|
getSpec: function () {
|
|
696
|
-
return {'gvlid': 5}
|
|
649
|
+
return { 'gvlid': 5 }
|
|
697
650
|
}
|
|
698
651
|
});
|
|
699
652
|
adapterManagerStub.withArgs('bidder_3').returns({
|
|
700
653
|
getSpec: function () {
|
|
701
|
-
return {'gvlid': undefined}
|
|
654
|
+
return { 'gvlid': undefined }
|
|
702
655
|
}
|
|
703
656
|
});
|
|
704
657
|
|
|
@@ -710,13 +663,13 @@ describe('gdpr enforcement', function () {
|
|
|
710
663
|
code: 'ad-unit-1',
|
|
711
664
|
mediaTypes: {},
|
|
712
665
|
bids: [
|
|
713
|
-
sinon.match({bidder: 'bidder_1'}), // 'bidder_2' is not present because it doesn't have vendorConsent
|
|
666
|
+
sinon.match({ bidder: 'bidder_1' }), // 'bidder_2' is not present because it doesn't have vendorConsent
|
|
714
667
|
]
|
|
715
668
|
}, {
|
|
716
669
|
code: 'ad-unit-2',
|
|
717
670
|
mediaTypes: {},
|
|
718
671
|
bids: [
|
|
719
|
-
sinon.match({bidder: 'bidder_3'}), // 'bidder_3' is allowed despite gvlId being undefined because it's part of vendorExceptions
|
|
672
|
+
sinon.match({ bidder: 'bidder_3' }), // 'bidder_3' is allowed despite gvlId being undefined because it's part of vendorExceptions
|
|
720
673
|
]
|
|
721
674
|
}], []);
|
|
722
675
|
|
|
@@ -774,12 +727,12 @@ describe('gdpr enforcement', function () {
|
|
|
774
727
|
nextFnSpy = sandbox.spy();
|
|
775
728
|
});
|
|
776
729
|
|
|
777
|
-
afterEach(function
|
|
730
|
+
afterEach(function() {
|
|
778
731
|
config.resetConfig();
|
|
779
732
|
sandbox.restore();
|
|
780
733
|
});
|
|
781
734
|
|
|
782
|
-
it('should block analytics adapter which does not have consent and allow the one(s) which have consent', function
|
|
735
|
+
it('should block analytics adapter which does not have consent and allow the one(s) which have consent', function() {
|
|
783
736
|
setEnforcementConfig({
|
|
784
737
|
gdpr: {
|
|
785
738
|
rules: [{
|
|
@@ -797,9 +750,9 @@ describe('gdpr enforcement', function () {
|
|
|
797
750
|
consentData.gdprApplies = true;
|
|
798
751
|
|
|
799
752
|
gdprDataHandlerStub.returns(consentData);
|
|
800
|
-
adapterManagerStub.withArgs('analyticsAdapter_A').returns({gvlid: 3});
|
|
801
|
-
adapterManagerStub.withArgs('analyticsAdapter_B').returns({gvlid: 5});
|
|
802
|
-
adapterManagerStub.withArgs('analyticsAdapter_C').returns({gvlid: 1});
|
|
753
|
+
adapterManagerStub.withArgs('analyticsAdapter_A').returns({ gvlid: 3 });
|
|
754
|
+
adapterManagerStub.withArgs('analyticsAdapter_B').returns({ gvlid: 5 });
|
|
755
|
+
adapterManagerStub.withArgs('analyticsAdapter_C').returns({ gvlid: 1 });
|
|
803
756
|
|
|
804
757
|
enableAnalyticsHook(nextFnSpy, MOCK_ANALYTICS_ADAPTER_CONFIG);
|
|
805
758
|
|
|
@@ -1072,7 +1025,7 @@ describe('gdpr enforcement', function () {
|
|
|
1072
1025
|
expect(purpose2Rule).to.deep.equal(purpose2RuleDefinedInConfig);
|
|
1073
1026
|
});
|
|
1074
1027
|
|
|
1075
|
-
it('should use the "rules" defined in config if a definition found', function
|
|
1028
|
+
it('should use the "rules" defined in config if a definition found', function() {
|
|
1076
1029
|
const rules = [{
|
|
1077
1030
|
purpose: 'storage',
|
|
1078
1031
|
enforcePurpose: false,
|
|
@@ -1082,23 +1035,23 @@ describe('gdpr enforcement', function () {
|
|
|
1082
1035
|
enforcePurpose: false,
|
|
1083
1036
|
enforceVendor: false
|
|
1084
1037
|
}]
|
|
1085
|
-
setEnforcementConfig({gdpr: {rules}});
|
|
1038
|
+
setEnforcementConfig({gdpr: { rules }});
|
|
1086
1039
|
|
|
1087
1040
|
expect(enforcementRules).to.deep.equal(rules);
|
|
1088
1041
|
});
|
|
1089
1042
|
});
|
|
1090
1043
|
|
|
1091
|
-
describe('TCF2FinalResults', function
|
|
1044
|
+
describe('TCF2FinalResults', function() {
|
|
1092
1045
|
let sandbox;
|
|
1093
|
-
beforeEach(function
|
|
1046
|
+
beforeEach(function() {
|
|
1094
1047
|
sandbox = sinon.createSandbox();
|
|
1095
1048
|
sandbox.spy(events, 'emit');
|
|
1096
1049
|
});
|
|
1097
|
-
afterEach(function
|
|
1050
|
+
afterEach(function() {
|
|
1098
1051
|
config.resetConfig();
|
|
1099
1052
|
sandbox.restore();
|
|
1100
1053
|
});
|
|
1101
|
-
it('should emit TCF2 enforcement data on auction end', function
|
|
1054
|
+
it('should emit TCF2 enforcement data on auction end', function() {
|
|
1102
1055
|
const rules = [{
|
|
1103
1056
|
purpose: 'storage',
|
|
1104
1057
|
enforcePurpose: false,
|
|
@@ -1108,7 +1061,7 @@ describe('gdpr enforcement', function () {
|
|
|
1108
1061
|
enforcePurpose: false,
|
|
1109
1062
|
enforceVendor: false
|
|
1110
1063
|
}]
|
|
1111
|
-
setEnforcementConfig({gdpr: {rules}});
|
|
1064
|
+
setEnforcementConfig({gdpr: { rules }});
|
|
1112
1065
|
|
|
1113
1066
|
events.emit('auctionEnd', {})
|
|
1114
1067
|
|
|
@@ -1117,28 +1070,28 @@ describe('gdpr enforcement', function () {
|
|
|
1117
1070
|
})
|
|
1118
1071
|
});
|
|
1119
1072
|
|
|
1120
|
-
describe('getGvlid', function
|
|
1073
|
+
describe('getGvlid', function() {
|
|
1121
1074
|
let sandbox;
|
|
1122
1075
|
let getGvlidForBidAdapterStub;
|
|
1123
1076
|
let getGvlidForUserIdModuleStub;
|
|
1124
1077
|
let getGvlidForAnalyticsAdapterStub;
|
|
1125
|
-
beforeEach(function
|
|
1078
|
+
beforeEach(function() {
|
|
1126
1079
|
sandbox = sinon.createSandbox();
|
|
1127
1080
|
getGvlidForBidAdapterStub = sandbox.stub(internal, 'getGvlidForBidAdapter');
|
|
1128
1081
|
getGvlidForUserIdModuleStub = sandbox.stub(internal, 'getGvlidForUserIdModule');
|
|
1129
1082
|
getGvlidForAnalyticsAdapterStub = sandbox.stub(internal, 'getGvlidForAnalyticsAdapter');
|
|
1130
1083
|
});
|
|
1131
|
-
afterEach(function
|
|
1084
|
+
afterEach(function() {
|
|
1132
1085
|
sandbox.restore();
|
|
1133
1086
|
config.resetConfig();
|
|
1134
1087
|
});
|
|
1135
1088
|
|
|
1136
|
-
it('should return "null" if called without passing any argument', function
|
|
1089
|
+
it('should return "null" if called without passing any argument', function() {
|
|
1137
1090
|
const gvlid = getGvlid();
|
|
1138
1091
|
expect(gvlid).to.equal(null);
|
|
1139
1092
|
});
|
|
1140
1093
|
|
|
1141
|
-
it('should return "null" if GVL ID is not defined for any of these modules: Bid adapter, UserId submodule and Analytics adapter', function
|
|
1094
|
+
it('should return "null" if GVL ID is not defined for any of these modules: Bid adapter, UserId submodule and Analytics adapter', function() {
|
|
1142
1095
|
getGvlidForBidAdapterStub.withArgs('moduleA').returns(null);
|
|
1143
1096
|
getGvlidForUserIdModuleStub.withArgs('moduleA').returns(null);
|
|
1144
1097
|
getGvlidForAnalyticsAdapterStub.withArgs('moduleA').returns(null);
|
|
@@ -1147,7 +1100,7 @@ describe('gdpr enforcement', function () {
|
|
|
1147
1100
|
expect(gvlid).to.equal(null);
|
|
1148
1101
|
});
|
|
1149
1102
|
|
|
1150
|
-
it('should return the GVL ID from gvlMapping if it is defined in setConfig', function
|
|
1103
|
+
it('should return the GVL ID from gvlMapping if it is defined in setConfig', function() {
|
|
1151
1104
|
config.setConfig({
|
|
1152
1105
|
gvlMapping: {
|
|
1153
1106
|
moduleA: 1
|
|
@@ -1161,7 +1114,7 @@ describe('gdpr enforcement', function () {
|
|
|
1161
1114
|
expect(gvlid).to.equal(1);
|
|
1162
1115
|
});
|
|
1163
1116
|
|
|
1164
|
-
it('should return the GVL ID by calling getGvlidForBidAdapter -> getGvlidForUserIdModule -> getGvlidForAnalyticsAdapter in sequence', function
|
|
1117
|
+
it('should return the GVL ID by calling getGvlidForBidAdapter -> getGvlidForUserIdModule -> getGvlidForAnalyticsAdapter in sequence', function() {
|
|
1165
1118
|
getGvlidForBidAdapterStub.withArgs('moduleA').returns(null);
|
|
1166
1119
|
getGvlidForUserIdModuleStub.withArgs('moduleA').returns(null);
|
|
1167
1120
|
getGvlidForAnalyticsAdapterStub.withArgs('moduleA').returns(7);
|
|
@@ -226,6 +226,38 @@ describe('TheMediaGridNM Adapter', function () {
|
|
|
226
226
|
}
|
|
227
227
|
];
|
|
228
228
|
|
|
229
|
+
it('if content and segment is present in jwTargeting, payload must have right params', function () {
|
|
230
|
+
const jsContent = {id: 'test_jw_content_id'};
|
|
231
|
+
const jsSegments = ['test_seg_1', 'test_seg_2'];
|
|
232
|
+
const bidRequestsWithJwTargeting = bidRequests.map((bid) => {
|
|
233
|
+
return Object.assign({
|
|
234
|
+
rtd: {
|
|
235
|
+
jwplayer: {
|
|
236
|
+
targeting: {
|
|
237
|
+
segments: jsSegments,
|
|
238
|
+
content: jsContent
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
}, bid);
|
|
243
|
+
});
|
|
244
|
+
const requests = spec.buildRequests(bidRequestsWithJwTargeting, bidderRequest);
|
|
245
|
+
requests.forEach((req, i) => {
|
|
246
|
+
const payload = req.data;
|
|
247
|
+
expect(req).to.have.property('data');
|
|
248
|
+
expect(payload).to.have.property('user');
|
|
249
|
+
expect(payload.user.data).to.deep.equal([{
|
|
250
|
+
name: 'iow_labs_pub_data',
|
|
251
|
+
segment: [
|
|
252
|
+
{name: 'jwpseg', value: jsSegments[0]},
|
|
253
|
+
{name: 'jwpseg', value: jsSegments[1]}
|
|
254
|
+
]
|
|
255
|
+
}]);
|
|
256
|
+
expect(payload).to.have.property('site');
|
|
257
|
+
expect(payload.site.content).to.deep.equal(jsContent);
|
|
258
|
+
});
|
|
259
|
+
});
|
|
260
|
+
|
|
229
261
|
it('should attach valid params to the tag', function () {
|
|
230
262
|
const requests = spec.buildRequests(bidRequests, bidderRequest);
|
|
231
263
|
const requestsSizes = ['300x250,300x600', '728x90'];
|
|
@@ -22,7 +22,7 @@ describe('HadronIdSystem', function () {
|
|
|
22
22
|
const callback = hadronIdSubmodule.getId(config).callback;
|
|
23
23
|
callback(callbackSpy);
|
|
24
24
|
const request = server.requests[0];
|
|
25
|
-
expect(request.url).to.eq(`https://id.hadron.ad.gt/api/v1/pbhid`);
|
|
25
|
+
expect(request.url).to.eq(`https://id.hadron.ad.gt/api/v1/pbhid?partner_id=0&_it=prebid`);
|
|
26
26
|
request.respond(200, { 'Content-Type': 'application/json' }, JSON.stringify({ hadronId: 'testHadronId1' }));
|
|
27
27
|
expect(callbackSpy.lastCall.lastArg).to.deep.equal({hadronId: 'testHadronId1'});
|
|
28
28
|
});
|
|
@@ -49,7 +49,7 @@ describe('HadronIdSystem', function () {
|
|
|
49
49
|
const callback = hadronIdSubmodule.getId(config).callback;
|
|
50
50
|
callback(callbackSpy);
|
|
51
51
|
const request = server.requests[0];
|
|
52
|
-
expect(request.url).to.eq('https://hadronid.publync.com');
|
|
52
|
+
expect(request.url).to.eq('https://hadronid.publync.com?partner_id=0&_it=prebid');
|
|
53
53
|
request.respond(200, { 'Content-Type': 'application/json' }, JSON.stringify({ hadronId: 'testHadronId1' }));
|
|
54
54
|
expect(callbackSpy.lastCall.lastArg).to.deep.equal({hadronId: 'testHadronId1'});
|
|
55
55
|
});
|
|
@@ -94,8 +94,8 @@ describe('IDx ID System', () => {
|
|
|
94
94
|
adUnits = [getAdUnitMock()];
|
|
95
95
|
init(config);
|
|
96
96
|
setSubmoduleRegistry([idxIdSubmodule]);
|
|
97
|
-
config.setConfig(getConfigMock());
|
|
98
97
|
getCookieStub.withArgs(IDX_COOKIE_NAME).returns(IDX_COOKIE_STORED);
|
|
98
|
+
config.setConfig(getConfigMock());
|
|
99
99
|
});
|
|
100
100
|
|
|
101
101
|
afterEach(() => {
|