prebid.js 9.4.1 → 9.6.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/.eslintrc.js +31 -5
- package/.github/workflows/jscpd.yml +2 -2
- package/.github/workflows/linter.yml +107 -0
- package/creative/crossDomain.js +6 -3
- package/dist/33acrossAnalyticsAdapter.js +1 -1
- package/dist/33acrossBidAdapter.js +1 -1
- package/dist/33acrossIdSystem.js +1 -1
- package/dist/BTBidAdapter.js +1 -1
- package/dist/adagioAnalyticsAdapter.js +1 -1
- package/dist/adagioBidAdapter.js +1 -1
- package/dist/adagioRtdProvider.js +1 -1
- package/dist/adagioUtils.js +1 -1
- package/dist/addefendBidAdapter.js +1 -1
- package/dist/adgenerationBidAdapter.js +1 -1
- package/dist/adkernelAdnBidAdapter.js +1 -1
- package/dist/adkernelBidAdapter.js +1 -1
- package/dist/adkernelUtils.js +1 -0
- package/dist/adlooxRtdProvider.js +1 -1
- package/dist/admixerBidAdapter.js +1 -1
- package/dist/adqueryBidAdapter.js +1 -1
- package/dist/adrelevantisBidAdapter.js +1 -1
- package/dist/adstirBidAdapter.js +1 -1
- package/dist/adtrgtmeBidAdapter.js +1 -1
- package/dist/advRedAnalyticsAdapter.js +1 -0
- package/dist/adxcgAnalyticsAdapter.js +1 -1
- package/dist/adxcgBidAdapter.js +1 -1
- package/dist/adyoulikeBidAdapter.js +1 -1
- package/dist/agmaAnalyticsAdapter.js +1 -1
- package/dist/aidemBidAdapter.js +1 -1
- package/dist/ajaBidAdapter.js +1 -1
- package/dist/akamaiDapRtdProvider.js +1 -1
- package/dist/amxBidAdapter.js +1 -1
- package/dist/amxIdSystem.js +1 -1
- package/dist/anonymisedRtdProvider.js +1 -1
- package/dist/apacdexBidAdapter.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/azerionedgeRtdProvider.js +1 -1
- package/dist/bidglassBidAdapter.js +1 -1
- package/dist/big-richmediaBidAdapter.js +1 -1
- package/dist/bridBidAdapter.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/chunk-core.js +1 -1
- package/dist/concertBidAdapter.js +1 -1
- package/dist/connatixBidAdapter.js +1 -1
- package/dist/connectIdSystem.js +1 -1
- package/dist/connectadBidAdapter.js +1 -1
- package/dist/consumableBidAdapter.js +1 -1
- package/dist/contxtfulRtdProvider.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/currencyUtils.js +1 -1
- package/dist/cwireBidAdapter.js +1 -1
- package/dist/dailymotionBidAdapter.js +1 -1
- package/dist/debugging-standalone.js +1 -1
- package/dist/dependencies.json +69 -8
- package/dist/dfpAdServerVideo.js +1 -1
- package/dist/dfpAdpod.js +1 -1
- package/dist/dfpUtils.js +1 -1
- package/dist/discoveryBidAdapter.js +1 -1
- package/dist/dspxBidAdapter.js +1 -1
- package/dist/dxkultureBidAdapter.js +1 -1
- package/dist/eightPodAnalyticsAdapter.js +1 -1
- package/dist/eightPodBidAdapter.js +1 -1
- package/dist/eplanningBidAdapter.js +1 -1
- package/dist/euidIdSystem.js +1 -1
- package/dist/exadsBidAdapter.js +1 -1
- package/dist/feedadBidAdapter.js +1 -1
- package/dist/finativeBidAdapter.js +1 -1
- package/dist/fintezaAnalyticsAdapter.js +1 -1
- package/dist/fpdUtils.js +1 -0
- package/dist/freewheel-sspBidAdapter.js +1 -1
- package/dist/gmosspBidAdapter.js +1 -1
- package/dist/goldbachBidAdapter.js +1 -1
- package/dist/gptPreAuction.js +1 -1
- package/dist/gptUtils.js +1 -1
- package/dist/greenbidsAnalyticsAdapter.js +1 -1
- package/dist/greenbidsRtdProvider.js +1 -1
- package/dist/gridBidAdapter.js +1 -1
- package/dist/growthCodeAnalyticsAdapter.js +1 -1
- package/dist/growthCodeRtdProvider.js +1 -1
- package/dist/gumgumBidAdapter.js +1 -1
- package/dist/h12mediaBidAdapter.js +1 -1
- package/dist/hypelabBidAdapter.js +1 -1
- package/dist/id5AnalyticsAdapter.js +1 -1
- package/dist/id5IdSystem.js +1 -1
- package/dist/imdsBidAdapter.js +1 -1
- package/dist/improvedigitalBidAdapter.js +1 -1
- package/dist/insticatorBidAdapter.js +1 -1
- package/dist/intentIqAnalyticsAdapter.js +1 -0
- package/dist/ixBidAdapter.js +1 -1
- package/dist/jixieBidAdapter.js +1 -1
- package/dist/justpremiumBidAdapter.js +1 -1
- package/dist/jwplayerBidAdapter.js +1 -1
- package/dist/jwplayerRtdProvider.js +1 -1
- package/dist/kargoBidAdapter.js +1 -1
- package/dist/kimberliteBidAdapter.js +1 -1
- package/dist/konduitAnalyticsAdapter.js +1 -1
- package/dist/kueezBidAdapter.js +1 -1
- package/dist/lassoBidAdapter.js +1 -1
- package/dist/lifestreetBidAdapter.js +1 -1
- package/dist/liveIntentIdSystem.js +1 -1
- package/dist/logicadBidAdapter.js +1 -1
- package/dist/loglyliftBidAdapter.js +1 -1
- package/dist/luceadBidAdapter.js +1 -1
- package/dist/mabidderBidAdapter.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/mediagoBidAdapter.js +1 -1
- package/dist/medianetAnalyticsAdapter.js +1 -1
- package/dist/medianetBidAdapter.js +1 -1
- package/dist/mediasquareBidAdapter.js +1 -1
- package/dist/mgidBidAdapter.js +1 -1
- package/dist/minutemediaBidAdapter.js +1 -1
- package/dist/missenaBidAdapter.js +1 -1
- package/dist/mobianRtdProvider.js +1 -1
- package/dist/nextMillenniumBidAdapter.js +1 -1
- package/dist/nexx360BidAdapter.js +1 -1
- package/dist/nobidAnalyticsAdapter.js +1 -1
- package/dist/nobidBidAdapter.js +1 -1
- package/dist/not-for-prod/prebid.js +208 -199
- package/dist/oguryBidAdapter.js +1 -1
- package/dist/onetagBidAdapter.js +1 -1
- package/dist/ooloAnalyticsAdapter.js +1 -1
- package/dist/openwebBidAdapter.js +1 -1
- package/dist/openxBidAdapter.js +1 -1
- package/dist/optidigitalBidAdapter.js +1 -1
- package/dist/optoutBidAdapter.js +1 -1
- package/dist/orbidderBidAdapter.js +1 -1
- package/dist/outbrainBidAdapter.js +1 -1
- package/dist/paapi.js +1 -1
- package/dist/permutiveRtdProvider.js +1 -1
- package/dist/pixfutureBidAdapter.js +1 -1
- package/dist/playdigoBidAdapter.js +1 -1
- package/dist/prebidServerBidAdapter.js +1 -1
- package/dist/programmaticaBidAdapter.js +1 -1
- package/dist/publinkIdSystem.js +1 -1
- package/dist/publirBidAdapter.js +1 -1
- package/dist/pubmaticAnalyticsAdapter.js +1 -1
- package/dist/pubmaticBidAdapter.js +1 -1
- package/dist/pubwiseAnalyticsAdapter.js +1 -1
- package/dist/pubxaiAnalyticsAdapter.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/relevatehealthBidAdapter.js +1 -1
- package/dist/retailspotBidAdapter.js +1 -1
- package/dist/rhythmoneBidAdapter.js +1 -1
- package/dist/ringieraxelspringerBidAdapter.js +1 -1
- package/dist/riseBidAdapter.js +1 -1
- package/dist/riseUtils.js +1 -0
- package/dist/rubiconBidAdapter.js +1 -1
- package/dist/schainSerializer.js +1 -0
- 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/sizeMapping.js +1 -1
- package/dist/sizeUtils.js +1 -1
- package/dist/smaatoBidAdapter.js +1 -1
- package/dist/smartadserverBidAdapter.js +1 -1
- package/dist/smarthubBidAdapter.js +1 -1
- package/dist/smartxBidAdapter.js +1 -1
- package/dist/smilewantedBidAdapter.js +1 -1
- package/dist/snigelBidAdapter.js +1 -1
- package/dist/sonobiBidAdapter.js +1 -1
- package/dist/sovrnBidAdapter.js +1 -1
- package/dist/sspBCBidAdapter.js +1 -1
- package/dist/stnBidAdapter.js +1 -1
- package/dist/stvBidAdapter.js +1 -1
- package/dist/sublimeBidAdapter.js +1 -1
- package/dist/symitriDapRtdProvider.js +1 -0
- package/dist/taboolaBidAdapter.js +1 -1
- package/dist/tappxBidAdapter.js +1 -1
- package/dist/targetVideoBidAdapter.js +1 -1
- package/dist/targetVideoUtils.js +1 -0
- package/dist/teadsBidAdapter.js +1 -1
- package/dist/telariaBidAdapter.js +1 -1
- package/dist/teqblazeUtils.js +1 -1
- package/dist/terceptAnalyticsAdapter.js +1 -1
- package/dist/themoneytizerBidAdapter.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 -1
- package/dist/underdogmediaBidAdapter.js +1 -1
- package/dist/undertoneBidAdapter.js +1 -1
- package/dist/unrulyBidAdapter.js +1 -1
- package/dist/userAgentUtils.js +1 -0
- package/dist/utiqIdSystem.js +1 -1
- package/dist/vidazooUtils.js +1 -1
- package/dist/videobyteBidAdapter.js +1 -1
- package/dist/visxBidAdapter.js +1 -1
- package/dist/vuukleBidAdapter.js +1 -1
- package/dist/widespaceBidAdapter.js +1 -1
- package/dist/winrBidAdapter.js +1 -1
- package/dist/yahooAdsBidAdapter.js +1 -1
- package/dist/yandexIdSystem.js +1 -1
- package/dist/yieldmoBidAdapter.js +1 -1
- package/dist/yieldoneAnalyticsAdapter.js +1 -1
- package/integrationExamples/gpt/x-domain/creative.html +1 -1
- package/libraries/adkernelUtils/adkernelUtils.js +11 -0
- package/libraries/currencyUtils/floor.js +23 -0
- package/libraries/dfpUtils/dfpUtils.js +7 -0
- package/libraries/fpdUtils/deviceInfo.js +58 -0
- package/libraries/fpdUtils/pageInfo.js +73 -0
- package/libraries/gptUtils/gptUtils.js +23 -1
- package/libraries/riseUtils/index.js +330 -0
- package/libraries/schainSerializer/schainSerializer.js +24 -0
- package/libraries/sizeUtils/tranformSize.js +43 -0
- package/libraries/targetVideoUtils/bidderUtils.js +178 -0
- package/libraries/targetVideoUtils/constants.js +23 -0
- package/libraries/teqblazeUtils/bidderUtils.js +15 -11
- package/libraries/userAgentUtils/index.js +58 -0
- package/libraries/userAgentUtils/userAgentTypes.enums.js +22 -0
- package/modules/.submodules.json +1 -0
- package/modules/33acrossAnalyticsAdapter.js +2 -0
- package/modules/adagioAnalyticsAdapter.js +101 -84
- package/modules/adagioAnalyticsAdapter.md +4 -0
- package/modules/adagioBidAdapter.js +5 -17
- package/modules/adagioRtdProvider.js +18 -4
- package/modules/adkernelAdnBidAdapter.js +1 -12
- package/modules/adkernelBidAdapter.js +4 -13
- package/modules/adlooxAnalyticsAdapter.js +1 -0
- package/modules/admixerBidAdapter.js +10 -6
- package/modules/admixerBidAdapter.md +7 -10
- package/modules/adtrgtmeBidAdapter.js +1 -1
- package/modules/advRedAnalyticsAdapter.js +198 -0
- package/modules/advRedAnalyticsAdapter.md +30 -0
- package/modules/aidemBidAdapter.js +2 -0
- package/modules/akamaiDapRtdProvider.js +19 -798
- package/modules/anonymisedRtdProvider.js +5 -1
- package/modules/anonymisedRtdProvider.md +1 -1
- package/modules/apacdexBidAdapter.js +1 -1
- package/modules/appnexusBidAdapter.js +56 -2
- package/modules/automatadAnalyticsAdapter.js +2 -0
- package/modules/azerionedgeRtdProvider.js +13 -3
- package/modules/azerionedgeRtdProvider.md +0 -17
- package/modules/bridBidAdapter.js +47 -47
- package/modules/cleanioRtdProvider.js +1 -0
- package/modules/concertBidAdapter.js +1 -1
- package/modules/connatixBidAdapter.js +36 -8
- package/modules/connectIdSystem.js +6 -2
- package/modules/contxtfulRtdProvider.js +20 -2
- package/modules/contxtfulRtdProvider.md +1 -0
- package/modules/craftBidAdapter.js +1 -1
- package/modules/criteoBidAdapter.js +1 -1
- package/modules/cwireBidAdapter.js +5 -1
- package/modules/dailymotionBidAdapter.js +85 -65
- package/modules/debugging/debugging.js +3 -0
- package/modules/dfpAdServerVideo.js +15 -33
- package/modules/dfpAdpod.js +2 -6
- package/modules/dgkeywordRtdProvider.js +2 -0
- package/modules/discoveryBidAdapter.js +26 -210
- package/modules/dspxBidAdapter.js +176 -54
- package/modules/eightPodAnalyticsAdapter.js +28 -34
- package/modules/eightPodBidAdapter.js +113 -57
- package/modules/fintezaAnalyticsAdapter.js +9 -4
- package/modules/goldbachBidAdapter.js +1 -1
- package/modules/gptPreAuction.js +63 -4
- package/modules/growthCodeAnalyticsAdapter.js +1 -1
- package/modules/growthCodeRtdProvider.js +1 -1
- package/modules/gumgumBidAdapter.js +14 -10
- package/modules/improvedigitalBidAdapter.js +1 -1
- package/modules/insticatorBidAdapter.js +35 -31
- package/modules/intentIqAnalyticsAdapter.js +234 -0
- package/modules/intentIqAnalyticsAdapter.md +27 -0
- package/modules/intentIqIdSystem.md +0 -0
- package/modules/jwplayerBidAdapter.js +1 -1
- package/modules/jwplayerRtdProvider.js +26 -6
- package/modules/jwplayerVideoProvider.js +6 -0
- package/modules/kargoBidAdapter.js +11 -14
- package/modules/kimberliteBidAdapter.js +24 -7
- package/modules/kimberliteBidAdapter.md +30 -1
- package/modules/mediafuseBidAdapter.js +1 -1
- package/modules/mediagoBidAdapter.js +7 -176
- package/modules/medianetBidAdapter.js +101 -40
- package/modules/mgidBidAdapter.js +3 -1
- package/modules/minutemediaBidAdapter.js +21 -398
- package/modules/mobianRtdProvider.js +16 -2
- package/modules/nextMillenniumBidAdapter.js +1 -27
- package/modules/nexx360BidAdapter.js +3 -2
- package/modules/nobidBidAdapter.js +1 -1
- package/modules/openwebBidAdapter.js +18 -396
- package/modules/optoutBidAdapter.js +1 -1
- package/modules/paapi.js +48 -35
- package/modules/permutiveRtdProvider.js +72 -22
- package/modules/playdigoBidAdapter.js +4 -2
- package/modules/prebidServerBidAdapter/index.js +4 -2
- package/modules/prebidServerBidAdapter/ortbConverter.js +1 -0
- package/modules/programmaticaBidAdapter.js +1 -1
- package/modules/publirBidAdapter.js +20 -273
- package/modules/pubmaticBidAdapter.js +12 -0
- package/modules/pubxaiAnalyticsAdapter.js +306 -164
- package/modules/relevatehealthBidAdapter.js +2 -1
- package/modules/resetdigitalBidAdapter.md +54 -45
- package/modules/richaudienceBidAdapter.js +1 -1
- package/modules/riseBidAdapter.js +19 -400
- package/modules/rtdModule/index.js +5 -3
- package/modules/shinezBidAdapter.js +17 -361
- package/modules/sirdataRtdProvider.js +2 -0
- package/modules/sizeMapping.js +2 -5
- package/modules/smaatoBidAdapter.js +18 -1
- package/modules/smarthubBidAdapter.js +45 -177
- package/modules/smilewantedBidAdapter.js +26 -22
- package/modules/snigelBidAdapter.js +1 -1
- package/modules/sonobiBidAdapter.js +5 -10
- package/modules/stnBidAdapter.js +22 -398
- package/modules/symitriDapRtdProvider.js +812 -0
- package/modules/symitriDapRtdProvider.md +49 -0
- package/modules/targetVideoBidAdapter.js +120 -152
- package/modules/targetVideoBidAdapter.md +20 -3
- package/modules/telariaBidAdapter.js +2 -32
- package/modules/uid2IdSystem_shared.js +51 -39
- package/modules/userId/eids.js +3 -0
- package/modules/utiqIdSystem.js +12 -10
- package/modules/validationFpdModule/index.js +22 -17
- package/modules/videojsVideoProvider.js +3 -0
- package/modules/visxBidAdapter.js +1 -1
- package/modules/winrBidAdapter.js +2 -27
- package/modules/yahooAdsBidAdapter.js +1 -1
- package/modules/yandexIdSystem.js +1 -1
- package/package.json +4 -4
- package/plugins/eslint/index.js +73 -45
- package/src/adloader.js +1 -0
- package/src/ajax.js +15 -0
- package/src/config.js +0 -4
- package/src/debugging.js +1 -0
- package/src/prebid.js +4 -0
- package/src/secureCreatives.js +1 -1
- package/src/storageManager.js +62 -73
- package/src/targeting.js +26 -20
- package/src/utils.js +9 -0
- package/test/pages/consent_mgt_gdpr.html +1 -1
- package/test/spec/ajax_spec.js +11 -0
- package/test/spec/creative/crossDomainCreative_spec.js +26 -9
- package/test/spec/fpd/gdpr_spec.js +1 -1
- package/test/spec/libraries/userAgentUtils_spec.js +109 -0
- package/test/spec/modules/adagioAnalyticsAdapter_spec.js +231 -141
- package/test/spec/modules/adagioBidAdapter_spec.js +32 -66
- package/test/spec/modules/adagioRtdProvider_spec.js +72 -0
- package/test/spec/modules/admixerBidAdapter_spec.js +21 -17
- package/test/spec/modules/advRedAnalyticsAdapter_spec.js +114 -0
- package/test/spec/modules/adxcgBidAdapter_spec.js +1 -1
- package/test/spec/modules/appnexusBidAdapter_spec.js +36 -0
- package/test/spec/modules/azerionedgeRtdProvider_spec.js +36 -21
- package/test/spec/modules/connatixBidAdapter_spec.js +55 -2
- package/test/spec/modules/connectIdSystem_spec.js +27 -28
- package/test/spec/modules/consentManagement_spec.js +1 -1
- package/test/spec/modules/contxtfulRtdProvider_spec.js +6 -0
- package/test/spec/modules/dailymotionBidAdapter_spec.js +497 -4
- package/test/spec/modules/discoveryBidAdapter_spec.js +9 -6
- package/test/spec/modules/dspxBidAdapter_spec.js +188 -7
- package/test/spec/modules/eightPodAnalyticsAdapter_spec.js +22 -13
- package/test/spec/modules/gptPreAuction_spec.js +143 -1
- package/test/spec/modules/gumgumBidAdapter_spec.js +17 -0
- package/test/spec/modules/insticatorBidAdapter_spec.js +8 -1
- package/test/spec/modules/intentIqAnalyticsAdapter_spec.js +172 -0
- package/test/spec/modules/jwplayerRtdProvider_spec.js +61 -0
- package/test/spec/modules/kargoBidAdapter_spec.js +7 -8
- package/test/spec/modules/kimberliteBidAdapter_spec.js +137 -65
- package/test/spec/modules/mediagoBidAdapter_spec.js +34 -37
- package/test/spec/modules/medianetBidAdapter_spec.js +297 -16
- package/test/spec/modules/mgidBidAdapter_spec.js +15 -5
- package/test/spec/modules/mobianRtdProvider_spec.js +1 -3
- package/test/spec/modules/nexx360BidAdapter_spec.js +1 -1
- package/test/spec/modules/paapi_spec.js +177 -111
- package/test/spec/modules/permutiveRtdProvider_spec.js +42 -8
- package/test/spec/modules/prebidServerBidAdapter_spec.js +17 -3
- package/test/spec/modules/proxistoreBidAdapter_spec.js +1 -1
- package/test/spec/modules/pubmaticBidAdapter_spec.js +40 -0
- package/test/spec/modules/pubxaiAnalyticsAdapter_spec.js +970 -603
- package/test/spec/modules/pulsepointBidAdapter_spec.js +4 -4
- package/test/spec/modules/smaatoBidAdapter_spec.js +36 -1
- package/test/spec/modules/smarthubBidAdapter_spec.js +6 -4
- package/test/spec/modules/smilewantedBidAdapter_spec.js +57 -1
- package/test/spec/modules/symitriDapRtdProvider_spec.js +600 -0
- package/test/spec/modules/targetVideoBidAdapter_spec.js +112 -11
- package/test/spec/modules/yandexIdSystem_spec.js +6 -1
- package/test/spec/schainSerializer/schainSerializer_spec.js +138 -0
- package/test/spec/unit/core/storageManager_spec.js +68 -51
- package/test/spec/unit/pbjs_api_spec.js +11 -0
- package/test/spec/utils_spec.js +19 -0
- /package/src/utils/{gpdr.js → gdpr.js} +0 -0
|
@@ -95,7 +95,8 @@ export function getModuleConfig(customModuleConfig) {
|
|
|
95
95
|
/**
|
|
96
96
|
* Sets ortb2 config for ac bidders
|
|
97
97
|
* @param {Object} bidderOrtb2 - The ortb2 object for the all bidders
|
|
98
|
-
* @param {Object}
|
|
98
|
+
* @param {Object} moduleConfig - Publisher config for module
|
|
99
|
+
* @param {Object} segmentData - Segment data grouped by bidder or type
|
|
99
100
|
*/
|
|
100
101
|
export function setBidderRtb (bidderOrtb2, moduleConfig, segmentData) {
|
|
101
102
|
const acBidders = deepAccess(moduleConfig, 'params.acBidders')
|
|
@@ -129,13 +130,13 @@ export function setBidderRtb (bidderOrtb2, moduleConfig, segmentData) {
|
|
|
129
130
|
|
|
130
131
|
/**
|
|
131
132
|
* Updates `user.data` object in existing bidder config with Permutive segments
|
|
132
|
-
* @param string bidder - The bidder
|
|
133
|
+
* @param {string} bidder - The bidder identifier
|
|
133
134
|
* @param {Object} currConfig - Current bidder config
|
|
134
|
-
* @param {Object[]} transformationConfigs - array of objects with `id` and `config` properties, used to determine
|
|
135
|
-
* the transformations on user data to include the ORTB2 object
|
|
136
135
|
* @param {string[]} segmentIDs - Permutive segment IDs
|
|
137
136
|
* @param {string[]} sspSegmentIDs - Permutive SSP segment IDs
|
|
138
137
|
* @param {Object} topics - Privacy Sandbox Topics, keyed by IAB taxonomy version (600, 601, etc.)
|
|
138
|
+
* @param {Object[]} transformationConfigs - array of objects with `id` and `config` properties, used to determine
|
|
139
|
+
* the transformations on user data to include the ORTB2 object
|
|
139
140
|
* @param {Object} segmentData - The segments available for targeting
|
|
140
141
|
* @return {Object} Merged ortb2 object
|
|
141
142
|
*/
|
|
@@ -270,7 +271,7 @@ function setSegments (reqBidsConfigObj, moduleConfig, segmentData) {
|
|
|
270
271
|
*/
|
|
271
272
|
function makeSafe (fn) {
|
|
272
273
|
try {
|
|
273
|
-
fn()
|
|
274
|
+
return fn()
|
|
274
275
|
} catch (e) {
|
|
275
276
|
logError(e)
|
|
276
277
|
}
|
|
@@ -310,23 +311,71 @@ export function isPermutiveOnPage () {
|
|
|
310
311
|
* @param {number} maxSegs - Maximum number of segments to be included
|
|
311
312
|
* @return {Object}
|
|
312
313
|
*/
|
|
313
|
-
export function getSegments
|
|
314
|
-
const legacySegs = readSegments('_psegs', []).map(Number).filter(seg => seg >= 1000000).map(String)
|
|
315
|
-
const _ppam = readSegments('_ppam', [])
|
|
316
|
-
const _pcrprs = readSegments('_pcrprs', [])
|
|
317
|
-
|
|
314
|
+
export function getSegments(maxSegs) {
|
|
318
315
|
const segments = {
|
|
319
|
-
ac:
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
316
|
+
ac:
|
|
317
|
+
makeSafe(() => {
|
|
318
|
+
const legacySegs =
|
|
319
|
+
makeSafe(() =>
|
|
320
|
+
readSegments('_psegs', [])
|
|
321
|
+
.map(Number)
|
|
322
|
+
.filter((seg) => seg >= 1000000)
|
|
323
|
+
.map(String),
|
|
324
|
+
) || [];
|
|
325
|
+
const _ppam = makeSafe(() => readSegments('_ppam', []).map(String)) || [];
|
|
326
|
+
const _pcrprs = makeSafe(() => readSegments('_pcrprs', []).map(String)) || [];
|
|
327
|
+
|
|
328
|
+
return [..._pcrprs, ..._ppam, ...legacySegs];
|
|
329
|
+
}) || [],
|
|
330
|
+
|
|
331
|
+
ix:
|
|
332
|
+
makeSafe(() => {
|
|
333
|
+
const _pindexs = readSegments('_pindexs', []);
|
|
334
|
+
return _pindexs.map(String);
|
|
335
|
+
}) || [],
|
|
336
|
+
|
|
337
|
+
rubicon:
|
|
338
|
+
makeSafe(() => {
|
|
339
|
+
const _prubicons = readSegments('_prubicons', []);
|
|
340
|
+
return _prubicons.map(String);
|
|
341
|
+
}) || [],
|
|
342
|
+
|
|
343
|
+
appnexus:
|
|
344
|
+
makeSafe(() => {
|
|
345
|
+
const _papns = readSegments('_papns', []);
|
|
346
|
+
return _papns.map(String);
|
|
347
|
+
}) || [],
|
|
348
|
+
|
|
349
|
+
gam:
|
|
350
|
+
makeSafe(() => {
|
|
351
|
+
const _pdfps = readSegments('_pdfps', []);
|
|
352
|
+
return _pdfps.map(String);
|
|
353
|
+
}) || [],
|
|
354
|
+
|
|
355
|
+
ssp: makeSafe(() => {
|
|
356
|
+
const _pssps = readSegments('_pssps', {
|
|
357
|
+
cohorts: [],
|
|
358
|
+
ssps: [],
|
|
359
|
+
});
|
|
360
|
+
|
|
361
|
+
return {
|
|
362
|
+
cohorts: makeSafe(() => _pssps.cohorts.map(String)) || [],
|
|
363
|
+
ssps: makeSafe(() => _pssps.ssps.map(String)) || [],
|
|
364
|
+
};
|
|
327
365
|
}),
|
|
328
|
-
|
|
329
|
-
|
|
366
|
+
|
|
367
|
+
topics:
|
|
368
|
+
makeSafe(() => {
|
|
369
|
+
const _ppsts = readSegments('_ppsts', {});
|
|
370
|
+
|
|
371
|
+
const topics = {};
|
|
372
|
+
for (const [k, value] of Object.entries(_ppsts)) {
|
|
373
|
+
topics[k] = makeSafe(() => value.map(String)) || [];
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
return topics;
|
|
377
|
+
}) || {},
|
|
378
|
+
};
|
|
330
379
|
|
|
331
380
|
for (const bidder in segments) {
|
|
332
381
|
if (bidder === 'ssp') {
|
|
@@ -342,7 +391,8 @@ export function getSegments (maxSegs) {
|
|
|
342
391
|
}
|
|
343
392
|
}
|
|
344
393
|
|
|
345
|
-
|
|
394
|
+
logger.logInfo(`Read segments`, segments)
|
|
395
|
+
return segments;
|
|
346
396
|
}
|
|
347
397
|
|
|
348
398
|
/**
|
|
@@ -393,7 +443,7 @@ function iabSegmentId(permutiveSegmentId, iabIds) {
|
|
|
393
443
|
* Pull the latest configuration and cohort information and update accordingly.
|
|
394
444
|
*
|
|
395
445
|
* @param reqBidsConfigObj - Bidder provided config for request
|
|
396
|
-
* @param
|
|
446
|
+
* @param moduleConfig - Publisher provided config
|
|
397
447
|
*/
|
|
398
448
|
export function readAndSetCohorts(reqBidsConfigObj, moduleConfig) {
|
|
399
449
|
const segmentData = getSegments(deepAccess(moduleConfig, 'params.maxSegs'))
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { registerBidder } from '../src/adapters/bidderFactory.js';
|
|
2
2
|
import { BANNER, NATIVE, VIDEO } from '../src/mediaTypes.js';
|
|
3
|
-
import { isBidRequestValid, buildRequests, interpretResponse } from '../libraries/teqblazeUtils/bidderUtils.js';
|
|
3
|
+
import { isBidRequestValid, buildRequests, interpretResponse, getUserSyncs } from '../libraries/teqblazeUtils/bidderUtils.js';
|
|
4
4
|
|
|
5
5
|
const BIDDER_CODE = 'playdigo';
|
|
6
6
|
const AD_URL = 'https://server.playdigo.com/pbjs';
|
|
7
|
+
const SYNC_URL = 'https://cs.playdigo.com';
|
|
7
8
|
|
|
8
9
|
export const spec = {
|
|
9
10
|
code: BIDDER_CODE,
|
|
@@ -11,7 +12,8 @@ export const spec = {
|
|
|
11
12
|
|
|
12
13
|
isBidRequestValid: isBidRequestValid(),
|
|
13
14
|
buildRequests: buildRequests(AD_URL),
|
|
14
|
-
interpretResponse
|
|
15
|
+
interpretResponse,
|
|
16
|
+
getUserSyncs: getUserSyncs(SYNC_URL)
|
|
15
17
|
};
|
|
16
18
|
|
|
17
19
|
registerBidder(spec);
|
|
@@ -25,7 +25,7 @@ import {includes} from '../../src/polyfill.js';
|
|
|
25
25
|
import {S2S_VENDORS} from './config.js';
|
|
26
26
|
import {ajax} from '../../src/ajax.js';
|
|
27
27
|
import {hook} from '../../src/hook.js';
|
|
28
|
-
import {hasPurpose1Consent} from '../../src/utils/
|
|
28
|
+
import {hasPurpose1Consent} from '../../src/utils/gdpr.js';
|
|
29
29
|
import {buildPBSRequest, interpretPBSResponse} from './ortbConverter.js';
|
|
30
30
|
import {useMetrics} from '../../src/utils/perfMetrics.js';
|
|
31
31
|
import {isActivityAllowed} from '../../src/activities/rules.js';
|
|
@@ -515,7 +515,9 @@ export function PrebidServer() {
|
|
|
515
515
|
}
|
|
516
516
|
},
|
|
517
517
|
onFledge: (params) => {
|
|
518
|
-
|
|
518
|
+
config.runWithBidder(params.bidder, () => {
|
|
519
|
+
addPaapiConfig({auctionId: bidRequests[0].auctionId, ...params}, {config: params.config});
|
|
520
|
+
})
|
|
519
521
|
}
|
|
520
522
|
})
|
|
521
523
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { registerBidder } from '../src/adapters/bidderFactory.js';
|
|
2
2
|
import { BANNER, VIDEO } from '../src/mediaTypes.js';
|
|
3
|
-
import { hasPurpose1Consent } from '../src/utils/
|
|
3
|
+
import { hasPurpose1Consent } from '../src/utils/gdpr.js';
|
|
4
4
|
import { deepAccess, parseSizesInput, isArray } from '../src/utils.js';
|
|
5
5
|
|
|
6
6
|
const BIDDER_CODE = 'programmatica';
|
|
@@ -2,32 +2,26 @@ import {
|
|
|
2
2
|
logWarn,
|
|
3
3
|
logInfo,
|
|
4
4
|
isArray,
|
|
5
|
-
isFn,
|
|
6
5
|
deepAccess,
|
|
7
|
-
isEmpty,
|
|
8
|
-
contains,
|
|
9
6
|
timestamp,
|
|
10
7
|
triggerPixel,
|
|
11
|
-
getDNT,
|
|
12
|
-
getBidIdParameter
|
|
13
8
|
} from '../src/utils.js';
|
|
14
9
|
import { registerBidder } from '../src/adapters/bidderFactory.js';
|
|
15
10
|
import { BANNER, VIDEO } from '../src/mediaTypes.js';
|
|
16
|
-
import { config } from '../src/config.js';
|
|
17
11
|
import { getStorageManager } from '../src/storageManager.js';
|
|
18
12
|
import { ajax } from '../src/ajax.js';
|
|
13
|
+
import {
|
|
14
|
+
generateBidsParams,
|
|
15
|
+
generateGeneralParams,
|
|
16
|
+
} from '../libraries/riseUtils/index.js';
|
|
19
17
|
|
|
20
18
|
const SUPPORTED_AD_TYPES = [BANNER, VIDEO];
|
|
21
19
|
const BIDDER_CODE = 'publir';
|
|
22
20
|
const ADAPTER_VERSION = '1.0.0';
|
|
23
21
|
const TTL = 360;
|
|
24
22
|
const CURRENCY = 'USD';
|
|
25
|
-
const
|
|
23
|
+
const BASE_URL = 'https://prebid.publir.com/publirPrebidEndPoint';
|
|
26
24
|
const DEFAULT_IMPS_ENDPOINT = 'https://prebidimpst.publir.com/publirPrebidImpressionTracker';
|
|
27
|
-
const SUPPORTED_SYNC_METHODS = {
|
|
28
|
-
IFRAME: 'iframe',
|
|
29
|
-
PIXEL: 'pixel'
|
|
30
|
-
}
|
|
31
25
|
|
|
32
26
|
export const storage = getStorageManager({ bidderCode: BIDDER_CODE });
|
|
33
27
|
export const spec = {
|
|
@@ -40,25 +34,26 @@ export const spec = {
|
|
|
40
34
|
logWarn('pubId is a mandatory param for Publir adapter');
|
|
41
35
|
return false;
|
|
42
36
|
}
|
|
43
|
-
|
|
44
37
|
return true;
|
|
45
38
|
},
|
|
46
39
|
buildRequests: function (validBidRequests, bidderRequest) {
|
|
47
|
-
const
|
|
40
|
+
const combinedRequestsObject = {};
|
|
41
|
+
|
|
48
42
|
const generalObject = validBidRequests[0];
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
43
|
+
combinedRequestsObject.params = generateGeneralParams(generalObject, bidderRequest, ADAPTER_VERSION);
|
|
44
|
+
combinedRequestsObject.bids = generateBidsParams(validBidRequests, bidderRequest);
|
|
45
|
+
combinedRequestsObject.bids.timestamp = timestamp();
|
|
46
|
+
|
|
52
47
|
let options = {
|
|
53
48
|
withCredentials: false
|
|
54
49
|
};
|
|
55
50
|
|
|
56
51
|
return {
|
|
57
52
|
method: 'POST',
|
|
58
|
-
url:
|
|
59
|
-
data:
|
|
53
|
+
url: BASE_URL,
|
|
54
|
+
data: combinedRequestsObject,
|
|
60
55
|
options
|
|
61
|
-
}
|
|
56
|
+
};
|
|
62
57
|
},
|
|
63
58
|
interpretResponse: function ({ body }) {
|
|
64
59
|
const bidResponses = [];
|
|
@@ -109,20 +104,20 @@ export const spec = {
|
|
|
109
104
|
const syncs = [];
|
|
110
105
|
for (const response of serverResponses) {
|
|
111
106
|
if (response.body && response.body.params) {
|
|
112
|
-
if (syncOptions.iframeEnabled && response
|
|
107
|
+
if (syncOptions.iframeEnabled && deepAccess(response, 'body.params.userSyncURL')) {
|
|
113
108
|
syncs.push({
|
|
114
109
|
type: 'iframe',
|
|
115
|
-
url: response
|
|
110
|
+
url: deepAccess(response, 'body.params.userSyncURL')
|
|
116
111
|
});
|
|
117
112
|
}
|
|
118
|
-
if (syncOptions.pixelEnabled && isArray(response
|
|
113
|
+
if (syncOptions.pixelEnabled && isArray(deepAccess(response, 'body.params.userSyncPixels'))) {
|
|
119
114
|
const pixels = response.body.params.userSyncPixels.map(pixel => {
|
|
120
115
|
return {
|
|
121
116
|
type: 'image',
|
|
122
117
|
url: pixel
|
|
123
|
-
}
|
|
124
|
-
})
|
|
125
|
-
syncs.push(...pixels)
|
|
118
|
+
};
|
|
119
|
+
});
|
|
120
|
+
syncs.push(...pixels);
|
|
126
121
|
}
|
|
127
122
|
}
|
|
128
123
|
}
|
|
@@ -141,251 +136,3 @@ export const spec = {
|
|
|
141
136
|
};
|
|
142
137
|
|
|
143
138
|
registerBidder(spec);
|
|
144
|
-
|
|
145
|
-
/**
|
|
146
|
-
* Get floor price
|
|
147
|
-
* @param bid {bid}
|
|
148
|
-
* @returns {Number}
|
|
149
|
-
*/
|
|
150
|
-
function getFloor(bid, mediaType) {
|
|
151
|
-
if (!isFn(bid.getFloor)) {
|
|
152
|
-
return 0;
|
|
153
|
-
}
|
|
154
|
-
let floorResult = bid.getFloor({
|
|
155
|
-
currency: CURRENCY,
|
|
156
|
-
mediaType: mediaType,
|
|
157
|
-
size: '*'
|
|
158
|
-
});
|
|
159
|
-
return floorResult.currency === CURRENCY && floorResult.floor ? floorResult.floor : 0;
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
/**
|
|
163
|
-
* Get the the ad sizes array from the bid
|
|
164
|
-
* @param bid {bid}
|
|
165
|
-
* @returns {Array}
|
|
166
|
-
*/
|
|
167
|
-
function getSizesArray(bid, mediaType) {
|
|
168
|
-
let sizesArray = []
|
|
169
|
-
|
|
170
|
-
if (deepAccess(bid, `mediaTypes.${mediaType}.sizes`)) {
|
|
171
|
-
sizesArray = bid.mediaTypes[mediaType].sizes;
|
|
172
|
-
} else if (Array.isArray(bid.sizes) && bid.sizes.length > 0) {
|
|
173
|
-
sizesArray = bid.sizes;
|
|
174
|
-
}
|
|
175
|
-
|
|
176
|
-
return sizesArray;
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
/**
|
|
180
|
-
* Get schain string value
|
|
181
|
-
* @param schainObject {Object}
|
|
182
|
-
* @returns {string}
|
|
183
|
-
*/
|
|
184
|
-
function getSupplyChain(schainObject) {
|
|
185
|
-
if (isEmpty(schainObject)) {
|
|
186
|
-
return '';
|
|
187
|
-
}
|
|
188
|
-
let scStr = `${schainObject.ver},${schainObject.complete}`;
|
|
189
|
-
schainObject.nodes.forEach((node) => {
|
|
190
|
-
scStr += '!';
|
|
191
|
-
scStr += `${getEncodedValIfNotEmpty(node.asi)},`;
|
|
192
|
-
scStr += `${getEncodedValIfNotEmpty(node.sid)},`;
|
|
193
|
-
scStr += `${node.hp ? encodeURIComponent(node.hp) : ''},`;
|
|
194
|
-
scStr += `${getEncodedValIfNotEmpty(node.rid)},`;
|
|
195
|
-
scStr += `${getEncodedValIfNotEmpty(node.name)},`;
|
|
196
|
-
scStr += `${getEncodedValIfNotEmpty(node.domain)}`;
|
|
197
|
-
});
|
|
198
|
-
return scStr;
|
|
199
|
-
}
|
|
200
|
-
|
|
201
|
-
/**
|
|
202
|
-
* Get encoded node value
|
|
203
|
-
* @param val {string}
|
|
204
|
-
* @returns {string}
|
|
205
|
-
*/
|
|
206
|
-
function getEncodedValIfNotEmpty(val) {
|
|
207
|
-
return !isEmpty(val) ? encodeURIComponent(val) : '';
|
|
208
|
-
}
|
|
209
|
-
|
|
210
|
-
function getAllowedSyncMethod(filterSettings, bidderCode) {
|
|
211
|
-
const iframeConfigsToCheck = ['all', 'iframe'];
|
|
212
|
-
const pixelConfigToCheck = 'image';
|
|
213
|
-
if (filterSettings && iframeConfigsToCheck.some(config => isSyncMethodAllowed(filterSettings[config], bidderCode))) {
|
|
214
|
-
return SUPPORTED_SYNC_METHODS.IFRAME;
|
|
215
|
-
}
|
|
216
|
-
if (!filterSettings || !filterSettings[pixelConfigToCheck] || isSyncMethodAllowed(filterSettings[pixelConfigToCheck], bidderCode)) {
|
|
217
|
-
return SUPPORTED_SYNC_METHODS.PIXEL;
|
|
218
|
-
}
|
|
219
|
-
}
|
|
220
|
-
|
|
221
|
-
/**
|
|
222
|
-
* Check if sync rule is supported
|
|
223
|
-
* @param syncRule {Object}
|
|
224
|
-
* @param bidderCode {string}
|
|
225
|
-
* @returns {boolean}
|
|
226
|
-
*/
|
|
227
|
-
function isSyncMethodAllowed(syncRule, bidderCode) {
|
|
228
|
-
if (!syncRule) {
|
|
229
|
-
return false;
|
|
230
|
-
}
|
|
231
|
-
const isInclude = syncRule.filter === 'include';
|
|
232
|
-
const bidders = isArray(syncRule.bidders) ? syncRule.bidders : [bidderCode];
|
|
233
|
-
return isInclude && contains(bidders, bidderCode);
|
|
234
|
-
}
|
|
235
|
-
|
|
236
|
-
/**
|
|
237
|
-
* get device type
|
|
238
|
-
* @param ua {ua}
|
|
239
|
-
* @returns {string}
|
|
240
|
-
*/
|
|
241
|
-
function getDeviceType(ua) {
|
|
242
|
-
if (/ipad|android 3.0|xoom|sch-i800|playbook|tablet|kindle/i.test(ua.toLowerCase())) {
|
|
243
|
-
return '5';
|
|
244
|
-
}
|
|
245
|
-
if (/iphone|ipod|android|blackberry|opera|mini|windows\sce|palm|smartphone|iemobile/i.test(ua.toLowerCase())) {
|
|
246
|
-
return '4';
|
|
247
|
-
}
|
|
248
|
-
if (/smart[-_\s]?tv|hbbtv|appletv|googletv|hdmi|netcast|viera|nettv|roku|\bdtv\b|sonydtv|inettvbrowser|\btv\b/i.test(ua.toLowerCase())) {
|
|
249
|
-
return '3';
|
|
250
|
-
}
|
|
251
|
-
return '1';
|
|
252
|
-
}
|
|
253
|
-
|
|
254
|
-
function generatePubBidParams(validBidRequests, bidderRequest) {
|
|
255
|
-
const bidsArray = [];
|
|
256
|
-
|
|
257
|
-
if (validBidRequests.length) {
|
|
258
|
-
validBidRequests.forEach(bid => {
|
|
259
|
-
bidsArray.push(generateBidParameters(bid, bidderRequest));
|
|
260
|
-
});
|
|
261
|
-
}
|
|
262
|
-
return bidsArray;
|
|
263
|
-
}
|
|
264
|
-
|
|
265
|
-
/**
|
|
266
|
-
* Generate bid specific parameters
|
|
267
|
-
* @param {bid} bid
|
|
268
|
-
* @param {bidderRequest} bidderRequest
|
|
269
|
-
* @returns {Object} bid specific params object
|
|
270
|
-
*/
|
|
271
|
-
function generateBidParameters(bid, bidderRequest) {
|
|
272
|
-
const { params } = bid;
|
|
273
|
-
const mediaType = isBanner(bid) ? BANNER : VIDEO;
|
|
274
|
-
const sizesArray = getSizesArray(bid, mediaType);
|
|
275
|
-
|
|
276
|
-
// fix floor price in case of NAN
|
|
277
|
-
if (isNaN(params.floorPrice)) {
|
|
278
|
-
params.floorPrice = 0;
|
|
279
|
-
}
|
|
280
|
-
|
|
281
|
-
const bidObject = {
|
|
282
|
-
mediaType,
|
|
283
|
-
adUnitCode: getBidIdParameter('adUnitCode', bid),
|
|
284
|
-
sizes: sizesArray,
|
|
285
|
-
floorPrice: Math.max(getFloor(bid, mediaType), params.floorPrice),
|
|
286
|
-
bidId: getBidIdParameter('bidId', bid),
|
|
287
|
-
bidderRequestId: getBidIdParameter('bidderRequestId', bid),
|
|
288
|
-
loop: getBidIdParameter('bidderRequestsCount', bid),
|
|
289
|
-
transactionId: bid.ortb2Imp?.ext?.tid,
|
|
290
|
-
coppa: 0
|
|
291
|
-
};
|
|
292
|
-
|
|
293
|
-
const pubId = params.pubId;
|
|
294
|
-
if (pubId) {
|
|
295
|
-
bidObject.pubId = pubId;
|
|
296
|
-
}
|
|
297
|
-
|
|
298
|
-
const sua = deepAccess(bid, `ortb2.device.sua`);
|
|
299
|
-
if (sua) {
|
|
300
|
-
bidObject.sua = sua;
|
|
301
|
-
}
|
|
302
|
-
|
|
303
|
-
const coppa = deepAccess(bid, `ortb2.regs.coppa`)
|
|
304
|
-
if (coppa) {
|
|
305
|
-
bidObject.coppa = 1;
|
|
306
|
-
}
|
|
307
|
-
|
|
308
|
-
return bidObject;
|
|
309
|
-
}
|
|
310
|
-
|
|
311
|
-
function isBanner(bid) {
|
|
312
|
-
return bid.mediaTypes && bid.mediaTypes.banner;
|
|
313
|
-
}
|
|
314
|
-
|
|
315
|
-
function getLocalStorage(cookieObjName) {
|
|
316
|
-
if (storage.localStorageIsEnabled()) {
|
|
317
|
-
const lstData = storage.getDataFromLocalStorage(cookieObjName);
|
|
318
|
-
return lstData;
|
|
319
|
-
}
|
|
320
|
-
return '';
|
|
321
|
-
}
|
|
322
|
-
|
|
323
|
-
/**
|
|
324
|
-
* Generate params that are common between all bids
|
|
325
|
-
* @param generalObject
|
|
326
|
-
* @param {bidderRequest} bidderRequest
|
|
327
|
-
* @returns {object} the common params object
|
|
328
|
-
*/
|
|
329
|
-
function generatePubGeneralsParams(generalObject, bidderRequest) {
|
|
330
|
-
const domain = bidderRequest.refererInfo;
|
|
331
|
-
const { syncEnabled, filterSettings } = config.getConfig('userSync') || {};
|
|
332
|
-
const { bidderCode } = bidderRequest;
|
|
333
|
-
const generalBidParams = generalObject.params;
|
|
334
|
-
const timeout = bidderRequest.timeout;
|
|
335
|
-
const generalParams = {
|
|
336
|
-
wrapper_type: 'prebidjs',
|
|
337
|
-
wrapper_vendor: '$$PREBID_GLOBAL$$',
|
|
338
|
-
wrapper_version: '$prebid.version$',
|
|
339
|
-
adapter_version: ADAPTER_VERSION,
|
|
340
|
-
auction_start: bidderRequest.auctionStart,
|
|
341
|
-
publisher_id: generalBidParams.pubId,
|
|
342
|
-
publisher_name: domain,
|
|
343
|
-
site_domain: domain,
|
|
344
|
-
dnt: getDNT() ? 1 : 0,
|
|
345
|
-
device_type: getDeviceType(navigator.userAgent),
|
|
346
|
-
ua: navigator.userAgent,
|
|
347
|
-
is_wrapper: !!generalBidParams.isWrapper,
|
|
348
|
-
session_id: generalBidParams.sessionId || getBidIdParameter('bidderRequestId', generalObject),
|
|
349
|
-
tmax: timeout,
|
|
350
|
-
user_cookie: getLocalStorage('_publir_prebid_creative')
|
|
351
|
-
};
|
|
352
|
-
|
|
353
|
-
const userIdsParam = getBidIdParameter('userId', generalObject);
|
|
354
|
-
if (userIdsParam) {
|
|
355
|
-
generalParams.userIds = JSON.stringify(userIdsParam);
|
|
356
|
-
}
|
|
357
|
-
|
|
358
|
-
const ortb2Metadata = bidderRequest.ortb2 || {};
|
|
359
|
-
if (ortb2Metadata.site) {
|
|
360
|
-
generalParams.site_metadata = JSON.stringify(ortb2Metadata.site);
|
|
361
|
-
}
|
|
362
|
-
if (ortb2Metadata.user) {
|
|
363
|
-
generalParams.user_metadata = JSON.stringify(ortb2Metadata.user);
|
|
364
|
-
}
|
|
365
|
-
|
|
366
|
-
if (syncEnabled) {
|
|
367
|
-
const allowedSyncMethod = getAllowedSyncMethod(filterSettings, bidderCode);
|
|
368
|
-
if (allowedSyncMethod) {
|
|
369
|
-
generalParams.cs_method = allowedSyncMethod;
|
|
370
|
-
}
|
|
371
|
-
}
|
|
372
|
-
|
|
373
|
-
if (bidderRequest.uspConsent) {
|
|
374
|
-
generalParams.us_privacy = bidderRequest.uspConsent;
|
|
375
|
-
}
|
|
376
|
-
|
|
377
|
-
if (bidderRequest && bidderRequest.gdprConsent && bidderRequest.gdprConsent.gdprApplies) {
|
|
378
|
-
generalParams.gdpr = bidderRequest.gdprConsent.gdprApplies;
|
|
379
|
-
generalParams.gdpr_consent = bidderRequest.gdprConsent.consentString;
|
|
380
|
-
}
|
|
381
|
-
|
|
382
|
-
if (generalObject.schain) {
|
|
383
|
-
generalParams.schain = getSupplyChain(generalObject.schain);
|
|
384
|
-
}
|
|
385
|
-
|
|
386
|
-
if (bidderRequest && bidderRequest.refererInfo) {
|
|
387
|
-
generalParams.page_url = deepAccess(bidderRequest, 'refererInfo.page') || deepAccess(window, 'location.href');
|
|
388
|
-
}
|
|
389
|
-
|
|
390
|
-
return generalParams;
|
|
391
|
-
}
|
|
@@ -68,6 +68,10 @@ const NATIVE_ASSET_IMAGE_TYPE = {
|
|
|
68
68
|
'IMAGE': 3
|
|
69
69
|
}
|
|
70
70
|
|
|
71
|
+
const BANNER_CUSTOM_PARAMS = {
|
|
72
|
+
'battr': DATA_TYPES.ARRAY
|
|
73
|
+
}
|
|
74
|
+
|
|
71
75
|
const NET_REVENUE = true;
|
|
72
76
|
const dealChannelValues = {
|
|
73
77
|
1: 'PMP',
|
|
@@ -551,6 +555,14 @@ function _createBannerRequest(bid) {
|
|
|
551
555
|
}
|
|
552
556
|
bannerObj.pos = 0;
|
|
553
557
|
bannerObj.topframe = inIframe() ? 0 : 1;
|
|
558
|
+
|
|
559
|
+
// Adding Banner custom params
|
|
560
|
+
const bannerCustomParams = {...deepAccess(bid, 'ortb2Imp.banner')};
|
|
561
|
+
for (let key in BANNER_CUSTOM_PARAMS) {
|
|
562
|
+
if (bannerCustomParams.hasOwnProperty(key)) {
|
|
563
|
+
bannerObj[key] = _checkParamDataType(key, bannerCustomParams[key], BANNER_CUSTOM_PARAMS[key]);
|
|
564
|
+
}
|
|
565
|
+
}
|
|
554
566
|
} else {
|
|
555
567
|
logWarn(LOG_WARN_PREFIX + 'Error: mediaTypes.banner.size missing for adunit: ' + bid.params.adUnit + '. Ignoring the banner impression in the adunit.');
|
|
556
568
|
bannerObj = UNDEFINED;
|