prebid.js 7.22.0 → 7.24.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/aaxBlockmeterRtdProvider.js +1 -0
- package/dist/adagioBidAdapter.js +1 -1
- package/dist/adbookpspBidAdapter.js +1 -1
- package/dist/adgenerationBidAdapter.js +1 -1
- package/dist/admaticBidAdapter.js +1 -0
- 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/analyticsAdapter.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/bidViewability.js +1 -1
- package/dist/bidViewabilityIO.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/browsiRtdProvider.js +1 -1
- package/dist/carodaBidAdapter.js +1 -1
- package/dist/chtnwBidAdapter.js +1 -0
- package/dist/cleanioRtdProvider.js +1 -1
- package/dist/concertBidAdapter.js +1 -1
- package/dist/connectIdSystem.js +1 -1
- package/dist/connectadBidAdapter.js +1 -1
- package/dist/consentManagement.js +1 -1
- package/dist/consentManagementUsp.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/dependencies.json +19 -0
- package/dist/dfpAdServerVideo.js +1 -1
- package/dist/dgkeywordRtdProvider.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/googleAnalyticsAdapter.js +1 -1
- package/dist/gridBidAdapter.js +1 -1
- package/dist/gridNMBidAdapter.js +1 -1
- package/dist/growthCodeIdSystem.js +1 -1
- package/dist/gumgumBidAdapter.js +1 -1
- package/dist/h12mediaBidAdapter.js +1 -1
- package/dist/id5AnalyticsAdapter.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/instreamTracking.js +1 -1
- package/dist/ixBidAdapter.js +1 -1
- package/dist/jixieBidAdapter.js +1 -1
- package/dist/justpremiumBidAdapter.js +1 -1
- package/dist/jwplayerVideoProvider.js +1 -0
- package/dist/kargoBidAdapter.js +1 -1
- package/dist/konduitAnalyticsAdapter.js +1 -1
- package/dist/kueezBidAdapter.js +1 -1
- package/dist/kueezRtbBidAdapter.js +1 -0
- 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/magniteAnalyticsAdapter.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/mgidRtdProvider.js +1 -0
- package/dist/minutemediaBidAdapter.js +1 -1
- package/dist/multibid.js +1 -1
- package/dist/not-for-prod/prebid.js +153 -141
- package/dist/oguryBidAdapter.js +1 -1
- package/dist/onetagBidAdapter.js +1 -1
- package/dist/ooloAnalyticsAdapter.js +1 -1
- package/dist/openxOrtbBidAdapter.js +1 -1
- package/dist/ortbConverter.js +1 -0
- package/dist/outbrainBidAdapter.js +1 -1
- package/dist/oxxionRtdProvider.js +1 -0
- package/dist/parrableIdSystem.js +1 -1
- package/dist/pbsExtensions.js +1 -0
- package/dist/permutiveRtdProvider.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/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/rtdModule.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/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/spotxBidAdapter.js +1 -1
- package/dist/sspBCBidAdapter.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/teadsIdSystem.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/video.js +1 -0
- package/dist/videoModule.js +1 -0
- package/dist/videobyteBidAdapter.js +1 -1
- package/dist/videojsVideoProvider.js +1 -0
- 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/mgidRtdProvider_example.html +143 -0
- package/integrationExamples/videoModule/jwplayer/bidMarkedAsUsed.html +98 -0
- package/integrationExamples/videoModule/jwplayer/bidRequestScheduling.html +89 -0
- package/integrationExamples/videoModule/jwplayer/eventListeners.html +244 -0
- package/integrationExamples/videoModule/jwplayer/gamAdServerMediation.html +122 -0
- package/integrationExamples/videoModule/jwplayer/mediaMetadata.html +80 -0
- package/integrationExamples/videoModule/jwplayer/playlist.html +122 -0
- package/integrationExamples/videoModule/videojs/bidMarkedAsUsed.html +126 -0
- package/integrationExamples/videoModule/videojs/bidRequestScheduling.html +132 -0
- package/integrationExamples/videoModule/videojs/eventListeners.html +238 -0
- package/integrationExamples/videoModule/videojs/gamAdServerMediation.html +138 -0
- package/integrationExamples/videoModule/videojs/mediaMetadata.html +103 -0
- package/integrationExamples/videoModule/videojs/playlist.html +151 -0
- package/libraries/ortbConverter/README.md +378 -0
- package/libraries/ortbConverter/converter.js +135 -0
- package/libraries/ortbConverter/lib/composer.js +43 -0
- package/libraries/ortbConverter/lib/mergeProcessors.js +9 -0
- package/libraries/ortbConverter/lib/sizes.js +14 -0
- package/libraries/ortbConverter/processors/banner.js +40 -0
- package/libraries/ortbConverter/processors/default.js +167 -0
- package/libraries/ortbConverter/processors/mediaType.js +21 -0
- package/libraries/ortbConverter/processors/native.js +37 -0
- package/libraries/ortbConverter/processors/video.js +66 -0
- package/libraries/pbsExtensions/pbsExtensions.js +12 -0
- package/libraries/pbsExtensions/processors/aliases.js +17 -0
- package/libraries/pbsExtensions/processors/mediaType.js +23 -0
- package/libraries/pbsExtensions/processors/params.js +22 -0
- package/libraries/pbsExtensions/processors/pbs.js +99 -0
- package/libraries/pbsExtensions/processors/requestExtPrebid.js +30 -0
- package/libraries/pbsExtensions/processors/video.js +23 -0
- package/libraries/video/constants/enums.js +5 -0
- package/libraries/video/constants/events.js +97 -0
- package/libraries/video/constants/ortb.js +169 -0
- package/libraries/video/constants/vendorCodes.js +6 -0
- package/libraries/video/shared/eventHandler.js +18 -0
- package/libraries/video/shared/parentModule.js +82 -0
- package/libraries/video/shared/state.js +47 -0
- package/libraries/video/shared/vastXmlBuilder.js +77 -0
- package/libraries/video/shared/vastXmlEditor.js +115 -0
- package/modules/.submodules.json +7 -1
- package/modules/aaxBlockmeterRtdProvider.js +59 -0
- package/modules/aaxBlockmeterRtdProvider.md +48 -0
- package/modules/admaticBidAdapter.js +147 -0
- package/modules/admaticBidAdapter.md +48 -0
- package/modules/amxBidAdapter.js +1 -0
- package/modules/appnexusBidAdapter.js +38 -1
- package/modules/chtnwBidAdapter.js +110 -0
- package/modules/chtnwBidAdapter.md +31 -0
- package/modules/concertBidAdapter.js +44 -2
- package/modules/connectIdSystem.js +36 -23
- package/modules/connectIdSystem.md +3 -2
- package/modules/consentManagement.js +22 -1
- package/modules/consentManagementUsp.js +29 -7
- package/modules/criteoBidAdapter.js +25 -5
- package/modules/currency.js +9 -0
- package/modules/dgkeywordRtdProvider.js +3 -3
- package/modules/gridNMBidAdapter.js +10 -14
- package/modules/growthCodeIdSystem.js +9 -5
- package/modules/gumgumBidAdapter.js +4 -0
- package/modules/improvedigitalBidAdapter.js +191 -470
- package/modules/ixBidAdapter.js +54 -71
- package/modules/jwplayerVideoProvider.js +929 -0
- package/modules/jwplayerVideoProvider.md +25 -0
- package/modules/kargoBidAdapter.js +1 -1
- package/modules/kueezRtbBidAdapter.js +278 -0
- package/modules/kueezRtbBidAdapter.md +35 -0
- package/modules/magniteAnalyticsAdapter.js +6 -1
- package/modules/mgidRtdProvider.js +190 -0
- package/modules/mgidRtdProvider.md +51 -0
- package/modules/multibid/index.js +12 -0
- package/modules/openxOrtbBidAdapter.js +120 -275
- package/modules/oxxionRtdProvider.js +119 -0
- package/modules/oxxionRtdProvider.md +48 -0
- package/modules/permutiveRtdProvider.js +2 -1
- package/modules/permutiveRtdProvider.md +36 -1
- package/modules/prebidServerBidAdapter/index.js +19 -716
- package/modules/prebidServerBidAdapter/ortbConverter.js +274 -0
- package/modules/priceFloors.js +73 -1
- package/modules/pubmaticBidAdapter.js +21 -29
- package/modules/rtdModule/index.js +22 -1
- package/modules/schain.js +24 -1
- package/modules/spotxBidAdapter.js +16 -15
- package/modules/synacormediaBidAdapter.js +1 -1
- package/modules/teadsIdSystem.js +5 -0
- package/modules/tripleliftBidAdapter.js +1 -1
- package/modules/userId/eids.js +3 -10
- package/modules/userId/index.js +64 -6
- package/modules/videoModule/addingSubmodule.md +521 -0
- package/modules/videoModule/coreVideo.js +234 -0
- package/modules/videoModule/gamAdServerSubmodule.js +27 -0
- package/modules/videoModule/index.js +244 -0
- package/modules/videoModule/videoImpressionVerifier.js +206 -0
- package/modules/videojsVideoProvider.js +854 -0
- package/modules/videojsVideoProvider.md +17 -0
- package/package.json +12 -8
- package/src/adRendering.js +1 -1
- package/src/adapterManager.js +56 -7
- package/src/adloader.js +3 -1
- package/src/auction.js +6 -1
- package/src/events.js +5 -1
- package/src/pbjsORTB.js +35 -0
- package/src/prebid.js +137 -112
- package/src/targeting.js +10 -2
- package/src/utils/currency.js +16 -0
- package/src/utils.js +21 -0
- package/test/spec/auctionmanager_spec.js +15 -0
- package/test/spec/modules/aaxBlockmeter_spec.js +58 -0
- package/test/spec/modules/admaticBidAdapter_spec.js +46 -0
- package/test/spec/modules/chtnwBidAdapter_spec.js +105 -0
- package/test/spec/modules/concertBidAdapter_spec.js +56 -0
- package/test/spec/modules/connectIdSystem_spec.js +175 -5
- package/test/spec/modules/consentManagementUsp_spec.js +64 -18
- package/test/spec/modules/criteoBidAdapter_spec.js +28 -0
- package/test/spec/modules/dgkeywordRtdProvider_spec.js +3 -3
- package/test/spec/modules/eids_spec.js +10 -7
- package/test/spec/modules/ftrackIdSystem_spec.js +34 -22
- package/test/spec/modules/gumgumBidAdapter_spec.js +15 -0
- package/test/spec/modules/improvedigitalBidAdapter_spec.js +231 -211
- package/test/spec/modules/ixBidAdapter_spec.js +412 -350
- package/test/spec/modules/kueezRtbBidAdapter_spec.js +396 -0
- package/test/spec/modules/magniteAnalyticsAdapter_spec.js +26 -0
- package/test/spec/modules/mgidRtdProvider_spec.js +366 -0
- package/test/spec/modules/openxOrtbBidAdapter_spec.js +77 -49
- package/test/spec/modules/oxxionRtdProvider_spec.js +142 -0
- package/test/spec/modules/permutiveRtdProvider_spec.js +64 -5
- package/test/spec/modules/prebidServerBidAdapter_spec.js +139 -137
- package/test/spec/modules/realTimeDataModule_spec.js +65 -0
- package/test/spec/modules/tripleliftBidAdapter_spec.js +14 -0
- package/test/spec/modules/userId_spec.js +67 -1
- package/test/spec/modules/videoModule/coreVideo_spec.js +98 -0
- package/test/spec/modules/videoModule/pbVideo_spec.js +362 -0
- package/test/spec/modules/videoModule/shared/parentModule_spec.js +73 -0
- package/test/spec/modules/videoModule/shared/state_spec.js +26 -0
- package/test/spec/modules/videoModule/shared/vastXmlBuilder_spec.js +103 -0
- package/test/spec/modules/videoModule/shared/vastXmlEditor_spec.js +209 -0
- package/test/spec/modules/videoModule/submodules/jwplayerVideoProvider_spec.js +846 -0
- package/test/spec/modules/videoModule/submodules/videojsVideoProvider_spec.js +391 -0
- package/test/spec/modules/videoModule/videoImpressionVerifier_spec.js +112 -0
- package/test/spec/ortbConverter/banner_spec.js +203 -0
- package/test/spec/ortbConverter/composer_spec.js +69 -0
- package/test/spec/ortbConverter/converter_spec.js +283 -0
- package/test/spec/ortbConverter/currency_spec.js +40 -0
- package/test/spec/ortbConverter/default_processors_spec.js +61 -0
- package/test/spec/ortbConverter/gdpr_spec.js +38 -0
- package/test/spec/ortbConverter/mediaTypes_spec.js +67 -0
- package/test/spec/ortbConverter/mergeProcessors_spec.js +59 -0
- package/test/spec/ortbConverter/multibid_spec.js +35 -0
- package/test/spec/ortbConverter/native_spec.js +95 -0
- package/test/spec/ortbConverter/pbjsORTB_spec.js +67 -0
- package/test/spec/ortbConverter/pbsExtensions/aliases_spec.js +57 -0
- package/test/spec/ortbConverter/pbsExtensions/params_spec.js +96 -0
- package/test/spec/ortbConverter/pbsExtensions/video_spec.js +52 -0
- package/test/spec/ortbConverter/priceFloors_spec.js +143 -0
- package/test/spec/ortbConverter/schain_spec.js +33 -0
- package/test/spec/ortbConverter/userId_spec.js +21 -0
- package/test/spec/ortbConverter/usp_spec.js +15 -0
- package/test/spec/ortbConverter/video_spec.js +189 -0
- package/test/spec/unit/core/adapterManager_spec.js +102 -0
- package/test/spec/unit/core/targeting_spec.js +34 -0
- package/test/spec/unit/pbjs_api_spec.js +124 -45
- package/test/spec/utils_spec.js +45 -1
package/modules/ixBidAdapter.js
CHANGED
|
@@ -16,15 +16,15 @@ import {
|
|
|
16
16
|
parseQueryStringParameters,
|
|
17
17
|
safeJSONParse
|
|
18
18
|
} from '../src/utils.js';
|
|
19
|
-
import {BANNER, VIDEO, NATIVE} from '../src/mediaTypes.js';
|
|
20
|
-
import {config} from '../src/config.js';
|
|
19
|
+
import { BANNER, VIDEO, NATIVE } from '../src/mediaTypes.js';
|
|
20
|
+
import { config } from '../src/config.js';
|
|
21
21
|
import CONSTANTS from '../src/constants.json';
|
|
22
|
-
import {getStorageManager} from '../src/storageManager.js';
|
|
22
|
+
import { getStorageManager } from '../src/storageManager.js';
|
|
23
23
|
import * as events from '../src/events.js';
|
|
24
|
-
import {find} from '../src/polyfill.js';
|
|
25
|
-
import {registerBidder} from '../src/adapters/bidderFactory.js';
|
|
26
|
-
import {INSTREAM, OUTSTREAM} from '../src/video.js';
|
|
27
|
-
import {Renderer} from '../src/Renderer.js';
|
|
24
|
+
import { find } from '../src/polyfill.js';
|
|
25
|
+
import { registerBidder } from '../src/adapters/bidderFactory.js';
|
|
26
|
+
import { INSTREAM, OUTSTREAM } from '../src/video.js';
|
|
27
|
+
import { Renderer } from '../src/Renderer.js';
|
|
28
28
|
|
|
29
29
|
const BIDDER_CODE = 'ix';
|
|
30
30
|
const ALIAS_BIDDER_CODE = 'roundel';
|
|
@@ -38,7 +38,6 @@ const BANNER_TIME_TO_LIVE = 300;
|
|
|
38
38
|
const VIDEO_TIME_TO_LIVE = 3600; // 1hr
|
|
39
39
|
const NATIVE_TIME_TO_LIVE = 3600; // Since native can have video, use ttl same as video
|
|
40
40
|
const NET_REVENUE = true;
|
|
41
|
-
const MAX_REQUEST_SIZE = 8000;
|
|
42
41
|
const MAX_REQUEST_LIMIT = 4;
|
|
43
42
|
const OUTSTREAM_MINIMUM_PLAYER_SIZE = [144, 144];
|
|
44
43
|
const PRICE_TO_DOLLAR_FACTOR = {
|
|
@@ -102,13 +101,13 @@ const VIDEO_PARAMS_ALLOW_LIST = [
|
|
|
102
101
|
const LOCAL_STORAGE_KEY = 'ixdiag';
|
|
103
102
|
export const LOCAL_STORAGE_FEATURE_TOGGLES_KEY = `${BIDDER_CODE}_features`;
|
|
104
103
|
let hasRegisteredHandler = false;
|
|
105
|
-
export const storage = getStorageManager({gvlid: GLOBAL_VENDOR_ID, bidderCode: BIDDER_CODE});
|
|
104
|
+
export const storage = getStorageManager({ gvlid: GLOBAL_VENDOR_ID, bidderCode: BIDDER_CODE });
|
|
106
105
|
export const FEATURE_TOGGLES = {
|
|
107
106
|
featureToggles: {},
|
|
108
|
-
isFeatureEnabled: function(ft) {
|
|
107
|
+
isFeatureEnabled: function (ft) {
|
|
109
108
|
return deepAccess(this.featureToggles, `features.${ft}.activated`)
|
|
110
109
|
},
|
|
111
|
-
getFeatureToggles: function() {
|
|
110
|
+
getFeatureToggles: function () {
|
|
112
111
|
if (storage.localStorageIsEnabled()) {
|
|
113
112
|
const parsedToggles = safeJSONParse(storage.getDataFromLocalStorage(LOCAL_STORAGE_FEATURE_TOGGLES_KEY));
|
|
114
113
|
if (deepAccess(parsedToggles, 'expiry') && parsedToggles.expiry >= new Date().getTime()) {
|
|
@@ -118,7 +117,7 @@ export const FEATURE_TOGGLES = {
|
|
|
118
117
|
}
|
|
119
118
|
}
|
|
120
119
|
},
|
|
121
|
-
setFeatureToggles: function(serverResponse) {
|
|
120
|
+
setFeatureToggles: function (serverResponse) {
|
|
122
121
|
const responseBody = serverResponse.body;
|
|
123
122
|
const expiryTime = new Date();
|
|
124
123
|
const toggles = deepAccess(responseBody, 'ext.features');
|
|
@@ -133,7 +132,7 @@ export const FEATURE_TOGGLES = {
|
|
|
133
132
|
}
|
|
134
133
|
}
|
|
135
134
|
},
|
|
136
|
-
clearFeatureToggles: function() {
|
|
135
|
+
clearFeatureToggles: function () {
|
|
137
136
|
this.featureToggles = {};
|
|
138
137
|
if (storage.localStorageIsEnabled()) {
|
|
139
138
|
storage.removeDataFromLocalStorage(LOCAL_STORAGE_FEATURE_TOGGLES_KEY);
|
|
@@ -159,7 +158,7 @@ const MEDIA_TYPES = {
|
|
|
159
158
|
* @return {object} A impression object that will be sent to ad server.
|
|
160
159
|
*/
|
|
161
160
|
function bidToBannerImp(bid) {
|
|
162
|
-
const imp = bidToImp(bid);
|
|
161
|
+
const imp = bidToImp(bid, BANNER);
|
|
163
162
|
imp.banner = {};
|
|
164
163
|
const impSize = deepAccess(bid, 'params.size');
|
|
165
164
|
if (impSize) {
|
|
@@ -181,7 +180,7 @@ function bidToBannerImp(bid) {
|
|
|
181
180
|
* @return {object} A impression object that will be sent to ad server.
|
|
182
181
|
*/
|
|
183
182
|
function bidToVideoImp(bid) {
|
|
184
|
-
const imp = bidToImp(bid);
|
|
183
|
+
const imp = bidToImp(bid, VIDEO);
|
|
185
184
|
const videoAdUnitRef = deepAccess(bid, 'mediaTypes.video');
|
|
186
185
|
const videoParamRef = deepAccess(bid, 'params.video');
|
|
187
186
|
const videoParamErrors = checkVideoParams(videoAdUnitRef, videoParamRef);
|
|
@@ -249,7 +248,7 @@ function bidToVideoImp(bid) {
|
|
|
249
248
|
* @return {object} A impression object that will be sent to ad server.
|
|
250
249
|
*/
|
|
251
250
|
function bidToNativeImp(bid) {
|
|
252
|
-
const imp = bidToImp(bid);
|
|
251
|
+
const imp = bidToImp(bid, NATIVE);
|
|
253
252
|
|
|
254
253
|
const request = bid.nativeOrtbRequest
|
|
255
254
|
request.eventtrackers = [{
|
|
@@ -276,13 +275,28 @@ function bidToNativeImp(bid) {
|
|
|
276
275
|
* @param {object} bid PBJS bid object
|
|
277
276
|
* @returns {object} IX impression object
|
|
278
277
|
*/
|
|
279
|
-
function bidToImp(bid) {
|
|
278
|
+
function bidToImp(bid, mediaType) {
|
|
280
279
|
const imp = {};
|
|
281
280
|
|
|
282
281
|
imp.id = bid.bidId;
|
|
283
282
|
|
|
284
283
|
imp.ext = {};
|
|
285
|
-
|
|
284
|
+
|
|
285
|
+
if (deepAccess(bid, `params.${mediaType}.siteId`) && !isNaN(Number(bid.params[mediaType].siteId))) {
|
|
286
|
+
switch (mediaType) {
|
|
287
|
+
case BANNER:
|
|
288
|
+
imp.ext.siteID = bid.params.banner.siteId.toString();
|
|
289
|
+
break;
|
|
290
|
+
case VIDEO:
|
|
291
|
+
imp.ext.siteID = bid.params.video.siteId.toString();
|
|
292
|
+
break;
|
|
293
|
+
case NATIVE:
|
|
294
|
+
imp.ext.siteID = bid.params.native.siteId.toString();
|
|
295
|
+
break;
|
|
296
|
+
}
|
|
297
|
+
} else {
|
|
298
|
+
imp.ext.siteID = bid.params.siteId.toString();
|
|
299
|
+
}
|
|
286
300
|
|
|
287
301
|
// populate imp level sid
|
|
288
302
|
if (bid.params.hasOwnProperty('id') && (typeof bid.params.id === 'string' || typeof bid.params.id === 'number')) {
|
|
@@ -391,7 +405,7 @@ function parseBid(rawBid, currency, bidRequest) {
|
|
|
391
405
|
bid.mediaTypes = bidRequest.mediaTypes;
|
|
392
406
|
bid.ttl = isValidExpiry ? rawBid.exp : VIDEO_TIME_TO_LIVE;
|
|
393
407
|
} else if (parsedAdm && parsedAdm.native) {
|
|
394
|
-
bid.native = {ortb: parsedAdm.native};
|
|
408
|
+
bid.native = { ortb: parsedAdm.native };
|
|
395
409
|
bid.width = rawBid.w ? rawBid.w : 1;
|
|
396
410
|
bid.height = rawBid.h ? rawBid.h : 1;
|
|
397
411
|
bid.mediaType = NATIVE;
|
|
@@ -586,6 +600,12 @@ function buildRequest(validBidRequests, bidderRequest, impressions, version) {
|
|
|
586
600
|
let userEids = eidInfo.toSend;
|
|
587
601
|
const pageUrl = deepAccess(bidderRequest, 'refererInfo.page');
|
|
588
602
|
|
|
603
|
+
let MAX_REQUEST_SIZE = 8000;
|
|
604
|
+
// Modify request size limit if its FT is enabeld.
|
|
605
|
+
if (FEATURE_TOGGLES.isFeatureEnabled('pbjs_use_32kb_size_limit')) {
|
|
606
|
+
MAX_REQUEST_SIZE = 32000
|
|
607
|
+
}
|
|
608
|
+
|
|
589
609
|
// RTI ids will be included in the bid request if the function getIdentityInfo() is loaded
|
|
590
610
|
// and if the data for the partner exist
|
|
591
611
|
if (window.headertag && typeof window.headertag.getIdentityInfo === 'function') {
|
|
@@ -642,6 +662,9 @@ function buildRequest(validBidRequests, bidderRequest, impressions, version) {
|
|
|
642
662
|
r.ext.ixdiag.err = cachedErrors;
|
|
643
663
|
}
|
|
644
664
|
|
|
665
|
+
// Add number of available imps to ixDiag.
|
|
666
|
+
r.ext.ixdiag.imps = Object.keys(impressions).length;
|
|
667
|
+
|
|
645
668
|
// set source.tid to auctionId for outgoing request to Exchange.
|
|
646
669
|
r.source = {
|
|
647
670
|
tid: validBidRequests[0].auctionId,
|
|
@@ -708,18 +731,6 @@ function buildRequest(validBidRequests, bidderRequest, impressions, version) {
|
|
|
708
731
|
siteID = validBidRequests[0].params.siteId;
|
|
709
732
|
payload.s = siteID;
|
|
710
733
|
|
|
711
|
-
if (!FEATURE_TOGGLES.isFeatureEnabled('pbjs_enable_post')) {
|
|
712
|
-
if (version) {
|
|
713
|
-
payload.v = version;
|
|
714
|
-
}
|
|
715
|
-
payload.ac = 'j';
|
|
716
|
-
payload.sd = 1;
|
|
717
|
-
|
|
718
|
-
if (version === VIDEO_ENDPOINT_VERSION) {
|
|
719
|
-
payload.nf = 1;
|
|
720
|
-
}
|
|
721
|
-
}
|
|
722
|
-
|
|
723
734
|
// Parse additional runtime configs.
|
|
724
735
|
const bidderCode = (bidderRequest && bidderRequest.bidderCode) || 'ix';
|
|
725
736
|
const otherIxConfig = config.getConfig(bidderCode);
|
|
@@ -762,13 +773,6 @@ function buildRequest(validBidRequests, bidderRequest, impressions, version) {
|
|
|
762
773
|
logError('IX Bid Adapter: IX config FPD request size has exceeded maximum request size.', { bidder: BIDDER_CODE, code: ERROR_CODES.IX_FPD_EXCEEDS_MAX_SIZE });
|
|
763
774
|
}
|
|
764
775
|
}
|
|
765
|
-
|
|
766
|
-
if (!FEATURE_TOGGLES.isFeatureEnabled('pbjs_enable_post')) {
|
|
767
|
-
// Create t in payload if timeout is configured.
|
|
768
|
-
if (typeof otherIxConfig.timeout === 'number') {
|
|
769
|
-
payload.t = otherIxConfig.timeout;
|
|
770
|
-
}
|
|
771
|
-
}
|
|
772
776
|
}
|
|
773
777
|
|
|
774
778
|
for (let adUnitIndex = 0; adUnitIndex < transactionIds.length; adUnitIndex++) {
|
|
@@ -909,36 +913,21 @@ function buildRequest(validBidRequests, bidderRequest, impressions, version) {
|
|
|
909
913
|
const isLastAdUnit = adUnitIndex === transactionIds.length - 1;
|
|
910
914
|
|
|
911
915
|
if (wasAdUnitImpressionsTrimmed || isLastAdUnit) {
|
|
912
|
-
const clonedPayload = deepClone(payload);
|
|
913
916
|
if (!isLastAdUnit || requestSequenceNumber) {
|
|
914
917
|
r.ext.ixdiag.sn = requestSequenceNumber;
|
|
915
|
-
clonedPayload.sn = requestSequenceNumber;
|
|
916
918
|
}
|
|
917
919
|
|
|
918
920
|
requestSequenceNumber++;
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
contentType: 'text/plain',
|
|
930
|
-
},
|
|
931
|
-
validBidRequests
|
|
932
|
-
}
|
|
933
|
-
} else {
|
|
934
|
-
requestData = {
|
|
935
|
-
method: 'GET',
|
|
936
|
-
url: baseUrl,
|
|
937
|
-
data: clonedPayload,
|
|
938
|
-
validBidRequests
|
|
939
|
-
}
|
|
940
|
-
}
|
|
941
|
-
requests.push(requestData);
|
|
921
|
+
|
|
922
|
+
requests.push({
|
|
923
|
+
method: 'POST',
|
|
924
|
+
url: baseUrl + '?s=' + siteID,
|
|
925
|
+
data: deepClone(r),
|
|
926
|
+
option: {
|
|
927
|
+
contentType: 'text/plain',
|
|
928
|
+
},
|
|
929
|
+
validBidRequests
|
|
930
|
+
});
|
|
942
931
|
|
|
943
932
|
currentRequestSize = baseRequestSize;
|
|
944
933
|
r.imp = [];
|
|
@@ -1452,7 +1441,7 @@ export const spec = {
|
|
|
1452
1441
|
|
|
1453
1442
|
// Step 1: Create impresssions from IX params
|
|
1454
1443
|
validBidRequests.forEach((validBidRequest) => {
|
|
1455
|
-
const adUnitMediaTypes = Object.keys(deepAccess(validBidRequest, 'mediaTypes', {}))
|
|
1444
|
+
const adUnitMediaTypes = Object.keys(deepAccess(validBidRequest, 'mediaTypes', {}));
|
|
1456
1445
|
|
|
1457
1446
|
for (const type in adUnitMediaTypes) {
|
|
1458
1447
|
switch (adUnitMediaTypes[type]) {
|
|
@@ -1532,13 +1521,7 @@ export const spec = {
|
|
|
1532
1521
|
|
|
1533
1522
|
// Transform rawBid in bid response to the format that will be accepted by prebid.
|
|
1534
1523
|
const innerBids = seatbid[i].bid;
|
|
1535
|
-
|
|
1536
|
-
|
|
1537
|
-
if (FEATURE_TOGGLES.isFeatureEnabled('pbjs_enable_post')) {
|
|
1538
|
-
requestBid = bidderRequest.data;
|
|
1539
|
-
} else {
|
|
1540
|
-
requestBid = safeJSONParse(bidderRequest.data.r);
|
|
1541
|
-
}
|
|
1524
|
+
const requestBid = bidderRequest.data;
|
|
1542
1525
|
|
|
1543
1526
|
for (let j = 0; j < innerBids.length; j++) {
|
|
1544
1527
|
const bidRequest = getBidRequest(innerBids[j].impid, requestBid.imp, bidderRequest.validBidRequests);
|