prebid.js 7.17.0 → 7.18.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/33acrossBidAdapter.js +1 -1
- package/dist/adagioBidAdapter.js +1 -1
- package/dist/adbookpspBidAdapter.js +1 -1
- package/dist/adgenerationBidAdapter.js +1 -1
- package/dist/adqueryBidAdapter.js +1 -1
- package/dist/adrelevantisBidAdapter.js +1 -1
- package/dist/adtrgtmeBidAdapter.js +1 -1
- package/dist/adxcgBidAdapter.js +1 -1
- package/dist/adyoulikeBidAdapter.js +1 -1
- package/dist/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/audiencerunBidAdapter.js +1 -1
- package/dist/axonixBidAdapter.js +1 -1
- package/dist/bidglassBidAdapter.js +1 -1
- package/dist/bidwatchAnalyticsAdapter.js +1 -1
- package/dist/big-richmediaBidAdapter.js +1 -1
- package/dist/bluebillywigBidAdapter.js +1 -1
- package/dist/bridgewellBidAdapter.js +1 -1
- package/dist/brightMountainMediaBidAdapter.js +1 -1
- package/dist/carodaBidAdapter.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/dspxBidAdapter.js +1 -1
- package/dist/eplanningBidAdapter.js +1 -1
- package/dist/finativeBidAdapter.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/growthCodeIdSystem.js +1 -0
- package/dist/gumgumBidAdapter.js +1 -1
- package/dist/h12mediaBidAdapter.js +1 -1
- package/dist/id5IdSystem.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/konduitAnalyticsAdapter.js +1 -1
- package/dist/kueezBidAdapter.js +1 -1
- package/dist/lassoBidAdapter.js +1 -1
- package/dist/lifestreetBidAdapter.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/mediakeysBidAdapter.js +1 -1
- package/dist/mediasquareBidAdapter.js +1 -1
- package/dist/mgidBidAdapter.js +1 -1
- package/dist/minutemediaBidAdapter.js +1 -1
- package/dist/nativoBidAdapter.js +1 -1
- package/dist/nextMillenniumBidAdapter.js +1 -1
- package/dist/not-for-prod/prebid.js +119 -118
- 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/publinkIdSystem.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/rhythmoneBidAdapter.js +1 -1
- package/dist/riseBidAdapter.js +1 -1
- package/dist/rubiconAnalyticsAdapter.js +1 -1
- package/dist/rubiconBidAdapter.js +1 -1
- package/dist/seedingAllianceBidAdapter.js +1 -1
- package/dist/seedtagBidAdapter.js +1 -1
- package/dist/sharethroughAnalyticsAdapter.js +1 -1
- package/dist/sharethroughBidAdapter.js +1 -1
- package/dist/shinezBidAdapter.js +1 -1
- package/dist/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/modules/adagioBidAdapter.js +2 -1
- package/modules/adqueryBidAdapter.js +4 -2
- package/modules/bidwatchAnalyticsAdapter.js +1 -1
- package/modules/gridBidAdapter.js +1 -1
- package/modules/growthCodeIdSystem.js +164 -0
- package/modules/growthCodeIdSystem.md +37 -0
- package/modules/nativoBidAdapter.js +2 -1
- package/modules/nextMillenniumBidAdapter.js +34 -11
- package/modules/seedtagBidAdapter.js +4 -0
- package/modules/taboolaBidAdapter.js +3 -7
- package/modules/userId/eids.js +19 -0
- package/modules/vidazooBidAdapter.js +1 -1
- package/package.json +1 -1
- package/test/spec/modules/adagioBidAdapter_spec.js +23 -0
- package/test/spec/modules/adqueryBidAdapter_spec.js +11 -0
- package/test/spec/modules/bidwatchAnalyticsAdapter_spec.js +2 -0
- package/test/spec/modules/growthCodeIdSystem_spec.js +83 -0
- package/test/spec/modules/prebidServerBidAdapter_spec.js +12 -0
- package/test/spec/modules/seedtagBidAdapter_spec.js +45 -0
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { growthCodeIdSubmodule } from 'modules/growthCodeIdSystem.js';
|
|
2
|
+
import * as utils from 'src/utils.js';
|
|
3
|
+
import { server } from 'test/mocks/xhr.js';
|
|
4
|
+
import { uspDataHandler } from 'src/adapterManager.js';
|
|
5
|
+
import {expect} from 'chai';
|
|
6
|
+
import {getStorageManager} from '../../../src/storageManager.js';
|
|
7
|
+
|
|
8
|
+
const GCID_EXPIRY = 45;
|
|
9
|
+
const MODULE_NAME = 'growthCodeId';
|
|
10
|
+
const SHAREDID = 'fe9c5c89-7d56-4666-976d-e07e73b3b664';
|
|
11
|
+
|
|
12
|
+
export const storage = getStorageManager({ gvlid: undefined, moduleName: MODULE_NAME });
|
|
13
|
+
|
|
14
|
+
const getIdParams = {params: {
|
|
15
|
+
pid: 'TEST01',
|
|
16
|
+
publisher_id: '_sharedid',
|
|
17
|
+
publisher_id_storage: 'html5',
|
|
18
|
+
}};
|
|
19
|
+
|
|
20
|
+
describe('growthCodeIdSystem', () => {
|
|
21
|
+
let logErrorStub;
|
|
22
|
+
|
|
23
|
+
beforeEach(function () {
|
|
24
|
+
logErrorStub = sinon.stub(utils, 'logError');
|
|
25
|
+
storage.setDataInLocalStorage('_sharedid', SHAREDID);
|
|
26
|
+
const expiresStr = (new Date(Date.now() + (GCID_EXPIRY * (60 * 60 * 24 * 1000)))).toUTCString();
|
|
27
|
+
if (storage.cookiesAreEnabled()) {
|
|
28
|
+
storage.setCookie('_sharedid', SHAREDID, expiresStr, 'LAX');
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
afterEach(function () {
|
|
33
|
+
logErrorStub.restore();
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
describe('name', () => {
|
|
37
|
+
it('should expose the name of the submodule', () => {
|
|
38
|
+
expect(growthCodeIdSubmodule.name).to.equal('growthCodeId');
|
|
39
|
+
});
|
|
40
|
+
});
|
|
41
|
+
|
|
42
|
+
it('should NOT call the growthcode id endpoint if gdpr applies but consent string is missing', function () {
|
|
43
|
+
let submoduleCallback = growthCodeIdSubmodule.getId(getIdParams, { gdprApplies: true }, undefined);
|
|
44
|
+
expect(submoduleCallback).to.be.undefined;
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
it('should log an error if pid configParam was not passed when getId', function () {
|
|
48
|
+
growthCodeIdSubmodule.getId();
|
|
49
|
+
expect(logErrorStub.callCount).to.be.equal(1);
|
|
50
|
+
});
|
|
51
|
+
|
|
52
|
+
it('should log an error if sharedId (LocalStore) is not setup correctly', function () {
|
|
53
|
+
growthCodeIdSubmodule.getId({params: {
|
|
54
|
+
pid: 'TEST01',
|
|
55
|
+
publisher_id: '_sharedid_bad',
|
|
56
|
+
publisher_id_storage: 'html5',
|
|
57
|
+
}});
|
|
58
|
+
expect(logErrorStub.callCount).to.be.equal(1);
|
|
59
|
+
});
|
|
60
|
+
|
|
61
|
+
it('should log an error if sharedId (LocalStore) is not setup correctly', function () {
|
|
62
|
+
growthCodeIdSubmodule.getId({params: {
|
|
63
|
+
pid: 'TEST01',
|
|
64
|
+
publisher_id: '_sharedid_bad',
|
|
65
|
+
publisher_id_storage: 'cookie',
|
|
66
|
+
}});
|
|
67
|
+
expect(logErrorStub.callCount).to.be.equal(1);
|
|
68
|
+
});
|
|
69
|
+
|
|
70
|
+
it('should call the growthcode id endpoint', function () {
|
|
71
|
+
let callBackSpy = sinon.spy();
|
|
72
|
+
let submoduleCallback = growthCodeIdSubmodule.getId(getIdParams).callback;
|
|
73
|
+
submoduleCallback(callBackSpy);
|
|
74
|
+
let request = server.requests[0];
|
|
75
|
+
expect(request.url.substr(0, 85)).to.be.eq('https://p2.gcprivacy.com/v1/pb?pid=TEST01&uid=' + SHAREDID + '&u=');
|
|
76
|
+
request.respond(
|
|
77
|
+
200,
|
|
78
|
+
{},
|
|
79
|
+
JSON.stringify({})
|
|
80
|
+
);
|
|
81
|
+
expect(callBackSpy.calledOnce).to.be.true;
|
|
82
|
+
});
|
|
83
|
+
})
|
|
@@ -3469,5 +3469,17 @@ describe('S2S Adapter', function () {
|
|
|
3469
3469
|
|
|
3470
3470
|
expect(requestBid.ext.prebid.floors).to.deep.equal({ enabled: false });
|
|
3471
3471
|
});
|
|
3472
|
+
|
|
3473
|
+
it('should override prebid server default DEFAULT_S2S_CURRENCY', function () {
|
|
3474
|
+
config.setConfig({
|
|
3475
|
+
currency: { adServerCurrency: 'JPY' },
|
|
3476
|
+
});
|
|
3477
|
+
|
|
3478
|
+
const bidRequests = utils.deepClone(BID_REQUESTS);
|
|
3479
|
+
adapter.callBids(REQUEST, bidRequests, addBidResponse, done, ajax);
|
|
3480
|
+
|
|
3481
|
+
const parsedRequestBody = JSON.parse(server.requests[1].requestBody);
|
|
3482
|
+
expect(parsedRequestBody.cur).to.deep.equal(['JPY']);
|
|
3483
|
+
});
|
|
3472
3484
|
});
|
|
3473
3485
|
});
|
|
@@ -356,6 +356,51 @@ describe('Seedtag Adapter', function () {
|
|
|
356
356
|
expect(videoBid.requestCount).to.equal(1);
|
|
357
357
|
});
|
|
358
358
|
});
|
|
359
|
+
|
|
360
|
+
describe('schain param', function () {
|
|
361
|
+
it('should add schain to payload when exposed on validBidRequest', function () {
|
|
362
|
+
// https://github.com/prebid/Prebid.js/blob/master/modules/schain.md#sample-code-for-passing-the-schain-object
|
|
363
|
+
const schain = {
|
|
364
|
+
validation: 'strict',
|
|
365
|
+
config: {
|
|
366
|
+
ver: '1.0',
|
|
367
|
+
complete: 1,
|
|
368
|
+
nodes: [
|
|
369
|
+
{
|
|
370
|
+
asi: 'indirectseller.com',
|
|
371
|
+
sid: '00001',
|
|
372
|
+
hp: 1,
|
|
373
|
+
},
|
|
374
|
+
|
|
375
|
+
{
|
|
376
|
+
asi: 'indirectseller-2.com',
|
|
377
|
+
sid: '00002',
|
|
378
|
+
hp: 1,
|
|
379
|
+
},
|
|
380
|
+
],
|
|
381
|
+
},
|
|
382
|
+
};
|
|
383
|
+
|
|
384
|
+
// duplicate
|
|
385
|
+
const bidRequests = JSON.parse(JSON.stringify(validBidRequests))
|
|
386
|
+
bidRequests[0].schain = schain;
|
|
387
|
+
|
|
388
|
+
const request = spec.buildRequests(bidRequests, bidderRequest);
|
|
389
|
+
|
|
390
|
+
const payload = JSON.parse(request.data);
|
|
391
|
+
|
|
392
|
+
expect(payload.schain).to.exist;
|
|
393
|
+
expect(payload.schain).to.deep.equal(schain);
|
|
394
|
+
});
|
|
395
|
+
|
|
396
|
+
it("shouldn't add schain to payload when not exposed", function () {
|
|
397
|
+
const request = spec.buildRequests(validBidRequests, bidderRequest);
|
|
398
|
+
|
|
399
|
+
const payload = JSON.parse(request.data);
|
|
400
|
+
|
|
401
|
+
expect(payload.schain).to.not.exist;
|
|
402
|
+
});
|
|
403
|
+
});
|
|
359
404
|
});
|
|
360
405
|
|
|
361
406
|
describe('interpret response method', function () {
|