prebid.js 7.10.0 → 7.13.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/.github/PULL_REQUEST_TEMPLATE.md +16 -10
- package/.github/codeql/codeql-config.yml +4 -0
- package/.github/workflows/codeql-analysis.yml +73 -0
- package/.github/workflows/issue_tracker.yml +1 -1
- package/README.md +0 -2
- package/babelConfig.js +10 -4
- package/dist/33acrossBidAdapter.js +1 -1
- package/dist/acuityAdsBidAdapter.js +1 -0
- 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/adrelevantisBidAdapter.js +1 -1
- package/dist/adriverBidAdapter.js +1 -1
- package/dist/adriverIdSystem.js +1 -1
- package/dist/adtelligentBidAdapter.js +1 -1
- package/dist/adtrgtmeBidAdapter.js +1 -0
- package/dist/adxcgBidAdapter.js +1 -1
- package/dist/adyoulikeBidAdapter.js +1 -1
- package/dist/ajaBidAdapter.js +1 -1
- package/dist/alkimiBidAdapter.js +1 -1
- package/dist/amxBidAdapter.js +1 -1
- package/dist/amxIdSystem.js +1 -1
- package/dist/aniviewBidAdapter.js +1 -1
- package/dist/aolBidAdapter.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/beopBidAdapter.js +1 -1
- package/dist/betweenBidAdapter.js +1 -1
- package/dist/bidglassBidAdapter.js +1 -1
- package/dist/bidwatchAnalyticsAdapter.js +1 -1
- package/dist/big-richmediaBidAdapter.js +1 -1
- package/dist/bluebillywigBidAdapter.js +1 -1
- package/dist/brandmetricsRtdProvider.js +1 -1
- package/dist/bridgewellBidAdapter.js +1 -1
- package/dist/brightMountainMediaBidAdapter.js +1 -1
- package/dist/browsiRtdProvider.js +1 -1
- package/dist/cleanioRtdProvider.js +1 -1
- package/dist/concertBidAdapter.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/cpmstarBidAdapter.js +1 -1
- package/dist/craftBidAdapter.js +1 -1
- package/dist/criteoBidAdapter.js +1 -1
- package/dist/currency.js +1 -1
- package/dist/datawrkzBidAdapter.js +1 -0
- package/dist/debugging-standalone.js +1 -1
- package/dist/dfpAdServerVideo.js +1 -1
- package/dist/dgkeywordRtdProvider.js +1 -1
- package/dist/displayioBidAdapter.js +1 -3
- package/dist/dspxBidAdapter.js +1 -1
- package/dist/enrichmentFpdModule.js +1 -1
- package/dist/eplanningBidAdapter.js +1 -1
- package/dist/finativeBidAdapter.js +1 -1
- package/dist/glimpseBidAdapter.js +1 -1
- package/dist/gmosspBidAdapter.js +1 -1
- package/dist/goldbachBidAdapter.js +1 -1
- package/dist/gridBidAdapter.js +1 -1
- package/dist/gridNMBidAdapter.js +1 -1
- package/dist/gumgumBidAdapter.js +1 -1
- package/dist/h12mediaBidAdapter.js +1 -1
- package/dist/id5IdSystem.js +1 -1
- package/dist/imRtdProvider.js +1 -1
- package/dist/impactifyBidAdapter.js +1 -1
- package/dist/improvedigitalBidAdapter.js +1 -1
- package/dist/inmarBidAdapter.js +1 -1
- package/dist/insticatorBidAdapter.js +1 -1
- package/dist/ixBidAdapter.js +1 -1
- package/dist/jixieBidAdapter.js +1 -1
- package/dist/justpremiumBidAdapter.js +1 -1
- package/dist/kargoBidAdapter.js +1 -1
- package/dist/konduitAnalyticsAdapter.js +1 -1
- package/dist/kueezBidAdapter.js +1 -1
- package/dist/lassoBidAdapter.js +1 -1
- package/dist/lifestreetBidAdapter.js +1 -0
- 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/mabidderBidAdapter.js +1 -0
- package/dist/malltvAnalyticsAdapter.js +1 -1
- package/dist/marsmediaBidAdapter.js +1 -1
- package/dist/mediafuseBidAdapter.js +1 -1
- package/dist/mediagoBidAdapter.js +1 -0
- package/dist/mediakeysBidAdapter.js +1 -1
- package/dist/mediasquareBidAdapter.js +1 -1
- package/dist/mgidBidAdapter.js +1 -1
- package/dist/minutemediaBidAdapter.js +1 -1
- package/dist/nextMillenniumBidAdapter.js +1 -1
- package/dist/not-for-prod/prebid.js +153 -147
- package/dist/oguryBidAdapter.js +1 -1
- package/dist/oneKeyIdSystem.js +1 -0
- package/dist/oneKeyRtdProvider.js +1 -0
- package/dist/onetagBidAdapter.js +1 -1
- package/dist/ooloAnalyticsAdapter.js +1 -1
- package/dist/openxAnalyticsAdapter.js +1 -1
- package/dist/outbrainBidAdapter.js +1 -1
- package/dist/parrableIdSystem.js +1 -1
- package/dist/permutiveRtdProvider.js +1 -1
- package/dist/pixfutureBidAdapter.js +1 -1
- package/dist/prebid-core.js +2 -2
- 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/rasBidAdapter.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/rtbhouseBidAdapter.js +1 -1
- package/dist/rubiconAnalyticsAdapter.js +1 -1
- package/dist/rubiconBidAdapter.js +1 -1
- package/dist/seedingAllianceBidAdapter.js +1 -1
- package/dist/seedtagBidAdapter.js +1 -1
- package/dist/sharethroughAnalyticsAdapter.js +1 -1
- package/dist/sharethroughBidAdapter.js +1 -1
- package/dist/shinezBidAdapter.js +1 -1
- package/dist/smaatoBidAdapter.js +1 -1
- package/dist/smartadserverBidAdapter.js +1 -1
- package/dist/smartxBidAdapter.js +1 -1
- package/dist/smilewantedBidAdapter.js +1 -1
- package/dist/sonobiBidAdapter.js +1 -1
- package/dist/sovrnAnalyticsAdapter.js +1 -1
- package/dist/sovrnBidAdapter.js +1 -1
- package/dist/sspBCBidAdapter.js +1 -1
- package/dist/sublimeBidAdapter.js +1 -1
- package/dist/synacormediaBidAdapter.js +1 -1
- package/dist/tappxBidAdapter.js +1 -1
- package/dist/targetVideoBidAdapter.js +1 -1
- package/dist/teadsBidAdapter.js +1 -1
- package/dist/trionBidAdapter.js +1 -1
- package/dist/tripleliftBidAdapter.js +1 -1
- package/dist/trustpidSystem.js +1 -1
- package/dist/ttdBidAdapter.js +1 -1
- package/dist/ucfunnelAnalyticsAdapter.js +1 -1
- package/dist/underdogmediaBidAdapter.js +1 -1
- package/dist/undertoneBidAdapter.js +1 -1
- package/dist/userId.js +1 -1
- package/dist/vidazooBidAdapter.js +1 -1
- package/dist/videobyteBidAdapter.js +1 -1
- package/dist/viewability.js +1 -1
- package/dist/visxBidAdapter.js +1 -1
- package/dist/vuukleBidAdapter.js +1 -1
- package/dist/widespaceBidAdapter.js +1 -1
- package/dist/winrBidAdapter.js +1 -1
- package/dist/yahoosspBidAdapter.js +1 -1
- package/dist/yieldmoBidAdapter.js +1 -1
- package/dist/yieldoneAnalyticsAdapter.js +1 -1
- package/dist/zeta_global_sspBidAdapter.js +1 -1
- package/integrationExamples/gpt/permutiveRtdProvider_example.html +1 -1
- package/karma.conf.maker.js +2 -13
- package/modules/.submodules.json +2 -0
- package/modules/acuityAdsBidAdapter.js +207 -0
- package/modules/acuityAdsBidAdapter.md +79 -0
- package/modules/adagioBidAdapter.js +2 -3
- package/modules/adgenerationBidAdapter.js +2 -2
- package/modules/adkernelBidAdapter.js +28 -12
- package/modules/admixerBidAdapter.js +1 -1
- package/modules/adnowBidAdapter.js +1 -1
- package/modules/adpod.js +1 -1
- package/modules/adrelevantisBidAdapter.js +2 -2
- package/modules/adriverBidAdapter.js +5 -12
- package/modules/adriverIdSystem.js +2 -1
- package/modules/adtargetBidAdapter.js +1 -1
- package/modules/adtelligentBidAdapter.js +6 -2
- package/modules/adtrgtmeBidAdapter.js +333 -0
- package/modules/adtrgtmeBidAdapter.md +69 -0
- package/modules/adtrueBidAdapter.js +1 -1
- package/modules/adxpremiumAnalyticsAdapter.js +1 -1
- package/modules/adyoulikeBidAdapter.js +1 -1
- package/modules/alkimiBidAdapter.js +2 -1
- package/modules/aniviewBidAdapter.js +1 -1
- package/modules/appnexusBidAdapter.js +13 -93
- package/modules/apstreamBidAdapter.js +2 -2
- package/modules/beopBidAdapter.js +4 -4
- package/modules/betweenBidAdapter.js +4 -4
- package/modules/bidwatchAnalyticsAdapter.js +112 -59
- package/modules/bizzclickBidAdapter.js +1 -1
- package/modules/brightMountainMediaBidAdapter.js +1 -1
- package/modules/browsiRtdProvider.js +24 -10
- package/modules/cleanmedianetBidAdapter.js +1 -1
- package/modules/consentManagement.js +1 -1
- package/modules/consentManagementUsp.js +1 -1
- package/modules/consumableBidAdapter.js +43 -3
- package/modules/cpmstarBidAdapter.js +23 -13
- package/modules/criteoBidAdapter.js +19 -13
- package/modules/currency.js +1 -0
- package/modules/cwireBidAdapter.js +1 -1
- package/modules/datablocksBidAdapter.js +1 -1
- package/modules/datawrkzBidAdapter.js +633 -0
- package/modules/datawrkzBidAdapter.md +160 -0
- package/modules/dfpAdServerVideo.js +2 -2
- package/modules/dgkeywordRtdProvider.js +10 -1
- package/modules/displayioBidAdapter.js +92 -97
- package/modules/dspxBidAdapter.js +1 -1
- package/modules/e_volutionBidAdapter.js +3 -3
- package/modules/ebdrBidAdapter.js +1 -1
- package/modules/emx_digitalBidAdapter.js +1 -1
- package/modules/enrichmentFpdModule.js +11 -0
- package/modules/fabrickIdSystem.js +2 -2
- package/modules/gamoshiBidAdapter.js +1 -1
- package/modules/getintentBidAdapter.js +1 -1
- package/modules/gjirafaBidAdapter.js +2 -2
- package/modules/goldbachBidAdapter.js +8 -8
- package/modules/gothamadsBidAdapter.js +2 -2
- package/modules/gumgumBidAdapter.js +3 -3
- package/modules/h12mediaBidAdapter.js +1 -1
- package/modules/id5AnalyticsAdapter.js +1 -1
- package/modules/id5IdSystem.js +160 -111
- package/modules/id5IdSystem.md +16 -14
- package/modules/imRtdProvider.js +20 -7
- package/modules/imRtdProvider.md +3 -1
- package/modules/impactifyBidAdapter.js +1 -1
- package/modules/improvedigitalBidAdapter.js +50 -28
- package/modules/inskinBidAdapter.js +1 -1
- package/modules/insticatorBidAdapter.js +1 -1
- package/modules/integr8BidAdapter.js +2 -2
- package/modules/intentIqIdSystem.js +2 -2
- package/modules/interactiveOffersBidAdapter.js +1 -1
- package/modules/iqmBidAdapter.js +1 -1
- package/modules/ixBidAdapter.js +21 -328
- package/modules/ixBidAdapter.md +1 -19
- package/modules/kargoBidAdapter.js +4 -5
- package/modules/krushmediaBidAdapter.js +2 -2
- package/modules/lassoBidAdapter.js +3 -3
- package/modules/lifestreetBidAdapter.js +143 -0
- package/modules/limelightDigitalBidAdapter.js +2 -1
- package/modules/livewrappedAnalyticsAdapter.js +3 -3
- package/modules/lkqdBidAdapter.js +3 -3
- package/modules/loganBidAdapter.js +2 -2
- package/modules/luponmediaBidAdapter.js +3 -3
- package/modules/mabidderBidAdapter.js +60 -0
- package/modules/mabidderBidAdapter.md +31 -0
- package/modules/malltvBidAdapter.js +2 -2
- package/modules/mediagoBidAdapter.js +462 -0
- package/modules/mediagoBidAdapter.md +34 -0
- package/modules/mediakeysBidAdapter.js +2 -2
- package/modules/mgidBidAdapter.js +2 -2
- package/modules/nextMillenniumBidAdapter.js +25 -6
- package/modules/nobidBidAdapter.js +2 -2
- package/modules/novatiqIdSystem.js +1 -1
- package/modules/oneKeyIdSystem.js +78 -0
- package/modules/oneKeyIdSystem.md +109 -0
- package/modules/oneKeyRtdProvider.js +98 -0
- package/modules/oneKeyRtdProvider.md +127 -0
- package/modules/open8BidAdapter.js +1 -1
- package/modules/openwebBidAdapter.js +1 -1
- package/modules/openxAnalyticsAdapter.js +5 -744
- package/modules/openxAnalyticsAdapter.md +4 -0
- package/modules/openxBidAdapter.js +3 -3
- package/modules/permutiveRtdProvider.js +55 -8
- package/modules/pixfutureBidAdapter.js +1 -1
- package/modules/prebidmanagerAnalyticsAdapter.js +1 -1
- package/modules/priceFloors.js +1 -1
- package/modules/pubmaticAnalyticsAdapter.js +1 -1
- package/modules/pubmaticBidAdapter.js +19 -1
- package/modules/pubwiseAnalyticsAdapter.js +1 -1
- package/modules/pubwiseBidAdapter.js +3 -3
- package/modules/pubxBidAdapter.js +1 -1
- package/modules/pubxaiAnalyticsAdapter.js +2 -2
- package/modules/quantcastIdSystem.js +1 -1
- package/modules/radsBidAdapter.js +1 -1
- package/modules/rasBidAdapter.js +8 -0
- package/modules/rasBidAdapter.md +14 -13
- package/modules/revcontentBidAdapter.js +1 -1
- package/modules/richaudienceBidAdapter.js +1 -1
- package/modules/rtbhouseBidAdapter.js +25 -1
- package/modules/schain.js +1 -1
- package/modules/seedtagBidAdapter.md +25 -56
- package/modules/showheroes-bsBidAdapter.js +1 -1
- package/modules/sizeMappingV2.js +1 -1
- package/modules/smaatoBidAdapter.js +2 -2
- package/modules/sonobiAnalyticsAdapter.js +1 -1
- package/modules/sonobiBidAdapter.js +4 -3
- package/modules/staqAnalyticsAdapter.js +1 -1
- package/modules/tappxBidAdapter.js +11 -2
- package/modules/targetVideoBidAdapter.js +1 -1
- package/modules/theAdxBidAdapter.js +2 -2
- package/modules/tpmnBidAdapter.js +1 -1
- package/modules/trionBidAdapter.js +2 -2
- package/modules/tripleliftBidAdapter.js +20 -1
- package/modules/trustpidSystem.js +6 -42
- package/modules/trustpidSystem.md +10 -10
- package/modules/underdogmediaBidAdapter.js +1 -1
- package/modules/userId/eids.js +26 -0
- package/modules/userId/userId.md +2 -2
- package/modules/vdoaiBidAdapter.js +1 -1
- package/modules/vidazooBidAdapter.js +7 -5
- package/modules/vidoomyBidAdapter.js +1 -1
- package/modules/viewability.js +14 -14
- package/modules/winrBidAdapter.js +1 -1
- package/modules/yahoosspBidAdapter.js +3 -3
- package/modules/yandexBidAdapter.js +1 -1
- package/modules/yieldmoBidAdapter.js +3 -3
- package/modules/yieldoneBidAdapter.js +2 -2
- package/modules/zeta_global_sspBidAdapter.js +24 -21
- package/package.json +3 -3
- package/src/Renderer.js +1 -1
- package/src/adloader.js +2 -1
- package/src/adserver.js +0 -56
- package/src/auction.js +60 -16
- package/src/bidfactory.js +1 -1
- package/src/native.js +75 -60
- package/src/refererDetection.js +12 -1
- package/src/sizeMapping.js +5 -7
- package/src/targeting.js +1 -1
- package/src/userSync.js +1 -1
- package/src/utils/promise.js +3 -1
- package/src/utils.js +27 -0
- package/src/video.js +5 -4
- package/src/videoCache.js +8 -2
- package/test/pages/instream.html +2 -2
- package/test/spec/modules/acuityAdsBidAdapter_spec.js +398 -0
- package/test/spec/modules/adagioBidAdapter_spec.js +2 -0
- package/test/spec/modules/adkernelBidAdapter_spec.js +11 -2
- package/test/spec/modules/adriverBidAdapter_spec.js +6 -13
- package/test/spec/modules/adriverIdSystem_spec.js +3 -8
- package/test/spec/modules/adtelligentBidAdapter_spec.js +2 -0
- package/test/spec/modules/adtrgtmeBidAdapter_spec.js +802 -0
- package/test/spec/modules/alkimiBidAdapter_spec.js +2 -1
- package/test/spec/modules/appnexusBidAdapter_spec.js +1 -0
- package/test/spec/modules/beopBidAdapter_spec.js +11 -0
- package/test/spec/modules/betweenBidAdapter_spec.js +17 -0
- package/test/spec/modules/bidwatchAnalyticsAdapter_spec.js +28 -12
- package/test/spec/modules/big-richmediaBidAdapter_spec.js +1 -0
- package/test/spec/modules/browsiRtdProvider_spec.js +40 -1
- package/test/spec/modules/consumableBidAdapter_spec.js +158 -0
- package/test/spec/modules/cpmstarBidAdapter_spec.js +1 -1
- package/test/spec/modules/criteoBidAdapter_spec.js +35 -26
- package/test/spec/modules/currency_spec.js +22 -0
- package/test/spec/modules/datawrkzBidAdapter_spec.js +656 -0
- package/test/spec/modules/dgkeywordRtdProvider_spec.js +1 -1
- package/test/spec/modules/displayioBidAdapter_spec.js +16 -52
- package/test/spec/modules/enrichmentFpdModule_spec.js +16 -1
- package/test/spec/modules/fpdModule_spec.js +2 -1
- package/test/spec/modules/id5IdSystem_spec.js +529 -172
- package/test/spec/modules/imRtdProvider_spec.js +10 -5
- package/test/spec/modules/improvedigitalBidAdapter_spec.js +9 -13
- package/test/spec/modules/ixBidAdapter_spec.js +216 -123
- package/test/spec/modules/kargoBidAdapter_spec.js +11 -2
- package/test/spec/modules/lifestreetBidAdapter_spec.js +232 -0
- package/test/spec/modules/limelightDigitalBidAdapter_spec.js +59 -7
- package/test/spec/modules/mabidderBidAdapter_spec.js +125 -0
- package/test/spec/modules/mediagoBidAdapter_spec.js +97 -0
- package/test/spec/modules/nextMillenniumBidAdapter_spec.js +2 -7
- package/test/spec/modules/oneKeyIdSystem_spec.js +107 -0
- package/test/spec/modules/oneKeyRtdProvider_spec.js +152 -0
- package/test/spec/modules/openxAnalyticsAdapter_spec.js +6 -638
- package/test/spec/modules/permutiveRtdProvider_spec.js +152 -2
- package/test/spec/modules/pubmaticBidAdapter_spec.js +69 -4
- package/test/spec/modules/rasBidAdapter_spec.js +2 -0
- package/test/spec/modules/tripleliftBidAdapter_spec.js +18 -0
- package/test/spec/modules/trustpidSystem_spec.js +27 -45
- package/test/spec/modules/vidazooBidAdapter_spec.js +36 -23
- package/test/spec/modules/zeta_global_sspBidAdapter_spec.js +59 -0
- package/test/spec/native_spec.js +257 -2
- package/test/spec/videoCache_spec.js +37 -7
|
@@ -43,7 +43,7 @@ function setUserId(userId) {
|
|
|
43
43
|
}
|
|
44
44
|
|
|
45
45
|
if (storage.cookiesAreEnabled()) {
|
|
46
|
-
const expires = new Date(Date.now() + USER_ID_COOKIE_EXP).
|
|
46
|
+
const expires = new Date(Date.now() + USER_ID_COOKIE_EXP).toUTCString();
|
|
47
47
|
storage.setCookie(USER_ID_KEY, userId, expires);
|
|
48
48
|
}
|
|
49
49
|
}
|
|
@@ -78,7 +78,7 @@ export const spec = {
|
|
|
78
78
|
placements: placements,
|
|
79
79
|
contents: contents,
|
|
80
80
|
data: data
|
|
81
|
-
}
|
|
81
|
+
};
|
|
82
82
|
|
|
83
83
|
return [{
|
|
84
84
|
method: 'POST',
|
|
@@ -117,7 +117,7 @@ export const spec = {
|
|
|
117
117
|
}
|
|
118
118
|
return bidResponses;
|
|
119
119
|
}
|
|
120
|
-
}
|
|
120
|
+
};
|
|
121
121
|
|
|
122
122
|
/**
|
|
123
123
|
* Generate size param for bid request using sizes array
|
|
@@ -118,7 +118,7 @@ export const intentIqIdSubmodule = {
|
|
|
118
118
|
logError('User ID - intentIqId submodule requires a valid partner to be defined');
|
|
119
119
|
return;
|
|
120
120
|
}
|
|
121
|
-
if (!FIRST_PARTY_DATA_KEY.includes(configParams.partner)) { FIRST_PARTY_DATA_KEY += '_' + configParams.partner }
|
|
121
|
+
if (!FIRST_PARTY_DATA_KEY.includes(configParams.partner)) { FIRST_PARTY_DATA_KEY += '_' + configParams.partner; }
|
|
122
122
|
let rrttStrtTime = 0;
|
|
123
123
|
|
|
124
124
|
// Read Intent IQ 1st party id or generate it if none exists
|
|
@@ -169,7 +169,7 @@ export const intentIqIdSubmodule = {
|
|
|
169
169
|
shouldUpdateLs = true;
|
|
170
170
|
}
|
|
171
171
|
if (shouldUpdateLs === true) {
|
|
172
|
-
partnerData.date = Date.now()
|
|
172
|
+
partnerData.date = Date.now();
|
|
173
173
|
storeData(FIRST_PARTY_KEY, JSON.stringify(firstPartyData));
|
|
174
174
|
storeData(FIRST_PARTY_DATA_KEY, JSON.stringify(partnerData));
|
|
175
175
|
}
|
package/modules/iqmBidAdapter.js
CHANGED
|
@@ -245,7 +245,7 @@ function getSite(bidderRequest) {
|
|
|
245
245
|
function _buildVideoORTB(bidRequest) {
|
|
246
246
|
const videoAdUnit = deepAccess(bidRequest, 'mediaTypes.video');
|
|
247
247
|
const videoBidderParams = deepAccess(bidRequest, 'params.video', {});
|
|
248
|
-
const video = {}
|
|
248
|
+
const video = {};
|
|
249
249
|
|
|
250
250
|
const videoParams = {
|
|
251
251
|
...videoAdUnit,
|
package/modules/ixBidAdapter.js
CHANGED
|
@@ -25,7 +25,6 @@ import {find} from '../src/polyfill.js';
|
|
|
25
25
|
import {registerBidder} from '../src/adapters/bidderFactory.js';
|
|
26
26
|
import {INSTREAM, OUTSTREAM} from '../src/video.js';
|
|
27
27
|
import {Renderer} from '../src/Renderer.js';
|
|
28
|
-
import { convertOrtbRequestToProprietaryNative } from '../src/native.js';
|
|
29
28
|
|
|
30
29
|
const BIDDER_CODE = 'ix';
|
|
31
30
|
const ALIAS_BIDDER_CODE = 'roundel';
|
|
@@ -100,93 +99,6 @@ const VIDEO_PARAMS_ALLOW_LIST = [
|
|
|
100
99
|
'delivery', 'pos', 'companionad', 'api', 'companiontype', 'ext',
|
|
101
100
|
'playerSize', 'w', 'h'
|
|
102
101
|
];
|
|
103
|
-
const NATIVE_ASSET_TYPES = {
|
|
104
|
-
TITLE: 100,
|
|
105
|
-
IMG: 200,
|
|
106
|
-
VIDEO: 300,
|
|
107
|
-
DATA: 400
|
|
108
|
-
};
|
|
109
|
-
const NATIVE_IMAGE_TYPES = {
|
|
110
|
-
ICON: 1,
|
|
111
|
-
MAIN: 3
|
|
112
|
-
};
|
|
113
|
-
const NATIVE_DATA_TYPES = {
|
|
114
|
-
SPONSORED: 1,
|
|
115
|
-
DESC: 2,
|
|
116
|
-
RATING: 3,
|
|
117
|
-
LIKES: 4,
|
|
118
|
-
DOWNLOADS: 5,
|
|
119
|
-
PRICE: 6,
|
|
120
|
-
SALEPRICE: 7,
|
|
121
|
-
PHONE: 8,
|
|
122
|
-
ADDRESS: 9,
|
|
123
|
-
DESC2: 10,
|
|
124
|
-
DISPLAYURL: 11,
|
|
125
|
-
CTATEXT: 12
|
|
126
|
-
};
|
|
127
|
-
const NATIVE_DATA_MAP = {
|
|
128
|
-
[NATIVE_DATA_TYPES.SPONSORED]: 'sponsoredBy',
|
|
129
|
-
[NATIVE_DATA_TYPES.DESC]: 'body',
|
|
130
|
-
[NATIVE_DATA_TYPES.RATING]: 'rating',
|
|
131
|
-
[NATIVE_DATA_TYPES.LIKES]: 'likes',
|
|
132
|
-
[NATIVE_DATA_TYPES.DOWNLOADS]: 'downloads',
|
|
133
|
-
[NATIVE_DATA_TYPES.PRICE]: 'price',
|
|
134
|
-
[NATIVE_DATA_TYPES.SALEPRICE]: 'salePrice',
|
|
135
|
-
[NATIVE_DATA_TYPES.PHONE]: 'phone',
|
|
136
|
-
[NATIVE_DATA_TYPES.ADDRESS]: 'address',
|
|
137
|
-
[NATIVE_DATA_TYPES.DESC2]: 'body2',
|
|
138
|
-
[NATIVE_DATA_TYPES.DISPLAYURL]: 'displayUrl',
|
|
139
|
-
[NATIVE_DATA_TYPES.CTATEXT]: 'cta'
|
|
140
|
-
};
|
|
141
|
-
const NATIVE_ASSETS_MAP = {
|
|
142
|
-
'title': { assetType: NATIVE_ASSET_TYPES.TITLE },
|
|
143
|
-
'icon': { assetType: NATIVE_ASSET_TYPES.IMG, subtype: NATIVE_IMAGE_TYPES.ICON },
|
|
144
|
-
'image': { assetType: NATIVE_ASSET_TYPES.IMG, subtype: NATIVE_IMAGE_TYPES.MAIN },
|
|
145
|
-
'sponsoredBy': { assetType: NATIVE_ASSET_TYPES.DATA, subtype: NATIVE_DATA_TYPES.SPONSORED },
|
|
146
|
-
'body': { assetType: NATIVE_ASSET_TYPES.DATA, subtype: NATIVE_DATA_TYPES.DESC },
|
|
147
|
-
'rating': { assetType: NATIVE_ASSET_TYPES.DATA, subtype: NATIVE_DATA_TYPES.RATING },
|
|
148
|
-
'likes': { assetType: NATIVE_ASSET_TYPES.DATA, subtype: NATIVE_DATA_TYPES.LIKES },
|
|
149
|
-
'downloads': { assetType: NATIVE_ASSET_TYPES.DATA, subtype: NATIVE_DATA_TYPES.DOWNLOADS },
|
|
150
|
-
'price': { assetType: NATIVE_ASSET_TYPES.DATA, subtype: NATIVE_DATA_TYPES.PRICE },
|
|
151
|
-
'salePrice': { assetType: NATIVE_ASSET_TYPES.DATA, subtype: NATIVE_DATA_TYPES.SALEPRICE },
|
|
152
|
-
'phone': { assetType: NATIVE_ASSET_TYPES.DATA, subtype: NATIVE_DATA_TYPES.PHONE },
|
|
153
|
-
'address': { assetType: NATIVE_ASSET_TYPES.DATA, subtype: NATIVE_DATA_TYPES.ADDRESS },
|
|
154
|
-
'body2': { assetType: NATIVE_ASSET_TYPES.DATA, subtype: NATIVE_DATA_TYPES.DESC2 },
|
|
155
|
-
'displayUrl': { assetType: NATIVE_ASSET_TYPES.DATA, subtype: NATIVE_DATA_TYPES.DISPLAYURL },
|
|
156
|
-
'cta': { assetType: NATIVE_ASSET_TYPES.DATA, subtype: NATIVE_DATA_TYPES.CTATEXT },
|
|
157
|
-
'video': { assetType: NATIVE_ASSET_TYPES.VIDEO }
|
|
158
|
-
};
|
|
159
|
-
const NATIVE_ALLOWED_PROPERTIES = [
|
|
160
|
-
'rendererUrl',
|
|
161
|
-
'sendTargetingKeys',
|
|
162
|
-
'adTemplate',
|
|
163
|
-
'type',
|
|
164
|
-
'ext',
|
|
165
|
-
'privacyLink',
|
|
166
|
-
'clickUrl',
|
|
167
|
-
'privacyIcon'
|
|
168
|
-
];
|
|
169
|
-
const NATIVE_ASSET_DEFAULT = {
|
|
170
|
-
TITLE: {
|
|
171
|
-
LEN: 25
|
|
172
|
-
},
|
|
173
|
-
VIDEO: {
|
|
174
|
-
MIMES: [
|
|
175
|
-
'video/mp4',
|
|
176
|
-
'video/webm'
|
|
177
|
-
],
|
|
178
|
-
MINDURATION: 0,
|
|
179
|
-
MAXDURATION: 120,
|
|
180
|
-
PROTOCOLS: [2, 3, 5, 6],
|
|
181
|
-
}
|
|
182
|
-
};
|
|
183
|
-
const NATIVE_EVENT_TYPES = {
|
|
184
|
-
IMRESSION: 1
|
|
185
|
-
};
|
|
186
|
-
const NATIVE_EVENT_TRACKING_METHOD = {
|
|
187
|
-
IMG: 1,
|
|
188
|
-
JS: 2
|
|
189
|
-
};
|
|
190
102
|
const LOCAL_STORAGE_KEY = 'ixdiag';
|
|
191
103
|
let hasRegisteredHandler = false;
|
|
192
104
|
export const storage = getStorageManager({gvlid: GLOBAL_VENDOR_ID, bidderCode: BIDDER_CODE});
|
|
@@ -307,50 +219,13 @@ function bidToVideoImp(bid) {
|
|
|
307
219
|
*/
|
|
308
220
|
function bidToNativeImp(bid) {
|
|
309
221
|
const imp = bidToImp(bid);
|
|
310
|
-
const nativeAdUnitRef = deepAccess(bid, 'mediaTypes.native');
|
|
311
222
|
|
|
312
|
-
const
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
}
|
|
319
|
-
|
|
320
|
-
const { assetType, subtype } = NATIVE_ASSETS_MAP[adUnitProperty];
|
|
321
|
-
let asset;
|
|
322
|
-
switch (assetType) {
|
|
323
|
-
case NATIVE_ASSET_TYPES.TITLE:
|
|
324
|
-
asset = createNativeTitleRequest(adUnitValues);
|
|
325
|
-
break;
|
|
326
|
-
case NATIVE_ASSET_TYPES.IMG:
|
|
327
|
-
asset = createNativeImgRequest(adUnitValues, subtype);
|
|
328
|
-
break;
|
|
329
|
-
case NATIVE_ASSET_TYPES.VIDEO:
|
|
330
|
-
asset = createNativeVideoRequest(adUnitValues);
|
|
331
|
-
break;
|
|
332
|
-
case NATIVE_ASSET_TYPES.DATA:
|
|
333
|
-
asset = createNativeDataRequest(adUnitValues, subtype);
|
|
334
|
-
break;
|
|
335
|
-
}
|
|
336
|
-
asset.id = assetType + (subtype || 0);
|
|
337
|
-
assets.push(asset);
|
|
338
|
-
}
|
|
339
|
-
|
|
340
|
-
if (assets.length === 0) {
|
|
341
|
-
logWarn('IX Bid Adapter: Native bid does not contain recognised assets in [mediaTypes.native]');
|
|
342
|
-
return {};
|
|
343
|
-
}
|
|
344
|
-
|
|
345
|
-
const request = {
|
|
346
|
-
assets: assets,
|
|
347
|
-
ver: '1.2',
|
|
348
|
-
eventtrackers: [{
|
|
349
|
-
event: 1,
|
|
350
|
-
methods: [1, 2]
|
|
351
|
-
}],
|
|
352
|
-
privacy: 1
|
|
353
|
-
};
|
|
223
|
+
const request = bid.nativeOrtbRequest
|
|
224
|
+
request.eventtrackers = [{
|
|
225
|
+
event: 1,
|
|
226
|
+
methods: [1, 2]
|
|
227
|
+
}];
|
|
228
|
+
request.privacy = 1;
|
|
354
229
|
|
|
355
230
|
imp.native = {
|
|
356
231
|
request: JSON.stringify(request),
|
|
@@ -365,80 +240,6 @@ function bidToNativeImp(bid) {
|
|
|
365
240
|
return imp;
|
|
366
241
|
}
|
|
367
242
|
|
|
368
|
-
/**
|
|
369
|
-
* Converts native bid asset to a native impression asset
|
|
370
|
-
* @param {object} bidAsset PBJS bid asset object
|
|
371
|
-
* @returns {object} IX impression asset object
|
|
372
|
-
*/
|
|
373
|
-
function createNativeTitleRequest(bidAsset) {
|
|
374
|
-
return {
|
|
375
|
-
required: bidAsset.required ? 1 : 0,
|
|
376
|
-
title: {
|
|
377
|
-
len: bidAsset.len ? bidAsset.len : NATIVE_ASSET_DEFAULT.TITLE.LEN,
|
|
378
|
-
ext: bidAsset.ext
|
|
379
|
-
}
|
|
380
|
-
}
|
|
381
|
-
}
|
|
382
|
-
|
|
383
|
-
/**
|
|
384
|
-
* Converts native bid asset to a native impression asset
|
|
385
|
-
* @param {object} bidAsset PBJS bid asset object
|
|
386
|
-
* @param {int} type The image type
|
|
387
|
-
* @returns {object} IX impression asset object
|
|
388
|
-
*/
|
|
389
|
-
function createNativeImgRequest(bidAsset, type) {
|
|
390
|
-
let asset = {
|
|
391
|
-
required: bidAsset.required ? 1 : 0,
|
|
392
|
-
img: {
|
|
393
|
-
type: type,
|
|
394
|
-
mimes: bidAsset.mimes,
|
|
395
|
-
ext: bidAsset.ext
|
|
396
|
-
}
|
|
397
|
-
}
|
|
398
|
-
|
|
399
|
-
if (bidAsset.hasOwnProperty('sizes') && bidAsset.sizes.length === 2) {
|
|
400
|
-
asset.img.wmin = bidAsset.sizes[0];
|
|
401
|
-
asset.img.hmin = bidAsset.sizes[1];
|
|
402
|
-
}
|
|
403
|
-
|
|
404
|
-
return asset
|
|
405
|
-
}
|
|
406
|
-
|
|
407
|
-
/**
|
|
408
|
-
* Converts native bid asset to a native impression asset
|
|
409
|
-
* @param {object} bidAsset PBJS bid asset object
|
|
410
|
-
* @returns {object} IX impression asset object
|
|
411
|
-
*/
|
|
412
|
-
function createNativeVideoRequest(bidAsset) {
|
|
413
|
-
return {
|
|
414
|
-
required: bidAsset.required ? 1 : 0,
|
|
415
|
-
video: {
|
|
416
|
-
mimes: bidAsset.mimes ? bidAsset.mimes : NATIVE_ASSET_DEFAULT.VIDEO.MIMES,
|
|
417
|
-
minduration: bidAsset.minduration ? bidAsset.minduration : NATIVE_ASSET_DEFAULT.VIDEO.MINDURATION,
|
|
418
|
-
maxduration: bidAsset.maxduration ? bidAsset.maxduration : NATIVE_ASSET_DEFAULT.VIDEO.MAXDURATION,
|
|
419
|
-
protocols: bidAsset.protocols ? bidAsset.protocols : NATIVE_ASSET_DEFAULT.VIDEO.PROTOCOLS,
|
|
420
|
-
ext: bidAsset.ext
|
|
421
|
-
}
|
|
422
|
-
}
|
|
423
|
-
}
|
|
424
|
-
|
|
425
|
-
/**
|
|
426
|
-
* Converts native bid asset to a native impression asset
|
|
427
|
-
* @param {object} bidAsset PBJS bid asset object
|
|
428
|
-
* @param {int} type The image type
|
|
429
|
-
* @returns {object} IX impression asset object
|
|
430
|
-
*/
|
|
431
|
-
function createNativeDataRequest(bidAsset, type) {
|
|
432
|
-
return {
|
|
433
|
-
required: bidAsset.required ? 1 : 0,
|
|
434
|
-
data: {
|
|
435
|
-
type: type,
|
|
436
|
-
len: bidAsset.len,
|
|
437
|
-
ext: bidAsset.ext
|
|
438
|
-
}
|
|
439
|
-
}
|
|
440
|
-
}
|
|
441
|
-
|
|
442
243
|
/**
|
|
443
244
|
* Converts an incoming PBJS bid to an IX Impression
|
|
444
245
|
* @param {object} bid PBJS bid object
|
|
@@ -559,7 +360,7 @@ function parseBid(rawBid, currency, bidRequest) {
|
|
|
559
360
|
bid.mediaTypes = bidRequest.mediaTypes;
|
|
560
361
|
bid.ttl = isValidExpiry ? rawBid.exp : VIDEO_TIME_TO_LIVE;
|
|
561
362
|
} else if (parsedAdm && parsedAdm.native) {
|
|
562
|
-
bid.native =
|
|
363
|
+
bid.native = {ortb: parsedAdm.native};
|
|
563
364
|
bid.width = rawBid.w ? rawBid.w : 1;
|
|
564
365
|
bid.height = rawBid.h ? rawBid.h : 1;
|
|
565
366
|
bid.mediaType = NATIVE;
|
|
@@ -583,84 +384,6 @@ function parseBid(rawBid, currency, bidRequest) {
|
|
|
583
384
|
return bid;
|
|
584
385
|
}
|
|
585
386
|
|
|
586
|
-
/**
|
|
587
|
-
* Parse native adm and set native asset key names recognized by Prebid.js
|
|
588
|
-
* @param {string} adm Native adm complience
|
|
589
|
-
*/
|
|
590
|
-
function interpretNativeAdm(nativeResponse) {
|
|
591
|
-
const native = {
|
|
592
|
-
clickUrl: nativeResponse.link.url,
|
|
593
|
-
privacyLink: nativeResponse.privacy
|
|
594
|
-
};
|
|
595
|
-
|
|
596
|
-
for (const asset of nativeResponse.assets) {
|
|
597
|
-
const subtype = asset.id % 100;
|
|
598
|
-
const assetType = asset.id - subtype;
|
|
599
|
-
|
|
600
|
-
switch (assetType) {
|
|
601
|
-
case NATIVE_ASSET_TYPES.TITLE:
|
|
602
|
-
native.title = asset.title && asset.title.text;
|
|
603
|
-
break;
|
|
604
|
-
case NATIVE_ASSET_TYPES.IMG:
|
|
605
|
-
const image = {
|
|
606
|
-
url: asset.img && asset.img.url,
|
|
607
|
-
height: asset.img && asset.img.h,
|
|
608
|
-
width: asset.img && asset.img.w
|
|
609
|
-
};
|
|
610
|
-
native[subtype === NATIVE_IMAGE_TYPES.ICON ? 'icon' : 'image'] = image;
|
|
611
|
-
break;
|
|
612
|
-
case NATIVE_ASSET_TYPES.VIDEO:
|
|
613
|
-
native.video = asset.video && asset.video.vasttag;
|
|
614
|
-
break;
|
|
615
|
-
case NATIVE_ASSET_TYPES.DATA:
|
|
616
|
-
setDataAsset(native, asset, subtype);
|
|
617
|
-
break;
|
|
618
|
-
default:
|
|
619
|
-
logWarn(`IX Bid Adapter: native asset ID ${asset.id} could not be recognized`);
|
|
620
|
-
}
|
|
621
|
-
}
|
|
622
|
-
|
|
623
|
-
setTrackers(native, nativeResponse);
|
|
624
|
-
return native;
|
|
625
|
-
}
|
|
626
|
-
|
|
627
|
-
function setDataAsset(native, asset, type) {
|
|
628
|
-
if (!(type in NATIVE_DATA_MAP)) {
|
|
629
|
-
logWarn(`IX Bid Adapter: native data asset type ${type} is not supported`);
|
|
630
|
-
return;
|
|
631
|
-
}
|
|
632
|
-
native[NATIVE_DATA_MAP[type]] = asset.data && asset.data.value;
|
|
633
|
-
}
|
|
634
|
-
|
|
635
|
-
function setTrackers(native, nativeResponse) {
|
|
636
|
-
native.impressionTrackers = []
|
|
637
|
-
|
|
638
|
-
if (Array.isArray(nativeResponse.imptrackers)) {
|
|
639
|
-
native.impressionTrackers.push(...nativeResponse.imptrackers)
|
|
640
|
-
}
|
|
641
|
-
|
|
642
|
-
if (Array.isArray(nativeResponse.link.clicktrackers)) {
|
|
643
|
-
native.impressionTrackers.push(...nativeResponse.link.clicktrackers)
|
|
644
|
-
}
|
|
645
|
-
|
|
646
|
-
if (Array.isArray(nativeResponse.eventtrackers)) {
|
|
647
|
-
nativeResponse.eventtrackers.forEach(tracker => {
|
|
648
|
-
if (tracker.event !== NATIVE_EVENT_TYPES.IMRESSION) {
|
|
649
|
-
return
|
|
650
|
-
}
|
|
651
|
-
|
|
652
|
-
switch (tracker.method) {
|
|
653
|
-
case NATIVE_EVENT_TRACKING_METHOD.IMG:
|
|
654
|
-
native.impressionTrackers.push(tracker.url);
|
|
655
|
-
break;
|
|
656
|
-
case NATIVE_EVENT_TRACKING_METHOD.JS:
|
|
657
|
-
native.javascriptTrackers = `<script src=\"${tracker.url}\"></script>`;
|
|
658
|
-
break;
|
|
659
|
-
}
|
|
660
|
-
})
|
|
661
|
-
}
|
|
662
|
-
}
|
|
663
|
-
|
|
664
387
|
/**
|
|
665
388
|
* Determines whether or not the given object is valid size format.
|
|
666
389
|
*
|
|
@@ -758,25 +481,13 @@ function isValidBidFloorParams(bidFloor, bidFloorCur) {
|
|
|
758
481
|
bidFloorCur.match(curRegex));
|
|
759
482
|
}
|
|
760
483
|
|
|
761
|
-
function nativeMediaTypeValid(
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
let hasValidAsset = false;
|
|
767
|
-
|
|
768
|
-
for (const property in nativeObj) {
|
|
769
|
-
if (!(property in NATIVE_ASSETS_MAP) && !NATIVE_ALLOWED_PROPERTIES.includes(property)) {
|
|
770
|
-
logError('IX Bid Adapter: native', { bidder: BIDDER_CODE, code: ERROR_CODES.PROPERTY_NOT_INCLUDED });
|
|
771
|
-
return false;
|
|
772
|
-
}
|
|
773
|
-
|
|
774
|
-
if (property in NATIVE_ASSETS_MAP) {
|
|
775
|
-
hasValidAsset = true;
|
|
776
|
-
}
|
|
484
|
+
function nativeMediaTypeValid(bid) {
|
|
485
|
+
const nativeMediaTypes = deepAccess(bid, 'mediaTypes.native');
|
|
486
|
+
if (nativeMediaTypes === undefined) {
|
|
487
|
+
return true
|
|
777
488
|
}
|
|
778
489
|
|
|
779
|
-
return
|
|
490
|
+
return bid.nativeOrtbRequest && Array.isArray(bid.nativeOrtbRequest.assets) && bid.nativeOrtbRequest.assets.length > 0
|
|
780
491
|
}
|
|
781
492
|
|
|
782
493
|
/**
|
|
@@ -837,8 +548,6 @@ function getEidInfo(allEids) {
|
|
|
837
548
|
*
|
|
838
549
|
*/
|
|
839
550
|
function buildRequest(validBidRequests, bidderRequest, impressions, version) {
|
|
840
|
-
// convert Native ORTB definition to old-style prebid native definition
|
|
841
|
-
validBidRequests = convertOrtbRequestToProprietaryNative(validBidRequests);
|
|
842
551
|
// Always use secure HTTPS protocol.
|
|
843
552
|
let baseUrl = SECURE_BID_URL;
|
|
844
553
|
// Get ids from Prebid User ID Modules
|
|
@@ -877,8 +586,6 @@ function buildRequest(validBidRequests, bidderRequest, impressions, version) {
|
|
|
877
586
|
r.ext = {};
|
|
878
587
|
r.ext.source = 'prebid';
|
|
879
588
|
r.ext.ixdiag = {};
|
|
880
|
-
r.ext.ixdiag.msd = 0;
|
|
881
|
-
r.ext.ixdiag.msi = 0;
|
|
882
589
|
r.imp = [];
|
|
883
590
|
r.at = 1;
|
|
884
591
|
|
|
@@ -966,7 +673,6 @@ function buildRequest(validBidRequests, bidderRequest, impressions, version) {
|
|
|
966
673
|
// Use the siteId in the first bid request as the main siteId.
|
|
967
674
|
siteID = validBidRequests[0].params.siteId;
|
|
968
675
|
payload.s = siteID;
|
|
969
|
-
payload.v = version;
|
|
970
676
|
if (version) {
|
|
971
677
|
payload.v = version;
|
|
972
678
|
}
|
|
@@ -1024,12 +730,6 @@ function buildRequest(validBidRequests, bidderRequest, impressions, version) {
|
|
|
1024
730
|
if (typeof otherIxConfig.timeout === 'number') {
|
|
1025
731
|
payload.t = otherIxConfig.timeout;
|
|
1026
732
|
}
|
|
1027
|
-
|
|
1028
|
-
if (typeof otherIxConfig.detectMissingSizes === 'boolean') {
|
|
1029
|
-
r.ext.ixdiag.dms = otherIxConfig.detectMissingSizes;
|
|
1030
|
-
} else {
|
|
1031
|
-
r.ext.ixdiag.dms = true;
|
|
1032
|
-
}
|
|
1033
733
|
}
|
|
1034
734
|
|
|
1035
735
|
for (let adUnitIndex = 0; adUnitIndex < transactionIds.length; adUnitIndex++) {
|
|
@@ -1038,7 +738,7 @@ function buildRequest(validBidRequests, bidderRequest, impressions, version) {
|
|
|
1038
738
|
}
|
|
1039
739
|
|
|
1040
740
|
const adUnitImpressions = impressions[transactionIds[adUnitIndex]];
|
|
1041
|
-
const {
|
|
741
|
+
const { missingImps: missingBannerImpressions = [], ixImps = [] } = adUnitImpressions;
|
|
1042
742
|
let wasAdUnitImpressionsTrimmed = false;
|
|
1043
743
|
let remainingRequestSize = MAX_REQUEST_SIZE - currentRequestSize;
|
|
1044
744
|
const sourceImpressions = { ixImps, missingBannerImpressions };
|
|
@@ -1073,6 +773,11 @@ function buildRequest(validBidRequests, bidderRequest, impressions, version) {
|
|
|
1073
773
|
},
|
|
1074
774
|
};
|
|
1075
775
|
|
|
776
|
+
const position = impressions[transactionIds[adUnitIndex]].pos;
|
|
777
|
+
if (isInteger(position)) {
|
|
778
|
+
_bannerImpression.banner.pos = position;
|
|
779
|
+
}
|
|
780
|
+
|
|
1076
781
|
if (dfpAdUnitCode || gpid || tid) {
|
|
1077
782
|
_bannerImpression.ext = {};
|
|
1078
783
|
_bannerImpression.ext.dfp_ad_unit_code = dfpAdUnitCode;
|
|
@@ -1089,8 +794,6 @@ function buildRequest(validBidRequests, bidderRequest, impressions, version) {
|
|
|
1089
794
|
}
|
|
1090
795
|
|
|
1091
796
|
r.imp.push(_bannerImpression);
|
|
1092
|
-
r.ext.ixdiag.msd += missingCount;
|
|
1093
|
-
r.ext.ixdiag.msi += missingBannerImpressions.length;
|
|
1094
797
|
} else {
|
|
1095
798
|
// set imp.ext.gpid to resolved gpid for each imp
|
|
1096
799
|
impressionObjects.forEach(imp => deepSetValue(imp, 'ext.gpid', gpid));
|
|
@@ -1174,8 +877,6 @@ function buildRequest(validBidRequests, bidderRequest, impressions, version) {
|
|
|
1174
877
|
|
|
1175
878
|
currentRequestSize = baseRequestSize;
|
|
1176
879
|
r.imp = [];
|
|
1177
|
-
r.ext.ixdiag.msd = 0;
|
|
1178
|
-
r.ext.ixdiag.msi = 0;
|
|
1179
880
|
isFpdAdded = false;
|
|
1180
881
|
}
|
|
1181
882
|
}
|
|
@@ -1327,12 +1028,6 @@ function createVideoImps(validBidRequest, videoImps) {
|
|
|
1327
1028
|
* @param {object} bannerImps reference to created banner impressions
|
|
1328
1029
|
*/
|
|
1329
1030
|
function createBannerImps(validBidRequest, missingBannerSizes, bannerImps) {
|
|
1330
|
-
const DEFAULT_IX_CONFIG = {
|
|
1331
|
-
detectMissingSizes: true,
|
|
1332
|
-
};
|
|
1333
|
-
|
|
1334
|
-
const ixConfig = { ...DEFAULT_IX_CONFIG, ...config.getConfig('ix') };
|
|
1335
|
-
|
|
1336
1031
|
let imp = bidToBannerImp(validBidRequest);
|
|
1337
1032
|
|
|
1338
1033
|
const bannerSizeDefined = includesSize(deepAccess(validBidRequest, 'mediaTypes.banner.sizes'), deepAccess(validBidRequest, 'params.size'));
|
|
@@ -1346,6 +1041,7 @@ function createBannerImps(validBidRequest, missingBannerSizes, bannerImps) {
|
|
|
1346
1041
|
bannerImps[validBidRequest.transactionId].tid = deepAccess(validBidRequest, 'ortb2Imp.ext.tid');
|
|
1347
1042
|
bannerImps[validBidRequest.transactionId].pbadslot = deepAccess(validBidRequest, 'ortb2Imp.ext.data.pbadslot');
|
|
1348
1043
|
bannerImps[validBidRequest.transactionId].tagId = deepAccess(validBidRequest, 'params.tagId');
|
|
1044
|
+
bannerImps[validBidRequest.transactionId].pos = deepAccess(validBidRequest, 'mediaTypes.banner.pos');
|
|
1349
1045
|
|
|
1350
1046
|
const adUnitCode = validBidRequest.adUnitCode;
|
|
1351
1047
|
const divId = document.getElementById(adUnitCode) ? adUnitCode : getGptSlotInfoForAdUnitCode(adUnitCode).divId;
|
|
@@ -1360,9 +1056,7 @@ function createBannerImps(validBidRequest, missingBannerSizes, bannerImps) {
|
|
|
1360
1056
|
bannerImps[validBidRequest.transactionId].ixImps.push(imp);
|
|
1361
1057
|
}
|
|
1362
1058
|
|
|
1363
|
-
|
|
1364
|
-
updateMissingSizes(validBidRequest, missingBannerSizes, imp);
|
|
1365
|
-
}
|
|
1059
|
+
updateMissingSizes(validBidRequest, missingBannerSizes, imp);
|
|
1366
1060
|
}
|
|
1367
1061
|
|
|
1368
1062
|
/**
|
|
@@ -1603,7 +1297,6 @@ export const spec = {
|
|
|
1603
1297
|
const paramsSize = deepAccess(bid, 'params.size');
|
|
1604
1298
|
const mediaTypeBannerSizes = deepAccess(bid, 'mediaTypes.banner.sizes');
|
|
1605
1299
|
const mediaTypeVideoRef = deepAccess(bid, 'mediaTypes.video');
|
|
1606
|
-
const mediaTypeNativeRef = deepAccess(bid, 'mediaTypes.native');
|
|
1607
1300
|
const mediaTypeVideoPlayerSize = deepAccess(bid, 'mediaTypes.video.playerSize');
|
|
1608
1301
|
const hasBidFloor = bid.params.hasOwnProperty('bidFloor');
|
|
1609
1302
|
const hasBidFloorCur = bid.params.hasOwnProperty('bidFloorCur');
|
|
@@ -1670,7 +1363,7 @@ export const spec = {
|
|
|
1670
1363
|
}
|
|
1671
1364
|
}
|
|
1672
1365
|
|
|
1673
|
-
return nativeMediaTypeValid(
|
|
1366
|
+
return nativeMediaTypeValid(bid);
|
|
1674
1367
|
},
|
|
1675
1368
|
|
|
1676
1369
|
/**
|
package/modules/ixBidAdapter.md
CHANGED
|
@@ -362,25 +362,7 @@ pbjs.setConfig({
|
|
|
362
362
|
});
|
|
363
363
|
```
|
|
364
364
|
#### The **detectMissingSizes** feature
|
|
365
|
-
|
|
366
|
-
```
|
|
367
|
-
pbjs.setConfig({
|
|
368
|
-
ix: {
|
|
369
|
-
detectMissingSizes: false
|
|
370
|
-
}
|
|
371
|
-
});
|
|
372
|
-
```
|
|
373
|
-
OR
|
|
374
|
-
```
|
|
375
|
-
pbjs.setBidderConfig({
|
|
376
|
-
bidders: ["ix"],
|
|
377
|
-
config: {
|
|
378
|
-
ix: {
|
|
379
|
-
detectMissingSizes: false
|
|
380
|
-
}
|
|
381
|
-
}
|
|
382
|
-
});
|
|
383
|
-
```
|
|
365
|
+
`detectMissingSize` config is now deprecated and IX bidding adapter bids on all banner sizes available in the ad unit when configured to at least one banner size.
|
|
384
366
|
|
|
385
367
|
**Native**
|
|
386
368
|
|
|
@@ -60,7 +60,7 @@ export const spec = {
|
|
|
60
60
|
height: window.screen.height
|
|
61
61
|
},
|
|
62
62
|
prebidRawBidRequests: validBidRequests
|
|
63
|
-
}, spec._getAllMetadata(
|
|
63
|
+
}, spec._getAllMetadata(bidderRequest, tdid));
|
|
64
64
|
const encodedParams = encodeURIComponent(JSON.stringify(transformedParams));
|
|
65
65
|
return Object.assign({}, bidderRequest, {
|
|
66
66
|
method: 'GET',
|
|
@@ -215,11 +215,10 @@ export const spec = {
|
|
|
215
215
|
return crb.clientId;
|
|
216
216
|
},
|
|
217
217
|
|
|
218
|
-
_getAllMetadata(
|
|
218
|
+
_getAllMetadata(bidderRequest, tdid) {
|
|
219
219
|
return {
|
|
220
|
-
userIDs: spec._getUserIds(tdid,
|
|
221
|
-
|
|
222
|
-
pageURL: window.location.href,
|
|
220
|
+
userIDs: spec._getUserIds(tdid, bidderRequest.uspConsent, bidderRequest.gdprConsent),
|
|
221
|
+
pageURL: bidderRequest.refererInfo && bidderRequest.refererInfo.page,
|
|
223
222
|
rawCRB: storage.getCookie('krg_crb'),
|
|
224
223
|
rawCRBLocalStorage: spec._getLocalStorageSafely('krg_crb')
|
|
225
224
|
};
|
|
@@ -57,7 +57,7 @@ export const spec = {
|
|
|
57
57
|
let location;
|
|
58
58
|
// TODO: this odd try-catch block was copied in several adapters; it doesn't seem to be correct for cross-origin
|
|
59
59
|
try {
|
|
60
|
-
location = new URL(bidderRequest.refererInfo.page)
|
|
60
|
+
location = new URL(bidderRequest.refererInfo.page);
|
|
61
61
|
winTop = window.top;
|
|
62
62
|
} catch (e) {
|
|
63
63
|
location = winTop.location;
|
|
@@ -80,7 +80,7 @@ export const spec = {
|
|
|
80
80
|
request.ccpa = bidderRequest.uspConsent;
|
|
81
81
|
}
|
|
82
82
|
if (bidderRequest.gdprConsent) {
|
|
83
|
-
request.gdpr = bidderRequest.gdprConsent
|
|
83
|
+
request.gdpr = bidderRequest.gdprConsent;
|
|
84
84
|
}
|
|
85
85
|
}
|
|
86
86
|
|
|
@@ -47,7 +47,7 @@ export const spec = {
|
|
|
47
47
|
params: JSON.stringify(bidRequest.params),
|
|
48
48
|
crumbs: JSON.stringify(bidRequest.crumbs),
|
|
49
49
|
prebidVersion: '$prebid.version$',
|
|
50
|
-
version:
|
|
50
|
+
version: 2,
|
|
51
51
|
coppa: config.getConfig('coppa') == true ? 1 : 0,
|
|
52
52
|
ccpa: bidderRequest.uspConsent || undefined
|
|
53
53
|
}
|
|
@@ -57,7 +57,7 @@ export const spec = {
|
|
|
57
57
|
url: getBidRequestUrl(aimXR),
|
|
58
58
|
data: payload,
|
|
59
59
|
options: {
|
|
60
|
-
withCredentials:
|
|
60
|
+
withCredentials: true
|
|
61
61
|
},
|
|
62
62
|
};
|
|
63
63
|
});
|
|
@@ -67,7 +67,7 @@ export const spec = {
|
|
|
67
67
|
const response = serverResponse && serverResponse.body;
|
|
68
68
|
const bidResponses = [];
|
|
69
69
|
|
|
70
|
-
if (!response) {
|
|
70
|
+
if (!response || !response.bid.ad) {
|
|
71
71
|
return bidResponses;
|
|
72
72
|
}
|
|
73
73
|
|