prebid.js 7.52.0 → 7.54.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/1plusXRtdProvider.js +1 -1
- package/dist/33acrossBidAdapter.js +1 -1
- package/dist/33acrossIdSystem.js +1 -1
- package/dist/adagioBidAdapter.js +1 -1
- package/dist/adbookpspBidAdapter.js +1 -1
- package/dist/adgenerationBidAdapter.js +1 -1
- package/dist/adhashBidAdapter.js +1 -1
- package/dist/adkernelBidAdapter.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/airgridRtdProvider.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/beopBidAdapter.js +1 -1
- package/dist/bidglassBidAdapter.js +1 -1
- package/dist/big-richmediaBidAdapter.js +1 -1
- package/dist/bridgewellBidAdapter.js +1 -1
- package/dist/brightMountainMediaBidAdapter.js +1 -1
- package/dist/carodaBidAdapter.js +1 -1
- package/dist/chtnwBidAdapter.js +1 -1
- package/dist/conceptxBidAdapter.js +1 -0
- 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/dspxBidAdapter.js +1 -1
- package/dist/eplanningBidAdapter.js +1 -1
- package/dist/eskimiBidAdapter.js +1 -1
- package/dist/euidIdSystem.js +1 -0
- package/dist/feedadBidAdapter.js +1 -1
- package/dist/finativeBidAdapter.js +1 -1
- package/dist/freepassIdSystem.js +1 -0
- package/dist/freewheel-sspBidAdapter.js +1 -1
- package/dist/glimpseBidAdapter.js +1 -1
- package/dist/gmosspBidAdapter.js +1 -1
- package/dist/goldbachBidAdapter.js +1 -1
- package/dist/greenbidsAnalyticsAdapter.js +1 -1
- package/dist/greenbidsRtdProvider.js +1 -1
- package/dist/gridBidAdapter.js +1 -1
- package/dist/gumgumBidAdapter.js +1 -1
- package/dist/h12mediaBidAdapter.js +1 -1
- package/dist/hypelabBidAdapter.js +1 -0
- package/dist/id5IdSystem.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/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/kulturemediaBidAdapter.js +1 -1
- package/dist/lassoBidAdapter.js +1 -1
- package/dist/lifestreetBidAdapter.js +1 -1
- package/dist/limelightDigitalBidAdapter.js +1 -1
- package/dist/liveyieldAnalyticsAdapter.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/mediasquareBidAdapter.js +1 -1
- package/dist/mgidBidAdapter.js +1 -1
- package/dist/minutemediaBidAdapter.js +1 -1
- package/dist/minutemediaplusBidAdapter.js +1 -1
- package/dist/nexx360BidAdapter.js +1 -1
- package/dist/not-for-prod/prebid.js +153 -148
- package/dist/oguryBidAdapter.js +1 -1
- package/dist/onetagBidAdapter.js +1 -1
- package/dist/ooloAnalyticsAdapter.js +1 -1
- package/dist/optidigitalBidAdapter.js +1 -1
- package/dist/outbrainBidAdapter.js +1 -1
- package/dist/oxxionRtdProvider.js +1 -1
- package/dist/pairIdSystem.js +1 -1
- package/dist/parrableIdSystem.js +1 -1
- package/dist/pixfutureBidAdapter.js +1 -1
- package/dist/prebid-core.js +1 -1
- package/dist/proxistoreBidAdapter.js +1 -1
- 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/richaudienceBidAdapter.js +1 -1
- package/dist/riseBidAdapter.js +1 -1
- package/dist/rubiconAnalyticsAdapter.js +1 -1
- package/dist/rubiconBidAdapter.js +1 -1
- package/dist/schain.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/sirdataRtdProvider.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/stroeerCoreBidAdapter.js +1 -1
- package/dist/stvBidAdapter.js +1 -1
- package/dist/sublimeBidAdapter.js +1 -1
- package/dist/synacormediaBidAdapter.js +1 -1
- package/dist/targetVideoBidAdapter.js +1 -1
- package/dist/teadsBidAdapter.js +1 -1
- package/dist/topicsFpdModule.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/uid2IdSystem_shared.js +1 -0
- 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/videojsVideoProvider.js +1 -1
- package/dist/viouslyBidAdapter.js +1 -1
- package/dist/visxBidAdapter.js +1 -1
- package/dist/vrtcalBidAdapter.js +1 -1
- package/dist/vuukleBidAdapter.js +1 -1
- package/dist/weboramaRtdProvider.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/zeta_global_sspBidAdapter.js +1 -1
- package/integrationExamples/gpt/userId_example.html +20 -6
- package/modules/.submodules.json +3 -1
- package/modules/1plusXRtdProvider.js +31 -60
- package/modules/adagioBidAdapter.js +86 -24
- package/modules/adhashBidAdapter.js +56 -34
- package/modules/adkernelBidAdapter.js +2 -2
- package/modules/airgridRtdProvider.js +11 -12
- package/modules/asoBidAdapter.js +2 -1
- package/modules/beopBidAdapter.js +6 -0
- package/modules/conceptxBidAdapter.js +70 -0
- package/modules/conceptxBidAdapter.md +36 -0
- package/modules/criteoBidAdapter.js +9 -2
- package/modules/eskimiBidAdapter.js +171 -41
- package/modules/eskimiBidAdapter.md +35 -16
- package/modules/euidIdSystem.js +121 -0
- package/modules/euidIdSystem.md +131 -0
- package/modules/freepassIdSystem.js +61 -0
- package/modules/freepassIdSystem.md +47 -0
- package/modules/greenbidsAnalyticsAdapter.js +1 -1
- package/modules/hypelabBidAdapter.js +153 -0
- package/modules/hypelabBidAdapter.md +38 -0
- package/modules/id5IdSystem.js +3 -5
- package/modules/ixBidAdapter.js +12 -1
- package/modules/limelightDigitalBidAdapter.js +1 -1
- package/modules/logicadBidAdapter.js +14 -1
- package/modules/mediasquareBidAdapter.js +13 -5
- package/modules/nexx360BidAdapter.js +1 -0
- package/modules/oxxionRtdProvider.js +7 -29
- package/modules/pairIdSystem.js +10 -5
- package/modules/proxistoreBidAdapter.js +11 -14
- package/modules/pubmaticAnalyticsAdapter.js +31 -8
- package/modules/richaudienceBidAdapter.js +10 -1
- package/modules/riseBidAdapter.js +1 -1
- package/modules/schain.js +2 -2
- package/modules/sirdataRtdProvider.js +73 -146
- package/modules/sovrnBidAdapter.js +4 -1
- package/modules/stroeerCoreBidAdapter.js +55 -6
- package/modules/teadsBidAdapter.js +0 -1
- package/modules/topicsFpdModule.js +4 -1
- package/modules/uid2IdSystem.js +27 -210
- package/modules/uid2IdSystem.md +104 -23
- package/modules/uid2IdSystem_shared.js +232 -0
- package/modules/userId/eids.js +8 -0
- package/modules/userId/userId.md +2 -1
- package/modules/videojsVideoProvider.js +2 -0
- package/modules/viouslyBidAdapter.js +2 -2
- package/modules/vrtcalBidAdapter.js +5 -0
- package/modules/weboramaRtdProvider.js +25 -95
- package/modules/weboramaRtdProvider.md +4 -4
- package/modules/yieldlabBidAdapter.js +23 -14
- package/modules/zeta_global_sspBidAdapter.js +27 -22
- package/package.json +1 -1
- package/src/adloader.js +1 -0
- package/test/spec/modules/1plusXRtdProvider_spec.js +98 -149
- package/test/spec/modules/adagioBidAdapter_spec.js +46 -17
- package/test/spec/modules/adhashBidAdapter_spec.js +18 -2
- package/test/spec/modules/airgridRtdProvider_spec.js +2 -0
- package/test/spec/modules/beopBidAdapter_spec.js +24 -0
- package/test/spec/modules/conceptxBidAdapter_spec.js +136 -0
- package/test/spec/modules/criteoBidAdapter_spec.js +1 -1
- package/test/spec/modules/eids_spec.js +15 -0
- package/test/spec/modules/eskimiBidAdapter_spec.js +264 -112
- package/test/spec/modules/euidIdSystem_spec.js +130 -0
- package/test/spec/modules/freepassIdSystem_spec.js +186 -0
- package/test/spec/modules/hypelabBidAdapter_spec.js +281 -0
- package/test/spec/modules/id5IdSystem_spec.js +10 -3
- package/test/spec/modules/ixBidAdapter_spec.js +30 -0
- package/test/spec/modules/logicadBidAdapter_spec.js +122 -2
- package/test/spec/modules/mediasquareBidAdapter_spec.js +4 -0
- package/test/spec/modules/oxxionRtdProvider_spec.js +3 -2
- package/test/spec/modules/pubmaticAnalyticsAdapter_spec.js +7 -0
- package/test/spec/modules/richaudienceBidAdapter_spec.js +44 -0
- package/test/spec/modules/schain_spec.js +9 -0
- package/test/spec/modules/sirdataRtdProvider_spec.js +110 -17
- package/test/spec/modules/sovrnBidAdapter_spec.js +13 -0
- package/test/spec/modules/stroeerCoreBidAdapter_spec.js +151 -6
- package/test/spec/modules/teadsBidAdapter_spec.js +7 -0
- package/test/spec/modules/uid2IdSystem_helpers.js +70 -0
- package/test/spec/modules/uid2IdSystem_spec.js +131 -86
- package/test/spec/modules/userId_spec.js +16 -12
- package/test/spec/modules/vrtcalBidAdapter_spec.js +9 -2
- package/test/spec/modules/weboramaRtdProvider_spec.js +331 -205
- package/test/spec/modules/yieldlabBidAdapter_spec.js +42 -2
- package/test/spec/modules/zeta_global_sspBidAdapter_spec.js +200 -4
|
@@ -6,29 +6,48 @@ Maintainer: tech@eskimi.com
|
|
|
6
6
|
|
|
7
7
|
# Description
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
Module that connects to Eskimi demand sources to fetch bids using OpenRTB standard.
|
|
10
|
+
Banner and video formats are supported.
|
|
10
11
|
|
|
11
12
|
# Test Parameters
|
|
12
13
|
```javascript
|
|
13
14
|
var adUnits = [{
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
15
|
+
code: '/19968336/prebid_banner_example_1',
|
|
16
|
+
mediaTypes: {
|
|
17
|
+
banner: {
|
|
18
|
+
sizes: [[ 300, 250 ]],
|
|
19
|
+
... // battr
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
bids: [{
|
|
23
|
+
bidder: 'eskimi',
|
|
24
|
+
params: {
|
|
25
|
+
placementId: 612,
|
|
26
|
+
... // bcat, badv, bapp
|
|
27
|
+
}
|
|
28
|
+
}]
|
|
29
|
+
}, {
|
|
30
|
+
code: '/19968336/prebid_video_example_1',
|
|
31
|
+
mediaTypes: {
|
|
32
|
+
video: {
|
|
33
|
+
context: 'outstream',
|
|
34
|
+
mimes: ['video/mp4'],
|
|
35
|
+
api: [1, 2, 4, 6],
|
|
36
|
+
... // Aditional ORTB video params (including battr)
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
bids: [{
|
|
40
|
+
bidder: 'eskimi',
|
|
41
|
+
params: {
|
|
42
|
+
placementId: 612,
|
|
43
|
+
... // bcat, badv, bapp
|
|
44
|
+
}
|
|
45
|
+
}]
|
|
46
|
+
}];
|
|
29
47
|
```
|
|
30
48
|
|
|
31
49
|
Where:
|
|
32
50
|
|
|
33
51
|
* placementId - Placement ID of the ad unit (required)
|
|
52
|
+
* bcat, badv, bapp, battr - ORTB blocking parameters as specified by OpenRTB 2.5
|
|
34
53
|
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This module adds EUID ID support to the User ID module. It shares significant functionality with the UID2 module.
|
|
3
|
+
* The {@link module:modules/userId} module is required.
|
|
4
|
+
* @module modules/euidIdSystem
|
|
5
|
+
* @requires module:modules/userId
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
import { logInfo, logWarn, deepAccess } from '../src/utils.js';
|
|
9
|
+
import {submodule} from '../src/hook.js';
|
|
10
|
+
import {getStorageManager} from '../src/storageManager.js';
|
|
11
|
+
import {MODULE_TYPE_UID} from '../src/activities/modules.js';
|
|
12
|
+
|
|
13
|
+
// RE below lint exception: UID2 and EUID are separate modules, but the protocol is the same and shared code makes sense here.
|
|
14
|
+
// eslint-disable-next-line prebid/validate-imports
|
|
15
|
+
import { Uid2GetId, Uid2CodeVersion } from './uid2IdSystem_shared.js';
|
|
16
|
+
|
|
17
|
+
const MODULE_NAME = 'euid';
|
|
18
|
+
const MODULE_REVISION = Uid2CodeVersion;
|
|
19
|
+
const PREBID_VERSION = '$prebid.version$';
|
|
20
|
+
const EUID_CLIENT_ID = `PrebidJS-${PREBID_VERSION}-EUIDModule-${MODULE_REVISION}`;
|
|
21
|
+
const GVLID_TTD = 21; // The Trade Desk
|
|
22
|
+
const LOG_PRE_FIX = 'EUID: ';
|
|
23
|
+
const ADVERTISING_COOKIE = '__euid_advertising_token';
|
|
24
|
+
|
|
25
|
+
// eslint-disable-next-line no-unused-vars
|
|
26
|
+
const EUID_TEST_URL = 'https://integ.euid.eu';
|
|
27
|
+
const EUID_PROD_URL = 'https://prod.euid.eu';
|
|
28
|
+
const EUID_BASE_URL = EUID_PROD_URL;
|
|
29
|
+
|
|
30
|
+
function createLogger(logger, prefix) {
|
|
31
|
+
return function (...strings) {
|
|
32
|
+
logger(prefix + ' ', ...strings);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
const _logInfo = createLogger(logInfo, LOG_PRE_FIX);
|
|
36
|
+
const _logWarn = createLogger(logWarn, LOG_PRE_FIX);
|
|
37
|
+
|
|
38
|
+
export const storage = getStorageManager({moduleType: MODULE_TYPE_UID, moduleName: MODULE_NAME});
|
|
39
|
+
|
|
40
|
+
function hasWriteToDeviceConsent(consentData) {
|
|
41
|
+
const gdprApplies = consentData?.gdprApplies === true;
|
|
42
|
+
const localStorageConsent = deepAccess(consentData, `vendorData.purpose.consents.1`)
|
|
43
|
+
const prebidVendorConsent = deepAccess(consentData, `vendorData.vendor.consents.${GVLID_TTD.toString()}`)
|
|
44
|
+
if (gdprApplies && (!localStorageConsent || !prebidVendorConsent)) {
|
|
45
|
+
return false;
|
|
46
|
+
}
|
|
47
|
+
return true;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/** @type {Submodule} */
|
|
51
|
+
export const euidIdSubmodule = {
|
|
52
|
+
/**
|
|
53
|
+
* used to link submodule with config
|
|
54
|
+
* @type {string}
|
|
55
|
+
*/
|
|
56
|
+
name: MODULE_NAME,
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* Vendor id of The Trade Desk
|
|
60
|
+
* @type {Number}
|
|
61
|
+
*/
|
|
62
|
+
gvlid: GVLID_TTD,
|
|
63
|
+
/**
|
|
64
|
+
* decode the stored id value for passing to bid requests
|
|
65
|
+
* @function
|
|
66
|
+
* @param {string} value
|
|
67
|
+
* @returns {{euid:{ id: string } }} or undefined if value doesn't exists
|
|
68
|
+
*/
|
|
69
|
+
decode(value) {
|
|
70
|
+
const result = decodeImpl(value);
|
|
71
|
+
_logInfo('EUID decode returned', result);
|
|
72
|
+
return result;
|
|
73
|
+
},
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* performs action to obtain id and return a value.
|
|
77
|
+
* @function
|
|
78
|
+
* @param {SubmoduleConfig} [configparams]
|
|
79
|
+
* @param {ConsentData|undefined} consentData
|
|
80
|
+
* @returns {euidId}
|
|
81
|
+
*/
|
|
82
|
+
getId(config, consentData) {
|
|
83
|
+
if (consentData?.gdprApplies !== true) {
|
|
84
|
+
logWarn('EUID is intended for use within the EU. The module will not run when GDPR does not apply.');
|
|
85
|
+
return;
|
|
86
|
+
}
|
|
87
|
+
if (!hasWriteToDeviceConsent(consentData)) {
|
|
88
|
+
// The module cannot operate without this permission.
|
|
89
|
+
_logWarn(`Unable to use EUID module due to insufficient consent. The EUID module requires storage permission.`)
|
|
90
|
+
return;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
const mappedConfig = {
|
|
94
|
+
apiBaseUrl: config?.params?.euidApiBase ?? EUID_BASE_URL,
|
|
95
|
+
paramToken: config?.params?.euidToken,
|
|
96
|
+
serverCookieName: config?.params?.euidCookie,
|
|
97
|
+
storage: config?.params?.storage ?? 'localStorage',
|
|
98
|
+
clientId: EUID_CLIENT_ID,
|
|
99
|
+
internalStorage: ADVERTISING_COOKIE
|
|
100
|
+
};
|
|
101
|
+
|
|
102
|
+
const result = Uid2GetId(mappedConfig, storage, _logInfo, _logWarn);
|
|
103
|
+
_logInfo(`EUID getId returned`, result);
|
|
104
|
+
return result;
|
|
105
|
+
},
|
|
106
|
+
};
|
|
107
|
+
|
|
108
|
+
function decodeImpl(value) {
|
|
109
|
+
if (typeof value === 'string') {
|
|
110
|
+
_logInfo('Found server-only token. Refresh is unavailable for this token.');
|
|
111
|
+
const result = { euid: { id: value } };
|
|
112
|
+
return result;
|
|
113
|
+
}
|
|
114
|
+
if (Date.now() < value.latestToken.identity_expires) {
|
|
115
|
+
return { euid: { id: value.latestToken.advertising_token } };
|
|
116
|
+
}
|
|
117
|
+
return null;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
// Register submodule for userId
|
|
121
|
+
submodule('userId', euidIdSubmodule);
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
## EUID User ID Submodule
|
|
2
|
+
|
|
3
|
+
EUID requires initial tokens to be generated server-side. The EUID module handles storing, providing, and optionally refreshing them. The module can operate in one of two different modes: *Client Refresh* mode or *Server Only* mode.
|
|
4
|
+
|
|
5
|
+
*Server Only* mode was originally referred to as *legacy mode*, but it is a popular mode for new integrations where publishers prefer to handle token refresh server-side.
|
|
6
|
+
|
|
7
|
+
## Client Refresh mode
|
|
8
|
+
|
|
9
|
+
This is the recommended mode for most scenarios. In this mode, the full response body from the EUID Token Generate or Token Refresh endpoint must be provided to the module. As long as the refresh token remains valid, the module will refresh the advertising token as needed.
|
|
10
|
+
|
|
11
|
+
To configure the module to use this mode, you must **either**:
|
|
12
|
+
1. Set `params.euidCookie` to the name of the cookie which contains the response body as a JSON string, **or**
|
|
13
|
+
2. Set `params.euidToken` to the response body as a JavaScript object.
|
|
14
|
+
|
|
15
|
+
### Client refresh cookie example
|
|
16
|
+
|
|
17
|
+
In this example, the cookie is called `euid_pub_cookie`.
|
|
18
|
+
|
|
19
|
+
Cookie:
|
|
20
|
+
```
|
|
21
|
+
euid_pub_cookie={"advertising_token":"...advertising token...","refresh_token":"...refresh token...","identity_expires":1684741472161,"refresh_from":1684741425653,"refresh_expires":1684784643668,"refresh_response_key":"...response key..."}
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
Configuration:
|
|
25
|
+
```
|
|
26
|
+
pbjs.setConfig({
|
|
27
|
+
userSync: {
|
|
28
|
+
userIds: [{
|
|
29
|
+
name: 'euid',
|
|
30
|
+
params: {
|
|
31
|
+
euidCookie: 'euid_pub_cookie'
|
|
32
|
+
}
|
|
33
|
+
}]
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
### Client refresh euidToken example
|
|
39
|
+
|
|
40
|
+
Configuration:
|
|
41
|
+
```
|
|
42
|
+
pbjs.setConfig({
|
|
43
|
+
userSync: {
|
|
44
|
+
userIds: [{
|
|
45
|
+
name: 'euid',
|
|
46
|
+
params: {
|
|
47
|
+
euidToken: {
|
|
48
|
+
'advertising_token': '...advertising token...',
|
|
49
|
+
'refresh_token': '...refresh token...',
|
|
50
|
+
// etc. - see the Sample Token below for contents of this object
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}]
|
|
54
|
+
}
|
|
55
|
+
});
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
## Server-Only Mode
|
|
59
|
+
|
|
60
|
+
In this mode, only the advertising token is provided to the module. The module will not be able to refresh the token. The publisher is responsible for implementing some other way to refresh the token.
|
|
61
|
+
|
|
62
|
+
To configure the module to use this mode, you must **either**:
|
|
63
|
+
1. Set a cookie named `__euid_advertising_token` to the advertising token, **or**
|
|
64
|
+
2. Set `value` to an ID block containing the advertising token.
|
|
65
|
+
|
|
66
|
+
### Server only cookie example
|
|
67
|
+
|
|
68
|
+
Cookie:
|
|
69
|
+
```
|
|
70
|
+
__euid_advertising_token=...advertising token...
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
Configuration:
|
|
74
|
+
```
|
|
75
|
+
pbjs.setConfig({
|
|
76
|
+
userSync: {
|
|
77
|
+
userIds: [{
|
|
78
|
+
name: 'euid'
|
|
79
|
+
}]
|
|
80
|
+
}
|
|
81
|
+
});
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
### Server only value example
|
|
85
|
+
|
|
86
|
+
Configuration:
|
|
87
|
+
```
|
|
88
|
+
pbjs.setConfig({
|
|
89
|
+
userSync: {
|
|
90
|
+
userIds: [{
|
|
91
|
+
name: 'euid'
|
|
92
|
+
value: {
|
|
93
|
+
'euid': {
|
|
94
|
+
'id': '...advertising token...'
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
}]
|
|
98
|
+
}
|
|
99
|
+
});
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
## Storage
|
|
103
|
+
|
|
104
|
+
The module stores a number of internal values. By default, all values are stored in HTML5 local storage. You can switch to cookie storage by setting `params.storage` to `cookie`. The cookie size can be significant and this is not recommended, but is provided as an option if local storage is not an option.
|
|
105
|
+
|
|
106
|
+
## Sample token
|
|
107
|
+
|
|
108
|
+
`{`<br /> `"advertising_token": "...",`<br /> `"refresh_token": "...",`<br /> `"identity_expires": 1633643601000,`<br /> `"refresh_from": 1633643001000,`<br /> `"refresh_expires": 1636322000000,`<br /> `"refresh_response_key": "wR5t6HKMfJ2r4J7fEGX9Gw=="`<br />`}`
|
|
109
|
+
|
|
110
|
+
### Notes
|
|
111
|
+
|
|
112
|
+
If you are trying to limit the size of cookies, provide the token in configuration and use the default option of local storage.
|
|
113
|
+
|
|
114
|
+
If you provide an expired identity and the module has a valid identity which was refreshed from the identity you provide, it will use the refreshed identity. The module stores the original token used for refreshing the token, and it will use the refreshed tokens as long as the original token matches the one supplied.
|
|
115
|
+
|
|
116
|
+
If a new token is supplied which does not match the original token used to generate any refreshed tokens, all stored tokens will be discarded and the new token used instead (refreshed if necessary).
|
|
117
|
+
|
|
118
|
+
You can set `params.euidApiBase` to `"https://integ.euid.eu"` during integration testing. Be aware that you must use the same environment (production or integration) here as you use for generating tokens.
|
|
119
|
+
|
|
120
|
+
## Parameter Descriptions for the `usersync` Configuration Section
|
|
121
|
+
|
|
122
|
+
The below parameters apply only to the EUID User ID Module integration.
|
|
123
|
+
|
|
124
|
+
| Param under userSync.userIds[] | Scope | Type | Description | Example |
|
|
125
|
+
| --- | --- | --- | --- | --- |
|
|
126
|
+
| name | Required | String | ID value for the EUID module - `"euid"` | `"euid"` |
|
|
127
|
+
| value | Optional, Server only | Object | An object containing the value for the advertising token. | See the example above. |
|
|
128
|
+
| params.euidToken | Optional, Client refresh | Object | The initial EUID token. This should be `body` element of the decrypted response from a call to the `/token/generate` or `/token/refresh` endpoint. | See the sample token above. |
|
|
129
|
+
| params.euidCookie | Optional, Client refresh | String | The name of a cookie which holds the initial EUID token, set by the server. The cookie should contain JSON in the same format as the euidToken param. **If euidToken is supplied, this param is ignored.** | See the sample token above. |
|
|
130
|
+
| params.euidApiBase | Optional, Client refresh | String | Overrides the default EUID API endpoint. | `"https://prod.euid.eu"` _(default)_|
|
|
131
|
+
| params.storage | Optional, Client refresh | String | Specify whether to use `cookie` or `localStorage` for module-internal storage. It is recommended to not provide this and allow the module to use the default. | `localStorage` _(default)_ |
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { submodule } from '../src/hook.js';
|
|
2
|
+
import {generateUUID, logMessage} from '../src/utils.js';
|
|
3
|
+
|
|
4
|
+
const MODULE_NAME = 'freepassId';
|
|
5
|
+
|
|
6
|
+
export const freepassIdSubmodule = {
|
|
7
|
+
name: MODULE_NAME,
|
|
8
|
+
decode: function (value, config) {
|
|
9
|
+
logMessage('Decoding FreePass ID: ', value);
|
|
10
|
+
|
|
11
|
+
return { [MODULE_NAME]: value };
|
|
12
|
+
},
|
|
13
|
+
|
|
14
|
+
getId: function (config, consent, cachedIdObject) {
|
|
15
|
+
logMessage('Getting FreePass ID using config: ' + JSON.stringify(config));
|
|
16
|
+
|
|
17
|
+
const freepassData = config.params !== undefined ? (config.params.freepassData || {}) : {}
|
|
18
|
+
let idObject = {userId: generateUUID()};
|
|
19
|
+
|
|
20
|
+
if (freepassData.commonId !== undefined) {
|
|
21
|
+
idObject.commonId = config.params.freepassData.commonId;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
if (freepassData.userIp !== undefined) {
|
|
25
|
+
idObject.userIp = config.params.freepassData.userIp;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
return {id: idObject};
|
|
29
|
+
},
|
|
30
|
+
|
|
31
|
+
extendId: function (config, consent, cachedIdObject) {
|
|
32
|
+
let freepassData = config.params.freepassData;
|
|
33
|
+
let hasFreepassData = freepassData !== undefined;
|
|
34
|
+
if (!hasFreepassData) {
|
|
35
|
+
logMessage('No Freepass Data. CachedIdObject will not be extended: ' + JSON.stringify(cachedIdObject));
|
|
36
|
+
return {
|
|
37
|
+
id: cachedIdObject
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
if (freepassData.commonId === cachedIdObject.commonId && freepassData.userIp === cachedIdObject.userIp) {
|
|
42
|
+
logMessage('FreePass ID is already up-to-date: ' + JSON.stringify(cachedIdObject));
|
|
43
|
+
return {
|
|
44
|
+
id: cachedIdObject
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
logMessage('Extending FreePass ID object: ' + JSON.stringify(cachedIdObject));
|
|
49
|
+
logMessage('Extending FreePass ID using config: ' + JSON.stringify(config));
|
|
50
|
+
|
|
51
|
+
return {
|
|
52
|
+
id: {
|
|
53
|
+
commonId: freepassData.commonId,
|
|
54
|
+
userIp: freepassData.userIp,
|
|
55
|
+
userId: cachedIdObject.userId,
|
|
56
|
+
},
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
submodule('userId', freepassIdSubmodule);
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
## FreePass User ID Submodule
|
|
2
|
+
|
|
3
|
+
[FreePass](https://freepass-login.com/introduction.html) is a common authentication service operated by Freebit Co., Ltd. Users with a FreePass account do not need to create a new account to use partner services.
|
|
4
|
+
|
|
5
|
+
# General Information
|
|
6
|
+
|
|
7
|
+
Please contact FreePass before using this ID.
|
|
8
|
+
|
|
9
|
+
```
|
|
10
|
+
Module Name: FreePass Id System
|
|
11
|
+
Module Type: User Id System
|
|
12
|
+
Maintainer: freepass-headerbidding@craid-inc.com
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Building Prebid with FreePass ID Support
|
|
16
|
+
|
|
17
|
+
First, make sure to add the FreePass ID submodule to your Prebid.js package with:
|
|
18
|
+
|
|
19
|
+
```shell
|
|
20
|
+
gulp build --modules=freepassIdSystem,userId
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
The following configuration parameters are available:
|
|
24
|
+
|
|
25
|
+
```javascript
|
|
26
|
+
pbjs.setConfig({
|
|
27
|
+
userSync: {
|
|
28
|
+
userIds: [{
|
|
29
|
+
name: 'freepassId',
|
|
30
|
+
params: {
|
|
31
|
+
freepassData: {
|
|
32
|
+
commonId: 'fpcommonid123',
|
|
33
|
+
userIp: '127.0.0.1'
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}]
|
|
37
|
+
}
|
|
38
|
+
});
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
| Param under userSync.userIds[] | Scope | Type | Description | Example |
|
|
42
|
+
|--------------------------------|----------|--------|------------------------------------------------------|----------------|
|
|
43
|
+
| name | Required | String | The name of this module | `"freepassId"` |
|
|
44
|
+
| freepassData | Optional | Object | FreePass data | `{}` |
|
|
45
|
+
| freepassData.commonId | Optional | String | Common ID obtained from FreePass | `"abcd1234"` |
|
|
46
|
+
| freepassData.userIp | Optional | String | User IP obtained in cooperation with partner service | `"127.0.0.1"` |
|
|
47
|
+
|
|
@@ -8,7 +8,7 @@ const analyticsType = 'endpoint';
|
|
|
8
8
|
|
|
9
9
|
export const ANALYTICS_VERSION = '1.0.0';
|
|
10
10
|
|
|
11
|
-
const ANALYTICS_SERVER = 'https://
|
|
11
|
+
const ANALYTICS_SERVER = 'https://a.greenbids.ai';
|
|
12
12
|
|
|
13
13
|
const {
|
|
14
14
|
EVENTS: {
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
import { registerBidder } from '../src/adapters/bidderFactory.js';
|
|
2
|
+
import { BANNER } from '../src/mediaTypes.js';
|
|
3
|
+
import { generateUUID } from '../src/utils.js';
|
|
4
|
+
import { ajax } from '../src/ajax.js';
|
|
5
|
+
|
|
6
|
+
export const BIDDER_CODE = 'hypelab';
|
|
7
|
+
export const ENDPOINT_URL = 'https://api.hypelab.com';
|
|
8
|
+
|
|
9
|
+
export const REQUEST_ROUTE = '/v1/prebid_requests';
|
|
10
|
+
export const EVENT_ROUTE = '/v1/events';
|
|
11
|
+
export const REPORTING_ROUTE = '';
|
|
12
|
+
|
|
13
|
+
const PREBID_VERSION = '$prebid.version$';
|
|
14
|
+
const PROVIDER_NAME = 'prebid';
|
|
15
|
+
const PROVIDER_VERSION = '0.0.1';
|
|
16
|
+
|
|
17
|
+
const url = (route) => ENDPOINT_URL + route;
|
|
18
|
+
|
|
19
|
+
export function mediaSize(data) {
|
|
20
|
+
if (!data || !data.creative_set) return { width: 0, height: 0 };
|
|
21
|
+
const media = data.creative_set.video || data.creative_set.image || {};
|
|
22
|
+
return { width: media.width, height: media.height };
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
function isBidRequestValid(bidderRequest) {
|
|
26
|
+
return (
|
|
27
|
+
!!bidderRequest.params?.property_slug &&
|
|
28
|
+
!!bidderRequest.params?.placement_slug
|
|
29
|
+
);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
function buildRequests(validBidRequests, bidderRequest) {
|
|
33
|
+
const result = validBidRequests.map((request) => {
|
|
34
|
+
const uids = (request.userIdAsEids || []).reduce((a, c) => {
|
|
35
|
+
const ids = c.uids.map((uid) => uid.id);
|
|
36
|
+
return [...a, ...ids];
|
|
37
|
+
}, []);
|
|
38
|
+
|
|
39
|
+
const uuid = uids[0] ? uids[0] : generateTemporaryUUID();
|
|
40
|
+
|
|
41
|
+
const payload = {
|
|
42
|
+
property_slug: request.params.property_slug,
|
|
43
|
+
placement_slug: request.params.placement_slug,
|
|
44
|
+
provider_version: PROVIDER_VERSION,
|
|
45
|
+
provider_name: PROVIDER_NAME,
|
|
46
|
+
referrer:
|
|
47
|
+
bidderRequest.refererInfo?.page || typeof window != 'undefined'
|
|
48
|
+
? window.location.href
|
|
49
|
+
: '',
|
|
50
|
+
sdk_version: PREBID_VERSION,
|
|
51
|
+
sizes: request.sizes,
|
|
52
|
+
wids: [],
|
|
53
|
+
uuid,
|
|
54
|
+
bidRequestsCount: request.bidRequestsCount,
|
|
55
|
+
bidderRequestsCount: request.bidderRequestsCount,
|
|
56
|
+
bidderWinsCount: request.bidderWinsCount,
|
|
57
|
+
wp: {
|
|
58
|
+
ada: typeof window != 'undefined' && !!window.cardano,
|
|
59
|
+
bnb: typeof window != 'undefined' && !!window.BinanceChain,
|
|
60
|
+
eth: typeof window != 'undefined' && !!window.ethereum,
|
|
61
|
+
sol: typeof window != 'undefined' && !!window.solana,
|
|
62
|
+
tron: typeof window != 'undefined' && !!window.tron,
|
|
63
|
+
},
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
return {
|
|
67
|
+
method: 'POST',
|
|
68
|
+
url: url(REQUEST_ROUTE),
|
|
69
|
+
options: { contentType: 'application/json', withCredentials: false },
|
|
70
|
+
data: payload,
|
|
71
|
+
bidId: request.bidId,
|
|
72
|
+
};
|
|
73
|
+
});
|
|
74
|
+
|
|
75
|
+
return result;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
function generateTemporaryUUID() {
|
|
79
|
+
return 'tmp_' + generateUUID();
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
function interpretResponse(serverResponse, bidRequest) {
|
|
83
|
+
const { data } = serverResponse.body;
|
|
84
|
+
|
|
85
|
+
if (!data.cpm || !data.html) return [];
|
|
86
|
+
|
|
87
|
+
const size = mediaSize(data);
|
|
88
|
+
|
|
89
|
+
const result = {
|
|
90
|
+
requestId: bidRequest.bidId,
|
|
91
|
+
cpm: data.cpm,
|
|
92
|
+
width: size.width,
|
|
93
|
+
height: size.height,
|
|
94
|
+
creativeId: data.creative_set_slug,
|
|
95
|
+
currency: data.currency,
|
|
96
|
+
netRevenue: true,
|
|
97
|
+
referrer: bidRequest.data.referrer,
|
|
98
|
+
ttl: data.ttl,
|
|
99
|
+
ad: data.html,
|
|
100
|
+
mediaType: serverResponse.body.data.media_type,
|
|
101
|
+
meta: {
|
|
102
|
+
advertiserDomains: data.advertiserDomains || [],
|
|
103
|
+
},
|
|
104
|
+
};
|
|
105
|
+
|
|
106
|
+
return [result];
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
export function report(eventType, data, route = REPORTING_ROUTE) {
|
|
110
|
+
if (!route) return;
|
|
111
|
+
|
|
112
|
+
const options = {
|
|
113
|
+
method: 'POST',
|
|
114
|
+
contentType: 'application/json',
|
|
115
|
+
withCredentials: true,
|
|
116
|
+
};
|
|
117
|
+
|
|
118
|
+
const request = { type: eventType, data };
|
|
119
|
+
ajax(url(route), null, request, options);
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
function onTimeout(timeoutData) {
|
|
123
|
+
this.report('timeout', timeoutData);
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
function onBidWon(bid) {
|
|
127
|
+
this.report('bidWon', bid);
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
function onSetTargeting(bid) {
|
|
131
|
+
this.report('setTargeting', bid);
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
function onBidderError(errorData) {
|
|
135
|
+
this.report('bidderError', errorData);
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
export const spec = {
|
|
139
|
+
code: BIDDER_CODE,
|
|
140
|
+
supportedMediaTypes: [BANNER],
|
|
141
|
+
aliases: ['hype'],
|
|
142
|
+
isBidRequestValid,
|
|
143
|
+
buildRequests,
|
|
144
|
+
interpretResponse,
|
|
145
|
+
onTimeout,
|
|
146
|
+
onBidWon,
|
|
147
|
+
onSetTargeting,
|
|
148
|
+
onBidderError,
|
|
149
|
+
report,
|
|
150
|
+
REPORTING_ROUTE: 'a',
|
|
151
|
+
};
|
|
152
|
+
|
|
153
|
+
registerBidder(spec);
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# Overview
|
|
2
|
+
|
|
3
|
+
```
|
|
4
|
+
Module Name: HypeLab Bid Adapter
|
|
5
|
+
Module Type: Bidder Adapter
|
|
6
|
+
Maintainer: sdk@hypelab.com
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
# Description
|
|
10
|
+
|
|
11
|
+
Prebid.JS adapter that connects to HypeLab ad network for bids.
|
|
12
|
+
*NOTE*: The HypeLab Adapter requires setup and approval before use. Please reach out to `partnerships@hypelab.com` for more details. To get started, replace the `property_slug` with your property_slug and the `placement_slug` with your placement slug to receive bids. The placement slug will depend on the required size and can be set via the HypeLab interface.
|
|
13
|
+
|
|
14
|
+
# Test Parameters
|
|
15
|
+
|
|
16
|
+
## Sample Banner Ad Unit
|
|
17
|
+
|
|
18
|
+
```js
|
|
19
|
+
var adUnits = [
|
|
20
|
+
{
|
|
21
|
+
code: 'banner-div',
|
|
22
|
+
mediaTypes: {
|
|
23
|
+
banner: {
|
|
24
|
+
sizes: [[728, 90]],
|
|
25
|
+
},
|
|
26
|
+
},
|
|
27
|
+
bids: [
|
|
28
|
+
{
|
|
29
|
+
bidder: 'hypelab',
|
|
30
|
+
params: {
|
|
31
|
+
property_slug: 'prebid',
|
|
32
|
+
placement_slug: 'test_placement'
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
]
|
|
36
|
+
}
|
|
37
|
+
]
|
|
38
|
+
```
|
package/modules/id5IdSystem.js
CHANGED
|
@@ -60,11 +60,11 @@ export const id5IdSubmodule = {
|
|
|
60
60
|
*/
|
|
61
61
|
decode(value, config) {
|
|
62
62
|
let universalUid;
|
|
63
|
-
let
|
|
63
|
+
let ext = {};
|
|
64
64
|
|
|
65
65
|
if (value && typeof value.universal_uid === 'string') {
|
|
66
66
|
universalUid = value.universal_uid;
|
|
67
|
-
|
|
67
|
+
ext = value.ext || ext;
|
|
68
68
|
} else {
|
|
69
69
|
return undefined;
|
|
70
70
|
}
|
|
@@ -72,9 +72,7 @@ export const id5IdSubmodule = {
|
|
|
72
72
|
let responseObj = {
|
|
73
73
|
id5id: {
|
|
74
74
|
uid: universalUid,
|
|
75
|
-
ext:
|
|
76
|
-
linkType: linkType
|
|
77
|
-
}
|
|
75
|
+
ext: ext
|
|
78
76
|
}
|
|
79
77
|
};
|
|
80
78
|
|
package/modules/ixBidAdapter.js
CHANGED
|
@@ -96,7 +96,7 @@ const VIDEO_PARAMS_ALLOW_LIST = [
|
|
|
96
96
|
'skipafter', 'sequence', 'battr', 'maxextended', 'minbitrate',
|
|
97
97
|
'maxbitrate', 'boxingallowed', 'playbackmethod', 'playbackend',
|
|
98
98
|
'delivery', 'pos', 'companionad', 'api', 'companiontype', 'ext',
|
|
99
|
-
'playerSize', 'w', 'h'
|
|
99
|
+
'playerSize', 'w', 'h', 'plcmt'
|
|
100
100
|
];
|
|
101
101
|
const LOCAL_STORAGE_KEY = 'ixdiag';
|
|
102
102
|
export const LOCAL_STORAGE_FEATURE_TOGGLES_KEY = `${BIDDER_CODE}_features`;
|
|
@@ -216,6 +216,8 @@ function bidToVideoImp(bid) {
|
|
|
216
216
|
|
|
217
217
|
const context = (videoParamRef && videoParamRef.context) || (videoAdUnitRef && videoAdUnitRef.context);
|
|
218
218
|
|
|
219
|
+
verifyVideoPlcmt(imp);
|
|
220
|
+
|
|
219
221
|
// if placement not already defined, pick one based on `context`
|
|
220
222
|
if (context && !imp.video.hasOwnProperty('placement')) {
|
|
221
223
|
if (context === INSTREAM) {
|
|
@@ -249,6 +251,15 @@ function bidToVideoImp(bid) {
|
|
|
249
251
|
return imp;
|
|
250
252
|
}
|
|
251
253
|
|
|
254
|
+
function verifyVideoPlcmt(imp) {
|
|
255
|
+
if (imp.video.hasOwnProperty('plcmt') && (!isInteger(imp.video.plcmt) || (imp.video.plcmt < 1 || imp.video.plcmt > 4))) {
|
|
256
|
+
logWarn(
|
|
257
|
+
`IX Bid Adapter: video.plcmt [${imp.video.plcmt}] must be an integer between 1-4 inclusive`
|
|
258
|
+
);
|
|
259
|
+
delete imp.video.plcmt;
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
|
|
252
263
|
/**
|
|
253
264
|
* Transform valid bid request config object to native impression object that will be sent to ad server.
|
|
254
265
|
*
|