prebid.js 7.2.0 → 7.5.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/.github/dependabot.yml +6 -0
- package/.github/workflows/issue_tracker.yml +5 -0
- package/.github/workflows/release-drafter.yml +6 -0
- package/README.md +35 -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/adkernelBidAdapter.js +1 -1
- package/dist/adotBidAdapter.js +1 -1
- package/dist/adpod.js +1 -1
- package/dist/adqueryBidAdapter.js +1 -1
- package/dist/adrelevantisBidAdapter.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/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/concertBidAdapter.js +1 -1
- package/dist/connectadBidAdapter.js +1 -1
- package/dist/consumableBidAdapter.js +1 -1
- package/dist/conversantBidAdapter.js +1 -1
- package/dist/cpexIdSystem.js +1 -1
- package/dist/craftBidAdapter.js +1 -1
- package/dist/criteoBidAdapter.js +1 -1
- package/dist/debugging-standalone.js +1 -1
- package/dist/debugging.js +1 -1
- package/dist/dianomiBidAdapter.js +1 -0
- package/dist/dspxBidAdapter.js +1 -1
- package/dist/eplanningBidAdapter.js +1 -1
- package/dist/finativeBidAdapter.js +1 -0
- package/dist/fpdModule.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/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/kargoBidAdapter.js +1 -1
- package/dist/konduitAnalyticsAdapter.js +1 -1
- package/dist/kueezBidAdapter.js +1 -1
- package/dist/lassoBidAdapter.js +1 -0
- 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/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/nativoBidAdapter.js +1 -1
- package/dist/not-for-prod/prebid.js +137 -131
- package/dist/oguryBidAdapter.js +1 -1
- package/dist/onetagBidAdapter.js +1 -1
- package/dist/ooloAnalyticsAdapter.js +1 -1
- package/dist/openxOrtbBidAdapter.js +1 -0
- package/dist/outbrainBidAdapter.js +1 -1
- package/dist/parrableIdSystem.js +1 -1
- package/dist/pixfutureBidAdapter.js +1 -1
- package/dist/prebid-core.js +2 -2
- 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/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/sharedIdSystem.js +1 -1
- package/dist/sharethroughAnalyticsAdapter.js +1 -1
- package/dist/sharethroughBidAdapter.js +1 -1
- package/dist/shinezBidAdapter.js +1 -0
- package/dist/sizeMappingV2.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/tncIdSystem.js +1 -0
- 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/ventesBidAdapter.js +1 -1
- package/dist/vidazooBidAdapter.js +1 -1
- package/dist/videobyteBidAdapter.js +1 -1
- package/dist/visxBidAdapter.js +1 -1
- package/dist/vrtcalBidAdapter.js +1 -1
- package/dist/vuukleBidAdapter.js +1 -1
- package/dist/widespaceBidAdapter.js +1 -1
- package/dist/winrBidAdapter.js +1 -1
- package/dist/yahoosspBidAdapter.js +1 -1
- package/dist/yieldlabBidAdapter.js +1 -1
- package/dist/yieldmoBidAdapter.js +1 -1
- package/dist/yieldoneAnalyticsAdapter.js +1 -1
- package/dist/yieldoneBidAdapter.js +1 -1
- package/governance.md +5 -11
- package/gulpHelpers.js +1 -1
- package/gulpfile.js +1 -1
- package/karma.conf.maker.js +3 -1
- package/modules/.submodules.json +1 -0
- package/modules/33acrossBidAdapter.js +5 -1
- package/modules/adkernelBidAdapter.js +2 -1
- package/modules/adotBidAdapter.js +3 -3
- package/modules/adqueryBidAdapter.js +5 -1
- package/modules/appnexusBidAdapter.js +3 -3
- package/modules/cpexIdSystem.js +7 -8
- package/modules/criteoBidAdapter.js +7 -1
- package/modules/cwireBidAdapter.md +1 -1
- package/modules/debugging/bidInterceptor.js +1 -1
- package/modules/debugging/index.js +2 -1
- package/modules/dianomiBidAdapter.js +369 -0
- package/modules/dianomiBidAdapter.md +73 -0
- package/modules/finativeBidAdapter.js +235 -0
- package/modules/finativeBidAdapter.md +45 -0
- package/modules/fpdModule/index.js +6 -5
- package/modules/gdprEnforcement.js +8 -14
- package/modules/gumgumBidAdapter.js +2 -0
- package/modules/gumgumBidAdapter.md +19 -1
- 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/insticatorBidAdapter.js +9 -0
- package/modules/ixBidAdapter.js +457 -57
- package/modules/ixBidAdapter.md +95 -5
- package/modules/kargoAnalyticsAdapter.js +88 -6
- package/modules/kargoAnalyticsAdapter.md +33 -0
- package/modules/kargoBidAdapter.js +1 -2
- package/modules/lassoBidAdapter.js +133 -0
- package/modules/lassoBidAdapter.md +29 -0
- package/modules/medianetBidAdapter.js +9 -5
- package/modules/missenaBidAdapter.js +20 -2
- package/modules/nativoBidAdapter.js +19 -7
- package/modules/openxBidAdapter.md +3 -1
- package/modules/openxOrtbBidAdapter.js +349 -0
- package/modules/openxOrtbBidAdapter.md +105 -0
- package/modules/pubCommonId.js +1 -2
- package/modules/readpeakBidAdapter.js +15 -6
- package/modules/relaidoBidAdapter.js +19 -4
- package/modules/riseBidAdapter.js +1 -0
- package/modules/seedtagBidAdapter.js +33 -1
- package/modules/sharedIdSystem.js +11 -5
- package/modules/sharethroughBidAdapter.js +9 -24
- package/modules/shinezBidAdapter.js +435 -0
- package/modules/shinezBidAdapter.md +76 -0
- package/modules/sonobiBidAdapter.js +28 -9
- package/modules/sovrnBidAdapter.js +16 -10
- package/modules/taboolaBidAdapter.js +1 -1
- package/modules/taboolaBidAdapter.md +3 -3
- package/modules/tncIdSystem.js +63 -0
- package/modules/tncIdSystem.md +33 -0
- package/modules/userId/eids.js +12 -0
- package/modules/userId/eids.md +7 -0
- package/modules/userId/userId.md +17 -0
- package/modules/ventesBidAdapter.js +1 -1
- package/modules/ventesBidAdapter.md +1 -1
- package/modules/vrtcalBidAdapter.js +35 -0
- package/modules/yieldlabBidAdapter.js +4 -0
- package/modules/yieldmoBidAdapter.js +20 -2
- package/modules/yieldoneBidAdapter.js +12 -1
- package/package.json +1 -1
- package/plugins/pbjsGlobals.js +2 -1
- package/src/adloader.js +1 -0
- package/src/prebid.js +4 -1
- package/src/storageManager.js +4 -5
- package/test/spec/modules/33acrossBidAdapter_spec.js +39 -0
- package/test/spec/modules/appnexusBidAdapter_spec.js +165 -156
- package/test/spec/modules/cpexIdSystem_spec.js +5 -5
- package/test/spec/modules/criteoBidAdapter_spec.js +15 -5
- package/test/spec/modules/debugging_mod_spec.js +7 -0
- package/test/spec/modules/dianomiBidAdapter_spec.js +1223 -0
- package/test/spec/modules/eids_spec.js +26 -1
- package/test/spec/modules/finativeBidAdapter_spec.js +186 -0
- package/test/spec/modules/fpdModule_spec.js +28 -1
- package/test/spec/modules/gdprEnforcement_spec.js +53 -100
- package/test/spec/modules/gumgumBidAdapter_spec.js +5 -0
- package/test/spec/modules/hadronIdSystem_spec.js +2 -2
- package/test/spec/modules/insticatorBidAdapter_spec.js +22 -1
- package/test/spec/modules/ixBidAdapter_spec.js +429 -10
- package/test/spec/modules/kargoAnalyticsAdapter_spec.js +42 -0
- package/test/spec/modules/kargoBidAdapter_spec.js +1 -0
- package/test/spec/modules/lassoBidAdapter_spec.js +177 -0
- package/test/spec/modules/medianetBidAdapter_spec.js +24 -1
- package/test/spec/modules/missenaBidAdapter_spec.js +36 -14
- package/test/spec/modules/nativoBidAdapter_spec.js +67 -17
- package/test/spec/modules/openxOrtbBidAdapter_spec.js +1303 -0
- package/test/spec/modules/readpeakBidAdapter_spec.js +1 -0
- package/test/spec/modules/relaidoBidAdapter_spec.js +29 -2
- package/test/spec/modules/riseBidAdapter_spec.js +3 -0
- package/test/spec/modules/seedtagBidAdapter_spec.js +4 -0
- package/test/spec/modules/sharethroughBidAdapter_spec.js +4 -4
- package/test/spec/modules/shinezBidAdapter_spec.js +479 -0
- package/test/spec/modules/sonobiBidAdapter_spec.js +38 -23
- package/test/spec/modules/sovrnBidAdapter_spec.js +39 -5
- package/test/spec/modules/taboolaBidAdapter_spec.js +1 -1
- package/test/spec/modules/tncIdSystem_spec.js +109 -0
- package/test/spec/modules/userId_spec.js +6 -3
- package/test/spec/modules/ventesBidAdapter_spec.js +2 -2
- package/test/spec/modules/vrtcalBidAdapter_spec.js +17 -0
- package/test/spec/modules/yieldlabBidAdapter_spec.js +4 -0
- package/test/spec/modules/yieldmoBidAdapter_spec.js +15 -2
- package/test/spec/modules/yieldoneBidAdapter_spec.js +43 -2
- package/test/spec/unit/pbjs_api_spec.js +23 -0
- package/webpack.conf.js +1 -1
|
@@ -1,16 +1,20 @@
|
|
|
1
1
|
import {
|
|
2
2
|
_each,
|
|
3
|
-
deepAccess,
|
|
4
|
-
deepSetValue,
|
|
5
3
|
getBidIdParameter,
|
|
6
|
-
getUniqueIdentifierStr,
|
|
7
4
|
isArray,
|
|
8
|
-
|
|
5
|
+
getUniqueIdentifierStr,
|
|
6
|
+
deepSetValue,
|
|
9
7
|
logError,
|
|
8
|
+
deepAccess,
|
|
9
|
+
isInteger,
|
|
10
10
|
logWarn
|
|
11
11
|
} from '../src/utils.js';
|
|
12
|
-
import {registerBidder} from '../src/adapters/bidderFactory.js'
|
|
13
|
-
import {
|
|
12
|
+
import { registerBidder } from '../src/adapters/bidderFactory.js'
|
|
13
|
+
import {
|
|
14
|
+
ADPOD,
|
|
15
|
+
BANNER,
|
|
16
|
+
VIDEO
|
|
17
|
+
} from '../src/mediaTypes.js'
|
|
14
18
|
import {createEidsArray} from './userId/eids.js';
|
|
15
19
|
|
|
16
20
|
const ORTB_VIDEO_PARAMS = {
|
|
@@ -83,7 +87,6 @@ export const spec = {
|
|
|
83
87
|
let iv;
|
|
84
88
|
let schain;
|
|
85
89
|
let eids;
|
|
86
|
-
let tpid = []
|
|
87
90
|
let criteoId;
|
|
88
91
|
|
|
89
92
|
_each(bidReqs, function (bid) {
|
|
@@ -94,7 +97,6 @@ export const spec = {
|
|
|
94
97
|
if (id.source === 'criteo.com') {
|
|
95
98
|
criteoId = id.uids[0].id
|
|
96
99
|
}
|
|
97
|
-
tpid.push({source: id.source, uid: id.uids[0].id})
|
|
98
100
|
}
|
|
99
101
|
})
|
|
100
102
|
}
|
|
@@ -175,7 +177,6 @@ export const spec = {
|
|
|
175
177
|
|
|
176
178
|
if (eids) {
|
|
177
179
|
deepSetValue(sovrnBidReq, 'user.ext.eids', eids)
|
|
178
|
-
deepSetValue(sovrnBidReq, 'user.ext.tpid', tpid)
|
|
179
180
|
if (criteoId) {
|
|
180
181
|
deepSetValue(sovrnBidReq, 'user.ext.prebid_criteoid', criteoId)
|
|
181
182
|
}
|
|
@@ -276,11 +277,16 @@ export const spec = {
|
|
|
276
277
|
|
|
277
278
|
function _buildVideoRequestObj(bid) {
|
|
278
279
|
const videoObj = {}
|
|
280
|
+
const bidSizes = deepAccess(bid, 'sizes')
|
|
279
281
|
const videoAdUnitParams = deepAccess(bid, 'mediaTypes.video', {})
|
|
280
282
|
const videoBidderParams = deepAccess(bid, 'params.video', {})
|
|
281
283
|
const computedParams = {}
|
|
282
284
|
|
|
283
|
-
if (
|
|
285
|
+
if (bidSizes) {
|
|
286
|
+
const sizes = (Array.isArray(bidSizes[0])) ? bidSizes[0] : bidSizes
|
|
287
|
+
computedParams.w = sizes[0]
|
|
288
|
+
computedParams.h = sizes[1]
|
|
289
|
+
} else if (Array.isArray(videoAdUnitParams.playerSize)) {
|
|
284
290
|
const sizes = (Array.isArray(videoAdUnitParams.playerSize[0])) ? videoAdUnitParams.playerSize[0] : videoAdUnitParams.playerSize
|
|
285
291
|
computedParams.w = sizes[0]
|
|
286
292
|
computedParams.h = sizes[1]
|
|
@@ -40,10 +40,10 @@ The Taboola Bidding adapter requires setup before beginning. Please contact us o
|
|
|
40
40
|
|
|
41
41
|
| Name | Scope | Description | Example | Type |
|
|
42
42
|
|----------------|----------|---------------------------------------------------------|----------------------------|--------------|
|
|
43
|
-
| `tagId` | required | Tag ID / Placement Name <br>
|
|
44
|
-
| `publisherId` | required |
|
|
43
|
+
| `tagId` | required | Tag ID / Placement Name <br> | `'Below The Article'` | `String` |
|
|
44
|
+
| `publisherId` | required | Numeric Publisher ID <br>(as provided by Taboola) | `'1234567'` | `String` |
|
|
45
45
|
| `bcat` | optional | List of blocked advertiser categories (IAB) | `['IAB1-1']` | `Array` |
|
|
46
46
|
| `badv` | optional | Blocked Advertiser Domains | `'example.com'` | `String Url` |
|
|
47
|
-
| `bidfloor` | optional | CPM bid floor | `0.25` | `
|
|
47
|
+
| `bidfloor` | optional | CPM bid floor | `0.25` | `Float` |
|
|
48
48
|
|
|
49
49
|
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { submodule } from '../src/hook.js';
|
|
2
|
+
import { logInfo } from '../src/utils.js';
|
|
3
|
+
import { loadExternalScript } from '../src/adloader.js';
|
|
4
|
+
|
|
5
|
+
const MODULE_NAME = 'tncId';
|
|
6
|
+
let url = null;
|
|
7
|
+
|
|
8
|
+
const waitTNCScript = (tncNS) => {
|
|
9
|
+
return new Promise((resolve, reject) => {
|
|
10
|
+
var tnc = window[tncNS];
|
|
11
|
+
if (!tnc) reject(new Error('No TNC Object'));
|
|
12
|
+
if (tnc.tncid) resolve(tnc.tncid);
|
|
13
|
+
tnc.ready(() => {
|
|
14
|
+
tnc = window[tncNS];
|
|
15
|
+
if (tnc.tncid) resolve(tnc.tncid);
|
|
16
|
+
else tnc.on('data-sent', () => resolve(tnc.tncid));
|
|
17
|
+
});
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
const loadRemoteScript = () => {
|
|
22
|
+
return new Promise((resolve) => {
|
|
23
|
+
loadExternalScript(url, MODULE_NAME, resolve);
|
|
24
|
+
})
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
const tncCallback = function (cb) {
|
|
28
|
+
let tncNS = '__tnc';
|
|
29
|
+
let promiseArray = [];
|
|
30
|
+
if (!window[tncNS]) {
|
|
31
|
+
tncNS = '__tncPbjs';
|
|
32
|
+
promiseArray.push(loadRemoteScript());
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
return Promise.all(promiseArray).then(() => waitTNCScript(tncNS)).then(cb).catch(() => cb());
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export const tncidSubModule = {
|
|
39
|
+
name: MODULE_NAME,
|
|
40
|
+
decode(id) {
|
|
41
|
+
return {
|
|
42
|
+
tncid: id
|
|
43
|
+
};
|
|
44
|
+
},
|
|
45
|
+
gvlid: 750,
|
|
46
|
+
getId(config, consentData) {
|
|
47
|
+
const gdpr = (consentData && typeof consentData.gdprApplies === 'boolean' && consentData.gdprApplies) ? 1 : 0;
|
|
48
|
+
const consentString = gdpr ? consentData.consentString : '';
|
|
49
|
+
|
|
50
|
+
if (gdpr && !consentString) {
|
|
51
|
+
logInfo('Consent string is required for TNCID module');
|
|
52
|
+
return;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
if (config.params && config.params.url) { url = config.params.url; }
|
|
56
|
+
|
|
57
|
+
return {
|
|
58
|
+
callback: function (cb) { return tncCallback(cb); }
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
submodule('userId', tncidSubModule)
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# TNCID UserID Module
|
|
2
|
+
|
|
3
|
+
### Prebid Configuration
|
|
4
|
+
|
|
5
|
+
First, make sure to add the TNCID submodule to your Prebid.js package with:
|
|
6
|
+
|
|
7
|
+
```
|
|
8
|
+
gulp build --modules=tncIdSystem,userId
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
### TNCIDIdSystem module Configuration
|
|
12
|
+
|
|
13
|
+
You can configure this submodule in your `userSync.userIds[]` configuration:
|
|
14
|
+
|
|
15
|
+
```javascript
|
|
16
|
+
pbjs.setConfig({
|
|
17
|
+
userSync: {
|
|
18
|
+
userIds: [{
|
|
19
|
+
name: 'tncId',
|
|
20
|
+
params: {
|
|
21
|
+
url: 'https://js.tncid.app/remote.min.js' //Optional
|
|
22
|
+
}
|
|
23
|
+
}],
|
|
24
|
+
syncDelay: 5000
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
```
|
|
28
|
+
#### Configuration Params
|
|
29
|
+
|
|
30
|
+
| Param Name | Required | Type | Description |
|
|
31
|
+
| --- | --- | --- | --- |
|
|
32
|
+
| name | Required | String | ID value for the TNCID module: `"tncId"` |
|
|
33
|
+
| params.url | Optional | String | Provide TNC fallback script URL, this script is loaded if there is no TNC script on page |
|
package/modules/userId/eids.js
CHANGED
|
@@ -307,11 +307,23 @@ export const USER_IDS_CONFIG = {
|
|
|
307
307
|
}
|
|
308
308
|
},
|
|
309
309
|
|
|
310
|
+
// tncId
|
|
311
|
+
'tncid': {
|
|
312
|
+
source: 'thenewco.it',
|
|
313
|
+
atype: 3
|
|
314
|
+
},
|
|
315
|
+
|
|
310
316
|
// Gravito MP ID
|
|
311
317
|
'gravitompId': {
|
|
312
318
|
source: 'gravito.net',
|
|
313
319
|
atype: 1
|
|
314
320
|
},
|
|
321
|
+
|
|
322
|
+
// cpexId
|
|
323
|
+
'cpexId': {
|
|
324
|
+
source: 'czechadid.cz',
|
|
325
|
+
atype: 1
|
|
326
|
+
}
|
|
315
327
|
};
|
|
316
328
|
|
|
317
329
|
// this function will create an eid object for the given UserId sub-module
|
package/modules/userId/eids.md
CHANGED
package/modules/userId/userId.md
CHANGED
|
@@ -356,3 +356,20 @@ pbjs.setConfig({
|
|
|
356
356
|
}
|
|
357
357
|
});
|
|
358
358
|
```
|
|
359
|
+
```
|
|
360
|
+
|
|
361
|
+
Example showing how to configure a `params` object to pass directly to bid adapters
|
|
362
|
+
|
|
363
|
+
```
|
|
364
|
+
pbjs.setConfig({
|
|
365
|
+
userSync: {
|
|
366
|
+
userIds: [{
|
|
367
|
+
name: 'tncId',
|
|
368
|
+
params: {
|
|
369
|
+
providerId: "c8549079-f149-4529-a34b-3fa91ef257d1"
|
|
370
|
+
}
|
|
371
|
+
}],
|
|
372
|
+
syncDelay: 5000
|
|
373
|
+
}
|
|
374
|
+
});
|
|
375
|
+
```
|
|
@@ -4,7 +4,7 @@ import {find} from '../src/polyfill.js';
|
|
|
4
4
|
import {registerBidder} from '../src/adapters/bidderFactory.js';
|
|
5
5
|
|
|
6
6
|
const BID_METHOD = 'POST';
|
|
7
|
-
const BIDDER_URL = '
|
|
7
|
+
const BIDDER_URL = 'https://ad.ventesavenues.in/va/ad';
|
|
8
8
|
|
|
9
9
|
function groupBy(values, key) {
|
|
10
10
|
const groups = values.reduce((acc, value) => {
|
|
@@ -2,6 +2,7 @@ import {registerBidder} from '../src/adapters/bidderFactory.js';
|
|
|
2
2
|
import { BANNER } from '../src/mediaTypes.js';
|
|
3
3
|
import {ajax} from '../src/ajax.js';
|
|
4
4
|
import {isFn, isPlainObject} from '../src/utils.js';
|
|
5
|
+
import { config } from '../src/config.js';
|
|
5
6
|
|
|
6
7
|
export const spec = {
|
|
7
8
|
code: 'vrtcal',
|
|
@@ -21,10 +22,32 @@ export const spec = {
|
|
|
21
22
|
}
|
|
22
23
|
}
|
|
23
24
|
|
|
25
|
+
let gdprApplies = 0;
|
|
26
|
+
let gdprConsent = '';
|
|
27
|
+
let ccpa = '';
|
|
28
|
+
let coppa = 0;
|
|
29
|
+
let tmax = 0;
|
|
30
|
+
|
|
31
|
+
if (bid && bid.gdprConsent) {
|
|
32
|
+
gdprApplies = bid.gdprConsent.gdprApplies ? 1 : 0;
|
|
33
|
+
gdprConsent = bid.gdprConsent.consentString;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
if (bid && bid.uspConsent) {
|
|
37
|
+
ccpa = bid.uspConsent;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
if (config.getConfig('coppa') === true) {
|
|
41
|
+
coppa = 1;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
tmax = config.getConfig('bidderTimeout');
|
|
45
|
+
|
|
24
46
|
const params = {
|
|
25
47
|
prebidJS: 1,
|
|
26
48
|
prebidAdUnitCode: bid.adUnitCode,
|
|
27
49
|
id: bid.bidId,
|
|
50
|
+
tmax: tmax,
|
|
28
51
|
imp: [{
|
|
29
52
|
id: '1',
|
|
30
53
|
banner: {
|
|
@@ -41,6 +64,18 @@ export const spec = {
|
|
|
41
64
|
device: {
|
|
42
65
|
ua: 'VRTCAL_FILLED',
|
|
43
66
|
ip: 'VRTCAL_FILLED'
|
|
67
|
+
},
|
|
68
|
+
regs: {
|
|
69
|
+
coppa: coppa,
|
|
70
|
+
ext: {
|
|
71
|
+
gdpr: gdprApplies,
|
|
72
|
+
us_privacy: ccpa
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
user: {
|
|
76
|
+
ext: {
|
|
77
|
+
consent: gdprConsent
|
|
78
|
+
}
|
|
44
79
|
}
|
|
45
80
|
};
|
|
46
81
|
|
|
@@ -49,6 +49,9 @@ export const spec = {
|
|
|
49
49
|
if (sizes.length > 0) {
|
|
50
50
|
adslotSizes.push(bid.params.adslotId + ':' + sizes.join('|'))
|
|
51
51
|
}
|
|
52
|
+
if (bid.params.extId) {
|
|
53
|
+
query.id = bid.params.extId;
|
|
54
|
+
}
|
|
52
55
|
if (bid.params.targeting) {
|
|
53
56
|
query.t = createTargetingString(bid.params.targeting)
|
|
54
57
|
}
|
|
@@ -165,6 +168,7 @@ export const spec = {
|
|
|
165
168
|
}
|
|
166
169
|
|
|
167
170
|
if (isNative(bidRequest, adType)) {
|
|
171
|
+
// there may be publishers still rely on it
|
|
168
172
|
const url = `${ENDPOINT}/d/${matchedBid.id}/${bidRequest.params.supplyId}/?ts=${timestamp}${extId}${gdprApplies}${gdprConsent}${pvId}`
|
|
169
173
|
bidResponse.adUrl = url
|
|
170
174
|
bidResponse.mediaType = NATIVE
|
|
@@ -25,6 +25,7 @@ const TIME_TO_LIVE = 300;
|
|
|
25
25
|
const NET_REVENUE = true;
|
|
26
26
|
const BANNER_SERVER_ENDPOINT = 'https://ads.yieldmo.com/exchange/prebid';
|
|
27
27
|
const VIDEO_SERVER_ENDPOINT = 'https://ads.yieldmo.com/exchange/prebidvideo';
|
|
28
|
+
const PB_COOKIE_ASSIST_SYNC_ENDPOINT = `https://ads.yieldmo.com/pbcas`;
|
|
28
29
|
const OUTSTREAM_VIDEO_PLAYER_URL = 'https://prebid-outstream.yieldmo.com/bundle.js';
|
|
29
30
|
const OPENRTB_VIDEO_BIDPARAMS = ['mimes', 'startdelay', 'placement', 'startdelay', 'skipafter', 'protocols', 'api',
|
|
30
31
|
'playbackmethod', 'maxduration', 'minduration', 'pos', 'skip', 'skippable'];
|
|
@@ -177,8 +178,25 @@ export const spec = {
|
|
|
177
178
|
return bids;
|
|
178
179
|
},
|
|
179
180
|
|
|
180
|
-
getUserSyncs: function
|
|
181
|
-
|
|
181
|
+
getUserSyncs: function(syncOptions, serverResponses, gdprConsent = {}, uspConsent = '') {
|
|
182
|
+
const syncs = [];
|
|
183
|
+
const gdprFlag = `&gdpr=${gdprConsent.gdprApplies ? 1 : 0}`;
|
|
184
|
+
const gdprString = `&gdpr_consent=${encodeURIComponent((gdprConsent.consentString || ''))}`;
|
|
185
|
+
const usPrivacy = `us_privacy=${encodeURIComponent(uspConsent)}`;
|
|
186
|
+
const pbCookieAssistSyncUrl = `${PB_COOKIE_ASSIST_SYNC_ENDPOINT}?${usPrivacy}${gdprFlag}${gdprString}`;
|
|
187
|
+
|
|
188
|
+
if (syncOptions.iframeEnabled) {
|
|
189
|
+
syncs.push({
|
|
190
|
+
type: 'iframe',
|
|
191
|
+
url: pbCookieAssistSyncUrl + '&type=iframe'
|
|
192
|
+
});
|
|
193
|
+
} else if (syncOptions.pixelEnabled) {
|
|
194
|
+
syncs.push({
|
|
195
|
+
type: 'image',
|
|
196
|
+
url: pbCookieAssistSyncUrl + '&type=image'
|
|
197
|
+
});
|
|
198
|
+
}
|
|
199
|
+
return syncs;
|
|
182
200
|
}
|
|
183
201
|
};
|
|
184
202
|
registerBidder(spec);
|
|
@@ -31,6 +31,8 @@ export const spec = {
|
|
|
31
31
|
const transactionId = bidRequest.transactionId;
|
|
32
32
|
const unitCode = bidRequest.adUnitCode;
|
|
33
33
|
const timeout = config.getConfig('bidderTimeout');
|
|
34
|
+
const language = window.navigator.language;
|
|
35
|
+
const screenSize = window.screen.width + 'x' + window.screen.height;
|
|
34
36
|
const payload = {
|
|
35
37
|
v: 'hb1',
|
|
36
38
|
p: placementId,
|
|
@@ -40,7 +42,9 @@ export const spec = {
|
|
|
40
42
|
tid: transactionId,
|
|
41
43
|
uc: unitCode,
|
|
42
44
|
tmax: timeout,
|
|
43
|
-
t: 'i'
|
|
45
|
+
t: 'i',
|
|
46
|
+
language: language,
|
|
47
|
+
screen_size: screenSize
|
|
44
48
|
};
|
|
45
49
|
|
|
46
50
|
const mediaType = getMediaType(bidRequest);
|
|
@@ -69,6 +73,13 @@ export const spec = {
|
|
|
69
73
|
payload.imuid = imuid;
|
|
70
74
|
}
|
|
71
75
|
|
|
76
|
+
// DACID
|
|
77
|
+
const dacId = deepAccess(bidRequest, 'userId.dacId.id');
|
|
78
|
+
if (isStr(dacId) && !isEmpty(dacId)) {
|
|
79
|
+
payload.dac_id = dacId;
|
|
80
|
+
payload.fuuid = dacId;
|
|
81
|
+
}
|
|
82
|
+
|
|
72
83
|
return {
|
|
73
84
|
method: 'GET',
|
|
74
85
|
url: ENDPOINT_URL,
|
package/package.json
CHANGED
package/plugins/pbjsGlobals.js
CHANGED
|
@@ -19,7 +19,8 @@ function featureMap(disable = []) {
|
|
|
19
19
|
|
|
20
20
|
function getNpmVersion(version) {
|
|
21
21
|
try {
|
|
22
|
-
|
|
22
|
+
// only use "real" versions (that is, not the -pre ones, they won't be on jsDelivr)
|
|
23
|
+
return /^([\d.]+)$/.exec(version)[1];
|
|
23
24
|
} catch (e) {
|
|
24
25
|
return 'latest';
|
|
25
26
|
}
|
package/src/adloader.js
CHANGED
package/src/prebid.js
CHANGED
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
adUnitsFilter, flatten, getHighestCpm, isArrayOfNums, isGptPubadsDefined, uniques, logInfo,
|
|
6
6
|
contains, logError, isArray, deepClone, deepAccess, isNumber, logWarn, logMessage, isFn,
|
|
7
7
|
transformAdServerTargetingObj, bind, replaceAuctionPrice, replaceClickThrough, insertElement,
|
|
8
|
-
inIframe, callBurl, createInvisibleIframe, generateUUID, unsupportedBidderMessage, isEmpty, mergeDeep
|
|
8
|
+
inIframe, callBurl, createInvisibleIframe, generateUUID, unsupportedBidderMessage, isEmpty, mergeDeep, deepSetValue
|
|
9
9
|
} from './utils.js';
|
|
10
10
|
import { listenMessagesFromCreative } from './secureCreatives.js';
|
|
11
11
|
import { userSync } from './userSync.js';
|
|
@@ -616,6 +616,9 @@ export const startAuction = hook('async', function ({ bidsBackHandler, timeout:
|
|
|
616
616
|
|
|
617
617
|
adUnit.transactionId = generateUUID();
|
|
618
618
|
|
|
619
|
+
// Populate ortb2Imp.ext.tid with transactionId. Specifying a transaction ID per item in the ortb impression array, lets multiple transaction IDs be transmitted in a single bid request.
|
|
620
|
+
deepSetValue(adUnit, 'ortb2Imp.ext.tid', adUnit.transactionId)
|
|
621
|
+
|
|
619
622
|
bidders.forEach(bidder => {
|
|
620
623
|
const adapter = bidderRegistry[bidder];
|
|
621
624
|
const spec = adapter && adapter.getSpec && adapter.getSpec();
|
package/src/storageManager.js
CHANGED
|
@@ -48,7 +48,7 @@ export function newStorageManager({gvlid, moduleName, bidderCode, moduleType} =
|
|
|
48
48
|
let hookDetails = {
|
|
49
49
|
hasEnforcementHook: false
|
|
50
50
|
}
|
|
51
|
-
validateStorageEnforcement(gvlid, bidderCode || moduleName,
|
|
51
|
+
validateStorageEnforcement(gvlid, bidderCode || moduleName, hookDetails, function(result) {
|
|
52
52
|
if (result && result.hasEnforcementHook) {
|
|
53
53
|
value = cb(result);
|
|
54
54
|
} else {
|
|
@@ -303,7 +303,7 @@ export function newStorageManager({gvlid, moduleName, bidderCode, moduleType} =
|
|
|
303
303
|
/**
|
|
304
304
|
* This hook validates the storage enforcement if gdprEnforcement module is included
|
|
305
305
|
*/
|
|
306
|
-
export const validateStorageEnforcement = hook('async', function(gvlid, moduleName,
|
|
306
|
+
export const validateStorageEnforcement = hook('async', function(gvlid, moduleName, hookDetails, callback) {
|
|
307
307
|
callback(hookDetails);
|
|
308
308
|
}, 'validateStorageEnforcement');
|
|
309
309
|
|
|
@@ -322,13 +322,12 @@ export function getCoreStorageManager(moduleName) {
|
|
|
322
322
|
* @param {Number=} gvlid? Vendor id - required for proper GDPR integration
|
|
323
323
|
* @param {string=} bidderCode? - required for bid adapters
|
|
324
324
|
* @param {string=} moduleName? module name
|
|
325
|
-
* @param {string=} moduleType? module type
|
|
326
325
|
*/
|
|
327
|
-
export function getStorageManager({gvlid, moduleName, bidderCode
|
|
326
|
+
export function getStorageManager({gvlid, moduleName, bidderCode} = {}) {
|
|
328
327
|
if (arguments.length > 1 || (arguments.length > 0 && !isPlainObject(arguments[0]))) {
|
|
329
328
|
throw new Error('Invalid invocation for getStorageManager')
|
|
330
329
|
}
|
|
331
|
-
return newStorageManager({gvlid, moduleName, bidderCode
|
|
330
|
+
return newStorageManager({gvlid, moduleName, bidderCode});
|
|
332
331
|
}
|
|
333
332
|
|
|
334
333
|
export function resetData() {
|
|
@@ -387,6 +387,45 @@ describe('33acrossBidAdapter:', function () {
|
|
|
387
387
|
|
|
388
388
|
describe('isBidRequestValid:', function() {
|
|
389
389
|
context('basic validation', function() {
|
|
390
|
+
it('returns true for valid bidder name values', function() {
|
|
391
|
+
const validBidderName = [
|
|
392
|
+
'33across',
|
|
393
|
+
'33across_mgni'
|
|
394
|
+
];
|
|
395
|
+
|
|
396
|
+
validBidderName.forEach((bidderName) => {
|
|
397
|
+
const bid = {
|
|
398
|
+
bidder: bidderName,
|
|
399
|
+
params: {
|
|
400
|
+
siteId: 'sample33xGUID123456789'
|
|
401
|
+
}
|
|
402
|
+
};
|
|
403
|
+
|
|
404
|
+
expect(spec.isBidRequestValid(bid)).to.be.true;
|
|
405
|
+
});
|
|
406
|
+
});
|
|
407
|
+
|
|
408
|
+
it('returns false for invalid bidder name values', function() {
|
|
409
|
+
const invalidBidderName = [
|
|
410
|
+
undefined,
|
|
411
|
+
'33',
|
|
412
|
+
'33x',
|
|
413
|
+
'thirtythree',
|
|
414
|
+
''
|
|
415
|
+
];
|
|
416
|
+
|
|
417
|
+
invalidBidderName.forEach((bidderName) => {
|
|
418
|
+
const bid = {
|
|
419
|
+
bidder: bidderName,
|
|
420
|
+
params: {
|
|
421
|
+
siteId: 'sample33xGUID123456789'
|
|
422
|
+
}
|
|
423
|
+
};
|
|
424
|
+
|
|
425
|
+
expect(spec.isBidRequestValid(bid)).to.be.false;
|
|
426
|
+
});
|
|
427
|
+
});
|
|
428
|
+
|
|
390
429
|
it('returns true for valid guid values', function() {
|
|
391
430
|
// NOTE: We ignore whitespace at the start and end since
|
|
392
431
|
// in our experience these are common typos
|