prebid.js 7.8.0 → 7.11.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/README.md +0 -2
- package/RELEASE_SCHEDULE.md +1 -1
- package/allowedModules.js +3 -0
- package/babelConfig.js +10 -4
- package/dist/33acrossBidAdapter.js +1 -1
- package/dist/adWMGAnalyticsAdapter.js +1 -1
- package/dist/adagioAnalyticsAdapter.js +1 -1
- package/dist/adagioBidAdapter.js +1 -1
- package/dist/adbookpspBidAdapter.js +1 -1
- package/dist/adgenerationBidAdapter.js +1 -1
- package/dist/adkernelAdnAnalyticsAdapter.js +1 -1
- package/dist/adkernelBidAdapter.js +1 -1
- package/dist/adlooxAdServerVideo.js +1 -1
- package/dist/adlooxAnalyticsAdapter.js +1 -1
- package/dist/adlooxRtdProvider.js +1 -1
- package/dist/adnuntiusBidAdapter.js +1 -1
- package/dist/adomikAnalyticsAdapter.js +1 -1
- package/dist/adrelevantisBidAdapter.js +1 -1
- package/dist/adtelligentBidAdapter.js +1 -1
- package/dist/adtrgtmeBidAdapter.js +1 -0
- package/dist/adxcgAnalyticsAdapter.js +1 -1
- package/dist/adxcgBidAdapter.js +1 -1
- package/dist/adxpremiumAnalyticsAdapter.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 -0
- package/dist/andBeyondMediaBidAdapter.js +1 -0
- package/dist/aniviewBidAdapter.js +1 -1
- package/dist/appierAnalyticsAdapter.js +1 -1
- package/dist/appnexusBidAdapter.js +1 -1
- package/dist/asoBidAdapter.js +1 -1
- package/dist/atsAnalyticsAdapter.js +1 -1
- package/dist/audiencerunBidAdapter.js +1 -1
- package/dist/axonixBidAdapter.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/boldwinBidAdapter.js +1 -1
- package/dist/bridgewellBidAdapter.js +1 -1
- package/dist/brightMountainMediaBidAdapter.js +1 -1
- package/dist/browsiRtdProvider.js +1 -1
- package/dist/byDataAnalyticsAdapter.js +1 -1
- package/dist/c1xBidAdapter.js +1 -0
- package/dist/cleanioRtdProvider.js +1 -1
- package/dist/concertAnalyticsAdapter.js +1 -1
- package/dist/concertBidAdapter.js +1 -1
- package/dist/connectadBidAdapter.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/datablocksAnalyticsAdapter.js +1 -1
- package/dist/datawrkzBidAdapter.js +1 -0
- package/dist/debugging-standalone.js +1 -1
- package/dist/dependencies.json +171 -0
- package/dist/dspxBidAdapter.js +1 -1
- package/dist/eplanningAnalyticsAdapter.js +1 -1
- package/dist/eplanningBidAdapter.js +1 -1
- package/dist/finativeBidAdapter.js +1 -1
- package/dist/fintezaAnalyticsAdapter.js +1 -1
- package/dist/freewheel-sspBidAdapter.js +1 -1
- package/dist/getOrigin.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/hadronAnalyticsAdapter.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/imuIdSystem.js +1 -1
- package/dist/inmarBidAdapter.js +1 -1
- package/dist/insticatorBidAdapter.js +1 -1
- package/dist/invisiblyAnalyticsAdapter.js +1 -1
- package/dist/ixBidAdapter.js +1 -1
- package/dist/jixieBidAdapter.js +1 -1
- package/dist/justpremiumBidAdapter.js +1 -1
- package/dist/kargoAnalyticsAdapter.js +1 -1
- package/dist/kargoBidAdapter.js +1 -1
- package/dist/konduitAnalyticsAdapter.js +1 -1
- package/dist/kueezBidAdapter.js +1 -1
- package/dist/lassoBidAdapter.js +1 -1
- package/dist/livewrappedAnalyticsAdapter.js +1 -1
- package/dist/liveyieldAnalyticsAdapter.js +1 -1
- package/dist/logicadBidAdapter.js +1 -1
- package/dist/loglyliftBidAdapter.js +1 -1
- package/dist/malltvAnalyticsAdapter.js +1 -1
- package/dist/marsmediaAnalyticsAdapter.js +1 -1
- package/dist/marsmediaBidAdapter.js +1 -1
- package/dist/mediafuseBidAdapter.js +1 -1
- package/dist/mediakeysBidAdapter.js +1 -1
- package/dist/medianetAnalyticsAdapter.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/nobidBidAdapter.js +1 -1
- package/dist/not-for-prod/prebid.js +182 -176
- package/dist/oguryBidAdapter.js +1 -1
- package/dist/onetagBidAdapter.js +1 -1
- package/dist/ooloAnalyticsAdapter.js +1 -1
- package/dist/openxAnalyticsAdapter.js +1 -1
- package/dist/openxBidAdapter.js +1 -1
- package/dist/openxOrtbBidAdapter.js +1 -1
- package/dist/optimonAnalyticsAdapter.js +1 -1
- package/dist/outbrainBidAdapter.js +1 -1
- package/dist/ozoneBidAdapter.js +1 -1
- package/dist/parrableIdSystem.js +1 -1
- package/dist/pianoDmpAnalyticsAdapter.js +1 -1
- package/dist/pixfutureBidAdapter.js +1 -1
- package/dist/prebid-core.js +1 -1
- package/dist/prebidmanagerAnalyticsAdapter.js +1 -1
- package/dist/publinkIdSystem.js +1 -1
- package/dist/pubmaticAnalyticsAdapter.js +1 -1
- package/dist/pubmaticBidAdapter.js +1 -1
- package/dist/pubperfAnalyticsAdapter.js +1 -1
- package/dist/pubstackAnalyticsAdapter.js +1 -1
- package/dist/pubwiseAnalyticsAdapter.js +1 -1
- package/dist/pubxaiAnalyticsAdapter.js +1 -1
- package/dist/pulsepointAnalyticsAdapter.js +1 -1
- package/dist/pxyzBidAdapter.js +1 -1
- package/dist/quantcastBidAdapter.js +1 -1
- package/dist/readpeakBidAdapter.js +1 -1
- package/dist/realvuAnalyticsAdapter.js +1 -1
- package/dist/relaidoBidAdapter.js +1 -1
- package/dist/relevantAnalyticsAdapter.js +1 -1
- package/dist/rhythmoneBidAdapter.js +1 -1
- package/dist/riseBidAdapter.js +1 -1
- package/dist/rivrAnalyticsAdapter.js +1 -1
- package/dist/roxotAnalyticsAdapter.js +1 -1
- package/dist/rtbhouseBidAdapter.js +1 -1
- package/dist/rubiconAnalyticsAdapter.js +1 -1
- package/dist/rubiconBidAdapter.js +1 -1
- package/dist/scaleableAnalyticsAdapter.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/showheroes-bsBidAdapter.js +1 -1
- package/dist/sigmoidAnalyticsAdapter.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/snigelBidAdapter.js +1 -0
- package/dist/sonobiAnalyticsAdapter.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/staqAnalyticsAdapter.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/terceptAnalyticsAdapter.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/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/yuktamediaAnalyticsAdapter.js +1 -1
- package/dist/zeta_global_sspAnalyticsAdapter.js +1 -1
- package/dist/zeta_global_sspBidAdapter.js +1 -1
- package/gulpHelpers.js +22 -55
- package/gulpfile.js +12 -5
- package/integrationExamples/gpt/1plusXRtdProviderExample.html +2 -4
- package/integrationExamples/gpt/airgridRtdProvider_example.html +1 -4
- package/integrationExamples/gpt/amp/remote.html +1 -1
- package/integrationExamples/gpt/blueconicRtdProvider_example.html +2 -4
- package/integrationExamples/gpt/hadronRtdProvider_example.html +1 -3
- package/integrationExamples/gpt/inskin_example.html +1 -3
- package/integrationExamples/gpt/permutiveRtdProvider_example.html +1 -1
- package/integrationExamples/gpt/prebidServer_example.html +1 -3
- package/integrationExamples/gpt/serverbidServer_example.html +1 -3
- package/integrationExamples/gpt/userId_example.html +1 -3
- package/integrationExamples/postbid/oas/postbid-config.js +5 -5
- package/karma.conf.maker.js +2 -13
- package/libraries/LIBRARIES.md +5 -0
- package/{src → libraries/analyticsAdapter}/AnalyticsAdapter.js +5 -6
- package/{src/adapters/analytics → libraries/analyticsAdapter/examples}/example.js +1 -1
- package/{src/adapters/analytics → libraries/analyticsAdapter/examples}/example2.js +1 -1
- package/modules/.submodules.json +0 -12
- package/modules/1plusXRtdProvider.js +1 -1
- package/modules/33acrossBidAdapter.js +3 -3
- package/modules/adWMGAnalyticsAdapter.js +1 -1
- package/modules/adagioAnalyticsAdapter.js +1 -1
- package/modules/adagioBidAdapter.js +3 -4
- package/modules/adgenerationBidAdapter.js +1 -1
- package/modules/adkernelAdnAnalyticsAdapter.js +1 -1
- package/modules/adkernelBidAdapter.js +2 -1
- package/modules/adlooxAnalyticsAdapter.js +1 -1
- package/modules/admixerBidAdapter.js +1 -1
- package/modules/adnowBidAdapter.js +1 -1
- package/modules/adnuntiusBidAdapter.js +3 -1
- package/modules/adomikAnalyticsAdapter.js +1 -1
- package/modules/adpod.js +1 -1
- package/modules/adrelevantisBidAdapter.js +2 -2
- package/modules/adriverBidAdapter.js +1 -1
- package/modules/adtargetBidAdapter.js +1 -1
- package/modules/adtelligentBidAdapter.js +4 -2
- package/modules/adtrgtmeBidAdapter.js +333 -0
- package/modules/adtrgtmeBidAdapter.md +69 -0
- package/modules/adtrueBidAdapter.js +1 -1
- package/modules/adxcgAnalyticsAdapter.js +1 -1
- package/modules/adxpremiumAnalyticsAdapter.js +2 -2
- package/modules/adyoulikeBidAdapter.js +12 -8
- package/modules/akamaiDapRtdProvider.js +2 -2
- package/modules/andBeyondMediaBidAdapter.js +202 -0
- package/modules/andBeyondMediaBidAdapter.md +79 -0
- package/modules/aniviewBidAdapter.js +2 -2
- package/modules/apacdexBidAdapter.js +3 -3
- package/modules/appierAnalyticsAdapter.js +1 -1
- package/modules/appnexusBidAdapter.js +9 -9
- package/modules/apstreamBidAdapter.js +2 -2
- package/modules/atsAnalyticsAdapter.js +1 -1
- package/modules/betweenBidAdapter.js +1 -1
- package/modules/bidwatchAnalyticsAdapter.js +71 -12
- package/modules/bizzclickBidAdapter.js +1 -1
- package/modules/bliinkBidAdapter.js +1 -1
- package/modules/boldwinBidAdapter.js +16 -7
- package/modules/boldwinBidAdapter.md +17 -0
- package/modules/brightMountainMediaBidAdapter.js +1 -1
- package/modules/browsiRtdProvider.js +26 -12
- package/modules/byDataAnalyticsAdapter.js +2 -2
- package/modules/c1xBidAdapter.js +209 -0
- package/modules/c1xBidAdapter.md +70 -0
- package/modules/cleanioRtdProvider.js +29 -0
- package/modules/cleanmedianetBidAdapter.js +1 -1
- package/modules/colossussspBidAdapter.js +2 -2
- package/modules/concertAnalyticsAdapter.js +1 -1
- package/modules/consentManagementUsp.js +2 -2
- package/modules/consumableBidAdapter.js +21 -3
- package/modules/cpmstarBidAdapter.js +23 -13
- package/modules/criteoBidAdapter.js +47 -5
- package/modules/cwireBidAdapter.js +1 -1
- package/modules/datablocksAnalyticsAdapter.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 +1 -1
- 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/eplanningAnalyticsAdapter.js +1 -1
- package/modules/eplanningBidAdapter.js +3 -3
- package/modules/fabrickIdSystem.js +2 -2
- package/modules/fintezaAnalyticsAdapter.js +2 -2
- package/modules/freewheel-sspBidAdapter.js +1 -1
- 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/gridBidAdapter.js +1 -1
- package/modules/gridNMBidAdapter.js +1 -1
- package/modules/gumgumBidAdapter.js +3 -3
- package/modules/h12mediaBidAdapter.js +1 -1
- package/modules/hadronAnalyticsAdapter.js +3 -3
- package/modules/hadronRtdProvider.js +1 -1
- package/modules/id5AnalyticsAdapter.js +2 -2
- package/modules/impactifyBidAdapter.js +1 -1
- package/modules/improvedigitalBidAdapter.js +5 -2
- package/modules/imuIdSystem.js +40 -28
- package/modules/imuIdSystem.md +1 -0
- package/modules/inskinBidAdapter.js +1 -1
- package/modules/integr8BidAdapter.js +2 -2
- package/modules/intentIqIdSystem.js +2 -2
- package/modules/interactiveOffersBidAdapter.js +1 -1
- package/modules/invisiblyAnalyticsAdapter.js +1 -1
- package/modules/iqmBidAdapter.js +1 -1
- package/modules/ixBidAdapter.js +15 -15
- package/modules/kargoAnalyticsAdapter.js +1 -1
- package/modules/kargoBidAdapter.js +4 -5
- package/modules/konduitAnalyticsAdapter.js +1 -1
- package/modules/krushmediaBidAdapter.js +2 -2
- package/modules/kueezBidAdapter.js +2 -2
- package/modules/lassoBidAdapter.js +3 -3
- package/modules/livewrappedAnalyticsAdapter.js +4 -4
- package/modules/liveyieldAnalyticsAdapter.js +1 -1
- package/modules/lkqdBidAdapter.js +3 -3
- package/modules/loganBidAdapter.js +2 -2
- package/modules/luponmediaBidAdapter.js +3 -3
- package/modules/malltvAnalyticsAdapter.js +1 -1
- package/modules/malltvBidAdapter.js +2 -2
- package/modules/marsmediaAnalyticsAdapter.js +1 -1
- package/modules/mediafuseBidAdapter.js +8 -8
- package/modules/mediakeysBidAdapter.js +2 -2
- package/modules/medianetAnalyticsAdapter.js +1 -1
- package/modules/merkleIdSystem.js +2 -2
- package/modules/mgidBidAdapter.js +2 -2
- package/modules/microadBidAdapter.js +1 -1
- package/modules/mobfoxpbBidAdapter.js +2 -2
- package/modules/newspassidBidAdapter.js +1 -1
- package/modules/nextMillenniumBidAdapter.js +21 -2
- package/modules/nobidBidAdapter.js +3 -3
- package/modules/novatiqIdSystem.js +1 -1
- package/modules/oguryBidAdapter.js +1 -1
- package/modules/ooloAnalyticsAdapter.js +1 -1
- package/modules/open8BidAdapter.js +1 -1
- package/modules/openwebBidAdapter.js +1 -1
- package/modules/openxAnalyticsAdapter.js +6 -745
- package/modules/openxAnalyticsAdapter.md +4 -0
- package/modules/openxBidAdapter.js +3 -5
- package/modules/openxOrtbBidAdapter.js +8 -4
- package/modules/operaadsBidAdapter.js +1 -1
- package/modules/optimonAnalyticsAdapter.js +1 -1
- package/modules/ozoneBidAdapter.js +102 -271
- package/modules/ozoneBidAdapter.md +37 -0
- package/modules/pianoDmpAnalyticsAdapter.js +1 -1
- package/modules/pixfutureBidAdapter.js +1 -1
- package/modules/prebidServerBidAdapter/index.js +7 -7
- package/modules/prebidmanagerAnalyticsAdapter.js +2 -2
- package/modules/priceFloors.js +1 -1
- package/modules/pubmaticAnalyticsAdapter.js +2 -2
- package/modules/pubmaticBidAdapter.js +28 -8
- package/modules/pubperfAnalyticsAdapter.js +1 -1
- package/modules/pubstackAnalyticsAdapter.js +1 -1
- package/modules/pubwiseAnalyticsAdapter.js +2 -2
- package/modules/pubwiseBidAdapter.js +3 -3
- package/modules/pubxBidAdapter.js +1 -1
- package/modules/pubxaiAnalyticsAdapter.js +3 -3
- package/modules/pulsepointAnalyticsAdapter.js +1 -1
- package/modules/pulsepointBidAdapter.js +1 -1
- package/modules/quantcastIdSystem.js +1 -1
- package/modules/radsBidAdapter.js +1 -1
- package/modules/realvuAnalyticsAdapter.js +1 -1
- package/modules/relaidoBidAdapter.js +23 -18
- package/modules/relevantAnalyticsAdapter.js +1 -1
- package/modules/revcontentBidAdapter.js +1 -1
- package/modules/richaudienceBidAdapter.js +1 -1
- package/modules/riseBidAdapter.js +8 -5
- package/modules/riseBidAdapter.md +3 -1
- package/modules/rivrAnalyticsAdapter.js +1 -1
- package/modules/roxotAnalyticsAdapter.js +1 -1
- package/modules/rtbhouseBidAdapter.js +1 -1
- package/modules/rubiconAnalyticsAdapter.js +1 -1
- package/modules/rubiconBidAdapter.js +2 -2
- package/modules/scaleableAnalyticsAdapter.js +1 -1
- package/modules/schain.js +1 -1
- package/modules/sharethroughAnalyticsAdapter.js +1 -1
- package/modules/sharethroughBidAdapter.js +3 -3
- package/modules/shinezBidAdapter.js +2 -2
- package/modules/showheroes-bsBidAdapter.js +131 -49
- package/modules/showheroes-bsBidAdapter.md +49 -0
- package/modules/sigmoidAnalyticsAdapter.js +1 -1
- package/modules/sirdataRtdProvider.js +3 -3
- package/modules/sizeMappingV2.js +1 -1
- package/modules/smaatoBidAdapter.js +2 -2
- package/modules/smartxBidAdapter.js +2 -2
- package/modules/snigelBidAdapter.js +150 -0
- package/modules/snigelBidAdapter.md +46 -0
- package/modules/sonobiAnalyticsAdapter.js +2 -2
- package/modules/sonobiBidAdapter.js +3 -3
- package/modules/sovrnAnalyticsAdapter.js +1 -1
- package/modules/spotxBidAdapter.js +5 -5
- package/modules/sspBCBidAdapter.js +15 -18
- package/modules/staqAnalyticsAdapter.js +2 -2
- package/modules/synacormediaBidAdapter.js +1 -1
- package/modules/taboolaBidAdapter.js +1 -1
- package/modules/tappxBidAdapter.js +4 -4
- package/modules/targetVideoBidAdapter.js +1 -1
- package/modules/terceptAnalyticsAdapter.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 +46 -20
- package/modules/trustpidSystem.js +2 -2
- package/modules/ttdBidAdapter.js +41 -26
- package/modules/ttdBidAdapter.md +4 -10
- package/modules/ucfunnelAnalyticsAdapter.js +1 -1
- package/modules/underdogmediaBidAdapter.js +1 -1
- package/modules/userId/eids.js +5 -0
- package/modules/userId/index.js +11 -7
- package/modules/vdoaiBidAdapter.js +1 -1
- package/modules/vidazooBidAdapter.js +9 -5
- package/modules/videoheroesBidAdapter.js +1 -1
- package/modules/vidoomyBidAdapter.js +1 -1
- package/modules/visxBidAdapter.js +1 -1
- package/modules/vrtcalBidAdapter.js +1 -1
- package/modules/weboramaRtdProvider.js +3 -3
- package/modules/winrBidAdapter.js +1 -1
- package/modules/yahoosspBidAdapter.js +4 -3
- package/modules/yandexBidAdapter.js +1 -1
- package/modules/yieldmoBidAdapter.js +3 -3
- package/modules/yieldoneAnalyticsAdapter.js +1 -1
- package/modules/yieldoneBidAdapter.js +2 -2
- package/modules/yuktamediaAnalyticsAdapter.js +1 -1
- package/modules/zeta_global_sspAnalyticsAdapter.js +1 -1
- package/modules/zeta_global_sspBidAdapter.js +25 -22
- package/package.json +4 -3
- package/src/Renderer.js +1 -1
- package/src/adapterManager.js +3 -3
- package/src/adapters/bidderFactory.js +1 -0
- package/src/auction.js +2 -2
- package/src/bidfactory.js +1 -1
- package/src/config.js +7 -7
- package/src/native.js +53 -58
- package/src/sizeMapping.js +1 -1
- package/src/targeting.js +1 -1
- package/src/userSync.js +1 -1
- package/src/utils.js +1 -1
- package/test/mocks/analyticsStub.js +1 -1
- package/test/spec/AnalyticsAdapter_spec.js +1 -1
- package/test/spec/config_spec.js +4 -0
- package/test/spec/modules/adagioBidAdapter_spec.js +2 -0
- package/test/spec/modules/adnuntiusBidAdapter_spec.js +7 -3
- package/test/spec/modules/adtelligentBidAdapter_spec.js +1 -0
- package/test/spec/modules/adtrgtmeBidAdapter_spec.js +802 -0
- package/test/spec/modules/adyoulikeBidAdapter_spec.js +8 -3
- package/test/spec/modules/andBeyondMediaBidAdapter_spec.js +400 -0
- package/test/spec/modules/bidwatchAnalyticsAdapter_spec.js +17 -1
- package/test/spec/modules/boldwinBidAdapter_spec.js +2 -1
- package/test/spec/modules/browsiRtdProvider_spec.js +40 -1
- package/test/spec/modules/c1xBidAdapter_spec.js +189 -0
- package/test/spec/modules/cleanioRtdProvider_spec.js +23 -0
- package/test/spec/modules/concertAnalyticsAdapter_spec.js +2 -1
- package/test/spec/modules/consumableBidAdapter_spec.js +139 -0
- package/test/spec/modules/cpmstarBidAdapter_spec.js +1 -1
- package/test/spec/modules/criteoBidAdapter_spec.js +169 -38
- package/test/spec/modules/datawrkzBidAdapter_spec.js +656 -0
- package/test/spec/modules/eids_spec.js +32 -0
- package/test/spec/modules/eplanningAnalyticsAdapter_spec.js +2 -2
- package/test/spec/modules/fintezaAnalyticsAdapter_spec.js +2 -1
- package/test/spec/modules/improvedigitalBidAdapter_spec.js +4 -4
- package/test/spec/modules/imuIdSystem_spec.js +20 -4
- package/test/spec/modules/invisiblyAnalyticsAdapter_spec.js +8 -3
- package/test/spec/modules/kargoBidAdapter_spec.js +11 -2
- package/test/spec/modules/konduitAnalyticsAdapter_spec.js +2 -1
- package/test/spec/modules/nextMillenniumBidAdapter_spec.js +17 -0
- package/test/spec/modules/openxAnalyticsAdapter_spec.js +6 -638
- package/test/spec/modules/openxOrtbBidAdapter_spec.js +32 -1
- package/test/spec/modules/optimonAnalyticsAdapter_spec.js +2 -1
- package/test/spec/modules/ozoneBidAdapter_spec.js +367 -511
- package/test/spec/modules/pianoDmpAnalyticsAdapter_spec.js +4 -0
- package/test/spec/modules/prebidmanagerAnalyticsAdapter_spec.js +2 -1
- package/test/spec/modules/pubmaticBidAdapter_spec.js +111 -5
- package/test/spec/modules/pubperfAnalyticsAdapter_spec.js +2 -1
- package/test/spec/modules/pubstackAnalyticsAdapter_spec.js +2 -1
- package/test/spec/modules/pubwiseAnalyticsAdapter_spec.js +3 -3
- package/test/spec/modules/relaidoBidAdapter_spec.js +40 -33
- package/test/spec/modules/riseBidAdapter_spec.js +17 -0
- package/test/spec/modules/sharethroughBidAdapter_spec.js +10 -1
- package/test/spec/modules/showheroes-bsBidAdapter_spec.js +173 -2
- package/test/spec/modules/sigmoidAnalyticsAdapter_spec.js +1 -1
- package/test/spec/modules/snigelBidAdapter_spec.js +296 -0
- package/test/spec/modules/sovrnAnalyticsAdapter_spec.js +2 -1
- package/test/spec/modules/sspBCBidAdapter_spec.js +2 -2
- package/test/spec/modules/tripleliftBidAdapter_spec.js +378 -10
- package/test/spec/modules/ttdBidAdapter_spec.js +113 -34
- package/test/spec/modules/userId_spec.js +38 -2
- package/test/spec/modules/vidazooBidAdapter_spec.js +39 -24
- package/test/spec/modules/yahoosspBidAdapter_spec.js +13 -0
- package/test/spec/modules/yieldoneAnalyticsAdapter_spec.js +5 -1
- package/test/spec/modules/zeta_global_sspBidAdapter_spec.js +61 -2
- package/test/spec/native_spec.js +96 -0
- package/test/spec/unit/core/bidderFactory_spec.js +27 -2
- package/webpack.conf.js +47 -11
|
@@ -1,23 +1,30 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
logInfo,
|
|
3
|
+
logError,
|
|
4
|
+
deepAccess,
|
|
5
|
+
logWarn,
|
|
6
|
+
deepSetValue,
|
|
7
|
+
isArray,
|
|
8
|
+
contains,
|
|
9
|
+
mergeDeep,
|
|
10
|
+
parseUrl
|
|
11
|
+
} from '../src/utils.js';
|
|
2
12
|
import { registerBidder } from '../src/adapters/bidderFactory.js';
|
|
3
13
|
import { BANNER, NATIVE, VIDEO } from '../src/mediaTypes.js';
|
|
4
14
|
import {config} from '../src/config.js';
|
|
5
15
|
import {getPriceBucketString} from '../src/cpmBucketManager.js';
|
|
6
16
|
import { Renderer } from '../src/Renderer.js';
|
|
7
|
-
import {
|
|
8
|
-
|
|
17
|
+
import {getRefererInfo} from '../src/refererDetection.js';
|
|
9
18
|
const BIDDER_CODE = 'ozone';
|
|
10
|
-
|
|
11
|
-
const ORIGIN = 'https://elb.the-ozone-project.com' // applies only to auction & cookie
|
|
19
|
+
const ORIGIN = 'https://elb.the-ozone-project.com'; // applies only to auction & cookie
|
|
12
20
|
const AUCTIONURI = '/openrtb2/auction';
|
|
13
21
|
const OZONECOOKIESYNC = '/static/load-cookie.html';
|
|
14
22
|
const OZONE_RENDERER_URL = 'https://prebid.the-ozone-project.com/ozone-renderer.js';
|
|
15
23
|
const ORIGIN_DEV = 'https://test.ozpr.net';
|
|
16
|
-
|
|
17
|
-
const OZONEVERSION = '2.7.0';
|
|
24
|
+
const OZONEVERSION = '2.8.0';
|
|
18
25
|
export const spec = {
|
|
19
26
|
gvlid: 524,
|
|
20
|
-
aliases: [{code: 'lmc', gvlid: 524}
|
|
27
|
+
aliases: [{code: 'lmc', gvlid: 524}],
|
|
21
28
|
version: OZONEVERSION,
|
|
22
29
|
code: BIDDER_CODE,
|
|
23
30
|
supportedMediaTypes: [VIDEO, BANNER],
|
|
@@ -31,10 +38,6 @@ export const spec = {
|
|
|
31
38
|
'cookieSyncUrl': ORIGIN + OZONECOOKIESYNC,
|
|
32
39
|
'rendererUrl': OZONE_RENDERER_URL
|
|
33
40
|
},
|
|
34
|
-
/**
|
|
35
|
-
* make sure that the whitelabel/default values are available in the propertyBag
|
|
36
|
-
* @param bid Object : the bid
|
|
37
|
-
*/
|
|
38
41
|
loadWhitelabelData(bid) {
|
|
39
42
|
if (this.propertyBag.whitelabel) { return; }
|
|
40
43
|
this.propertyBag.whitelabel = JSON.parse(JSON.stringify(this.whitelabel_defaults));
|
|
@@ -53,7 +56,6 @@ export const spec = {
|
|
|
53
56
|
this.propertyBag.whitelabel.auctionUrl = bidderConfig.endpointOverride.origin + AUCTIONURI;
|
|
54
57
|
this.propertyBag.whitelabel.cookieSyncUrl = bidderConfig.endpointOverride.origin + OZONECOOKIESYNC;
|
|
55
58
|
}
|
|
56
|
-
|
|
57
59
|
if (arr.hasOwnProperty('renderer')) {
|
|
58
60
|
if (arr.renderer.match('%3A%2F%2F')) {
|
|
59
61
|
this.propertyBag.whitelabel.rendererUrl = decodeURIComponent(arr['renderer']);
|
|
@@ -92,16 +94,11 @@ export const spec = {
|
|
|
92
94
|
getRendererUrl() {
|
|
93
95
|
return this.propertyBag.whitelabel.rendererUrl;
|
|
94
96
|
},
|
|
95
|
-
/**
|
|
96
|
-
* Basic check to see whether required parameters are in the request.
|
|
97
|
-
* @param bid
|
|
98
|
-
* @returns {boolean}
|
|
99
|
-
*/
|
|
100
97
|
isBidRequestValid(bid) {
|
|
101
98
|
this.loadWhitelabelData(bid);
|
|
102
99
|
logInfo('isBidRequestValid : ', config.getConfig(), bid);
|
|
103
100
|
let adUnitCode = bid.adUnitCode; // adunit[n].code
|
|
104
|
-
let err1 = 'VALIDATION FAILED : missing {param} : siteId, placementId and publisherId are REQUIRED'
|
|
101
|
+
let err1 = 'VALIDATION FAILED : missing {param} : siteId, placementId and publisherId are REQUIRED';
|
|
105
102
|
if (!(bid.params.hasOwnProperty('placementId'))) {
|
|
106
103
|
logError(err1.replace('{param}', 'placementId'), adUnitCode);
|
|
107
104
|
return false;
|
|
@@ -115,7 +112,7 @@ export const spec = {
|
|
|
115
112
|
return false;
|
|
116
113
|
}
|
|
117
114
|
if (!(bid.params.publisherId).toString().match(/^[a-zA-Z0-9\-]{12}$/)) {
|
|
118
|
-
logError('VALIDATION FAILED : publisherId must be exactly 12
|
|
115
|
+
logError('VALIDATION FAILED : publisherId must be exactly 12 alphanumeric characters including hyphens', adUnitCode);
|
|
119
116
|
return false;
|
|
120
117
|
}
|
|
121
118
|
if (!(bid.params.hasOwnProperty('siteId'))) {
|
|
@@ -160,19 +157,10 @@ export const spec = {
|
|
|
160
157
|
}
|
|
161
158
|
return true;
|
|
162
159
|
},
|
|
163
|
-
|
|
164
|
-
/**
|
|
165
|
-
* Split this out so that we can validate the placementId and also the override GET parameter ozstoredrequest
|
|
166
|
-
* @param placementId
|
|
167
|
-
*/
|
|
168
160
|
isValidPlacementId(placementId) {
|
|
169
161
|
return placementId.toString().match(/^[0-9]{10}$/);
|
|
170
162
|
},
|
|
171
|
-
|
|
172
163
|
buildRequests(validBidRequests, bidderRequest) {
|
|
173
|
-
// convert Native ORTB definition to old-style prebid native definition
|
|
174
|
-
validBidRequests = convertOrtbRequestToProprietaryNative(validBidRequests);
|
|
175
|
-
|
|
176
164
|
this.loadWhitelabelData(validBidRequests[0]);
|
|
177
165
|
this.propertyBag.buildRequestsStart = new Date().getTime();
|
|
178
166
|
let whitelabelBidder = this.propertyBag.whitelabel.bidder; // by default = ozone
|
|
@@ -193,14 +181,13 @@ export const spec = {
|
|
|
193
181
|
singleRequest = singleRequest !== false; // undefined & true will be true
|
|
194
182
|
logInfo(`config ${whitelabelBidder}.singleRequest : `, singleRequest);
|
|
195
183
|
let ozoneRequest = {}; // we only want to set specific properties on this, not validBidRequests[0].params
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
184
|
+
logInfo('going to get ortb2 from bidder request...');
|
|
185
|
+
let fpd = deepAccess(bidderRequest, 'ortb2', null);
|
|
186
|
+
logInfo('got fpd: ', fpd);
|
|
199
187
|
if (fpd && deepAccess(fpd, 'user')) {
|
|
200
188
|
logInfo('added FPD user object');
|
|
201
189
|
ozoneRequest.user = fpd.user;
|
|
202
190
|
}
|
|
203
|
-
|
|
204
191
|
const getParams = this.getGetParametersAsObject();
|
|
205
192
|
const wlOztestmodeKey = whitelabelPrefix + 'testmode';
|
|
206
193
|
const isTestMode = getParams[wlOztestmodeKey] || null; // this can be any string, it's used for testing ads
|
|
@@ -212,7 +199,8 @@ export const spec = {
|
|
|
212
199
|
let placementId = placementIdOverrideFromGetParam || this.getPlacementId(ozoneBidRequest); // prefer to use a valid override param, else the bidRequest placement Id
|
|
213
200
|
obj.id = ozoneBidRequest.bidId; // this causes an error if we change it to something else, even if you update the bidRequest object: "WARNING: Bidder ozone made bid for unknown request ID: mb7953.859498327448. Ignoring."
|
|
214
201
|
obj.tagid = placementId;
|
|
215
|
-
|
|
202
|
+
let parsed = parseUrl(getRefererInfo().page);
|
|
203
|
+
obj.secure = parsed.protocol === 'https' ? 1 : 0;
|
|
216
204
|
let arrBannerSizes = [];
|
|
217
205
|
if (!ozoneBidRequest.hasOwnProperty('mediaTypes')) {
|
|
218
206
|
if (ozoneBidRequest.hasOwnProperty('sizes')) {
|
|
@@ -292,7 +280,7 @@ export const spec = {
|
|
|
292
280
|
}
|
|
293
281
|
}
|
|
294
282
|
if (fpd && deepAccess(fpd, 'site')) {
|
|
295
|
-
logInfo('
|
|
283
|
+
logInfo('adding fpd.site');
|
|
296
284
|
if (deepAccess(obj, 'ext.' + whitelabelBidder + '.customData.0.targeting', false)) {
|
|
297
285
|
obj.ext[whitelabelBidder].customData[0].targeting = Object.assign(obj.ext[whitelabelBidder].customData[0].targeting, fpd.site);
|
|
298
286
|
} else {
|
|
@@ -304,7 +292,6 @@ export const spec = {
|
|
|
304
292
|
}
|
|
305
293
|
return obj;
|
|
306
294
|
});
|
|
307
|
-
|
|
308
295
|
let extObj = {};
|
|
309
296
|
extObj[whitelabelBidder] = {};
|
|
310
297
|
extObj[whitelabelBidder][whitelabelPrefix + '_pb_v'] = OZONEVERSION;
|
|
@@ -315,8 +302,7 @@ export const spec = {
|
|
|
315
302
|
extObj[whitelabelBidder].pubcid = userIds.pubcid;
|
|
316
303
|
}
|
|
317
304
|
}
|
|
318
|
-
|
|
319
|
-
extObj[whitelabelBidder].pv = this.getPageId(); // attach the page ID that will be common to all auciton calls for this page if refresh() is called
|
|
305
|
+
extObj[whitelabelBidder].pv = this.getPageId(); // attach the page ID that will be common to all auction calls for this page if refresh() is called
|
|
320
306
|
let ozOmpFloorDollars = this.getWhitelabelConfigItem('ozone.oz_omp_floor'); // valid only if a dollar value (typeof == 'number')
|
|
321
307
|
logInfo(`${whitelabelPrefix}_omp_floor dollar value = `, ozOmpFloorDollars);
|
|
322
308
|
if (typeof ozOmpFloorDollars === 'number') {
|
|
@@ -327,25 +313,22 @@ export const spec = {
|
|
|
327
313
|
let ozWhitelistAdserverKeys = this.getWhitelabelConfigItem('ozone.oz_whitelist_adserver_keys');
|
|
328
314
|
let useOzWhitelistAdserverKeys = isArray(ozWhitelistAdserverKeys) && ozWhitelistAdserverKeys.length > 0;
|
|
329
315
|
extObj[whitelabelBidder][whitelabelPrefix + '_kvp_rw'] = useOzWhitelistAdserverKeys ? 1 : 0;
|
|
330
|
-
if (whitelabelBidder
|
|
316
|
+
if (whitelabelBidder !== 'ozone') {
|
|
331
317
|
logInfo('setting aliases object');
|
|
332
318
|
extObj.prebid = {aliases: {'ozone': whitelabelBidder}};
|
|
333
319
|
}
|
|
334
|
-
if (getParams.hasOwnProperty('ozf')) { extObj[whitelabelBidder]['ozf'] = getParams.ozf
|
|
335
|
-
if (getParams.hasOwnProperty('ozpf')) { extObj[whitelabelBidder]['ozpf'] = getParams.ozpf
|
|
320
|
+
if (getParams.hasOwnProperty('ozf')) { extObj[whitelabelBidder]['ozf'] = getParams.ozf === 'true' || getParams.ozf === '1' ? 1 : 0; }
|
|
321
|
+
if (getParams.hasOwnProperty('ozpf')) { extObj[whitelabelBidder]['ozpf'] = getParams.ozpf === 'true' || getParams.ozpf === '1' ? 1 : 0; }
|
|
336
322
|
if (getParams.hasOwnProperty('ozrp') && getParams.ozrp.match(/^[0-3]$/)) { extObj[whitelabelBidder]['ozrp'] = parseInt(getParams.ozrp); }
|
|
337
323
|
if (getParams.hasOwnProperty('ozip') && getParams.ozip.match(/^\d+$/)) { extObj[whitelabelBidder]['ozip'] = parseInt(getParams.ozip); }
|
|
338
324
|
if (this.propertyBag.endpointOverride != null) { extObj[whitelabelBidder]['origin'] = this.propertyBag.endpointOverride; }
|
|
339
|
-
|
|
340
|
-
var userExtEids = this.generateEids(validBidRequests); // generate the UserIDs in the correct format for UserId module
|
|
341
|
-
|
|
325
|
+
let userExtEids = deepAccess(validBidRequests, '0.userIdAsEids', []); // generate the UserIDs in the correct format for UserId module
|
|
342
326
|
ozoneRequest.site = {
|
|
343
327
|
'publisher': {'id': htmlParams.publisherId},
|
|
344
|
-
'page':
|
|
328
|
+
'page': getRefererInfo().page,
|
|
345
329
|
'id': htmlParams.siteId
|
|
346
330
|
};
|
|
347
|
-
ozoneRequest.test =
|
|
348
|
-
|
|
331
|
+
ozoneRequest.test = config.getConfig('debug') ? 1 : 0;
|
|
349
332
|
if (bidderRequest && bidderRequest.gdprConsent) {
|
|
350
333
|
logInfo('ADDING GDPR info');
|
|
351
334
|
let apiVersion = deepAccess(bidderRequest, 'gdprConsent.apiVersion', 1);
|
|
@@ -359,20 +342,18 @@ export const spec = {
|
|
|
359
342
|
logInfo('WILL NOT ADD GDPR info; no bidderRequest.gdprConsent object');
|
|
360
343
|
}
|
|
361
344
|
if (bidderRequest && bidderRequest.uspConsent) {
|
|
362
|
-
logInfo('ADDING
|
|
363
|
-
deepSetValue(ozoneRequest, '
|
|
345
|
+
logInfo('ADDING USP consent info');
|
|
346
|
+
deepSetValue(ozoneRequest, 'regs.ext.us_privacy', bidderRequest.uspConsent);
|
|
364
347
|
} else {
|
|
365
|
-
logInfo('WILL NOT ADD
|
|
348
|
+
logInfo('WILL NOT ADD USP consent info; no bidderRequest.uspConsent.');
|
|
366
349
|
}
|
|
367
350
|
if (schain) { // we set this while iterating over the bids
|
|
368
351
|
logInfo('schain found');
|
|
369
352
|
deepSetValue(ozoneRequest, 'source.ext.schain', schain);
|
|
370
353
|
}
|
|
371
|
-
|
|
372
354
|
if (config.getConfig('coppa') === true) {
|
|
373
355
|
deepSetValue(ozoneRequest, 'regs.coppa', 1);
|
|
374
356
|
}
|
|
375
|
-
|
|
376
357
|
if (singleRequest) {
|
|
377
358
|
logInfo('buildRequests starting to generate response for a single request');
|
|
378
359
|
ozoneRequest.id = bidderRequest.auctionId; // Unique ID of the bid request, provided by the exchange.
|
|
@@ -414,19 +395,6 @@ export const spec = {
|
|
|
414
395
|
logInfo(`buildRequests going to return for non-single at time ${this.propertyBag.buildRequestsEnd} (took ${this.propertyBag.buildRequestsEnd - this.propertyBag.buildRequestsStart}ms): `, arrRet);
|
|
415
396
|
return arrRet;
|
|
416
397
|
},
|
|
417
|
-
/**
|
|
418
|
-
* parse a bidRequestRef that contains getFloor(), get all the data from it for the sizes & media requested for this bid & return an object containing floor data you can send to auciton endpoint
|
|
419
|
-
* @param bidRequestRef object = a valid bid request object reference
|
|
420
|
-
* @return object
|
|
421
|
-
*
|
|
422
|
-
* call:
|
|
423
|
-
* bidObj.getFloor({
|
|
424
|
-
currency: 'USD', <- currency to return the value in
|
|
425
|
-
mediaType: ‘banner’,
|
|
426
|
-
size: ‘*’ <- or [300,250] or [[300,250],[640,480]]
|
|
427
|
-
* });
|
|
428
|
-
*
|
|
429
|
-
*/
|
|
430
398
|
getFloorObjectForAuction(bidRequestRef) {
|
|
431
399
|
const mediaTypesSizes = {
|
|
432
400
|
banner: deepAccess(bidRequestRef, 'mediaTypes.banner.sizes', null),
|
|
@@ -447,16 +415,6 @@ export const spec = {
|
|
|
447
415
|
logInfo('getFloorObjectForAuction returning : ', JSON.parse(JSON.stringify(ret)));
|
|
448
416
|
return ret;
|
|
449
417
|
},
|
|
450
|
-
/**
|
|
451
|
-
* Interpret the response if the array contains BIDDER elements, in the format: [ [bidder1 bid 1, bidder1 bid 2], [bidder2 bid 1, bidder2 bid 2] ]
|
|
452
|
-
* NOte that in singleRequest mode this will be called once, else it will be called for each adSlot's response
|
|
453
|
-
*
|
|
454
|
-
* Updated April 2019 to return all bids, not just the one we decide is the 'winner'
|
|
455
|
-
*
|
|
456
|
-
* @param serverResponse
|
|
457
|
-
* @param request
|
|
458
|
-
* @returns {*}
|
|
459
|
-
*/
|
|
460
418
|
interpretResponse(serverResponse, request) {
|
|
461
419
|
if (request && request.bidderRequest && request.bidderRequest.bids) { this.loadWhitelabelData(request.bidderRequest.bids[0]); }
|
|
462
420
|
let startTime = new Date().getTime();
|
|
@@ -478,15 +436,12 @@ export const spec = {
|
|
|
478
436
|
enhancedAdserverTargeting = true;
|
|
479
437
|
}
|
|
480
438
|
logInfo('enhancedAdserverTargeting', enhancedAdserverTargeting);
|
|
481
|
-
|
|
482
439
|
serverResponse.seatbid = injectAdIdsIntoAllBidResponses(serverResponse.seatbid); // we now make sure that each bid in the bidresponse has a unique (within page) adId attribute.
|
|
483
|
-
|
|
484
440
|
serverResponse.seatbid = this.removeSingleBidderMultipleBids(serverResponse.seatbid);
|
|
485
441
|
let ozOmpFloorDollars = this.getWhitelabelConfigItem('ozone.oz_omp_floor'); // valid only if a dollar value (typeof == 'number')
|
|
486
442
|
let addOzOmpFloorDollars = typeof ozOmpFloorDollars === 'number';
|
|
487
443
|
let ozWhitelistAdserverKeys = this.getWhitelabelConfigItem('ozone.oz_whitelist_adserver_keys');
|
|
488
444
|
let useOzWhitelistAdserverKeys = isArray(ozWhitelistAdserverKeys) && ozWhitelistAdserverKeys.length > 0;
|
|
489
|
-
|
|
490
445
|
for (let i = 0; i < serverResponse.seatbid.length; i++) {
|
|
491
446
|
let sb = serverResponse.seatbid[i];
|
|
492
447
|
for (let j = 0; j < sb.bid.length; j++) {
|
|
@@ -499,17 +454,30 @@ export const spec = {
|
|
|
499
454
|
let isVideo = false;
|
|
500
455
|
let bidType = deepAccess(thisBid, 'ext.prebid.type');
|
|
501
456
|
logInfo(`this bid type is : ${bidType}`, j);
|
|
457
|
+
let adserverTargeting = {};
|
|
502
458
|
if (bidType === VIDEO) {
|
|
503
459
|
isVideo = true;
|
|
460
|
+
this.setBidMediaTypeIfNotExist(thisBid, VIDEO);
|
|
504
461
|
videoContext = this.getVideoContextForBidId(thisBid.bidId, request.bidderRequest.bids); // should be instream or outstream (or null if error)
|
|
505
462
|
if (videoContext === 'outstream') {
|
|
506
|
-
logInfo('going to attach a renderer to OUTSTREAM video : ', j);
|
|
463
|
+
logInfo('going to set thisBid.mediaType = VIDEO & attach a renderer to OUTSTREAM video : ', j);
|
|
507
464
|
thisBid.renderer = newRenderer(thisBid.bidId);
|
|
508
465
|
} else {
|
|
509
|
-
logInfo('bid is not an outstream video, will not attach a renderer: ', j);
|
|
466
|
+
logInfo('bid is not an outstream video, will set thisBid.mediaType = VIDEO and thisBid.vastUrl and not attach a renderer: ', j);
|
|
467
|
+
thisBid.vastUrl = `https://${deepAccess(thisBid, 'ext.prebid.targeting.hb_cache_host', 'missing_host')}${deepAccess(thisBid, 'ext.prebid.targeting.hb_cache_path', 'missing_path')}?id=${deepAccess(thisBid, 'ext.prebid.targeting.hb_cache_id', 'missing_id')}`; // need to see if this works ok for ozone
|
|
468
|
+
adserverTargeting['hb_cache_host'] = deepAccess(thisBid, 'ext.prebid.targeting.hb_cache_host', 'no-host');
|
|
469
|
+
adserverTargeting['hb_cache_path'] = deepAccess(thisBid, 'ext.prebid.targeting.hb_cache_path', 'no-path');
|
|
470
|
+
if (!thisBid.hasOwnProperty('videoCacheKey')) {
|
|
471
|
+
let videoCacheUuid = deepAccess(thisBid, 'ext.prebid.targeting.hb_uuid', 'no_hb_uuid');
|
|
472
|
+
logInfo(`Adding videoCacheKey: ${videoCacheUuid}`);
|
|
473
|
+
thisBid.videoCacheKey = videoCacheUuid;
|
|
474
|
+
} else {
|
|
475
|
+
logInfo('videoCacheKey already exists on the bid object, will not add it');
|
|
476
|
+
}
|
|
510
477
|
}
|
|
478
|
+
} else {
|
|
479
|
+
this.setBidMediaTypeIfNotExist(thisBid, BANNER);
|
|
511
480
|
}
|
|
512
|
-
let adserverTargeting = {};
|
|
513
481
|
if (enhancedAdserverTargeting) {
|
|
514
482
|
let allBidsForThisBidid = ozoneGetAllBidsForBidId(thisBid.bidId, serverResponse.seatbid);
|
|
515
483
|
logInfo('Going to iterate allBidsForThisBidId', allBidsForThisBidid);
|
|
@@ -552,7 +520,8 @@ export const spec = {
|
|
|
552
520
|
adserverTargeting[whitelabelPrefix + '_auc_id'] = String(request.bidderRequest.auctionId);
|
|
553
521
|
adserverTargeting[whitelabelPrefix + '_winner'] = String(winningSeat);
|
|
554
522
|
adserverTargeting[whitelabelPrefix + '_bid'] = 'true';
|
|
555
|
-
|
|
523
|
+
adserverTargeting[whitelabelPrefix + '_cache_id'] = deepAccess(thisBid, 'ext.prebid.targeting.hb_cache_id', 'no-id');
|
|
524
|
+
adserverTargeting[whitelabelPrefix + '_uuid'] = deepAccess(thisBid, 'ext.prebid.targeting.hb_uuid', 'no-id');
|
|
556
525
|
if (enhancedAdserverTargeting) {
|
|
557
526
|
adserverTargeting[whitelabelPrefix + '_imp_id'] = String(winningBid.impid);
|
|
558
527
|
adserverTargeting[whitelabelPrefix + '_pb_v'] = OZONEVERSION;
|
|
@@ -570,26 +539,24 @@ export const spec = {
|
|
|
570
539
|
}
|
|
571
540
|
}
|
|
572
541
|
let endTime = new Date().getTime();
|
|
573
|
-
logInfo(`interpretResponse going to return at time ${endTime} (took ${endTime - startTime}ms) Time from buildRequests Start -> interpretRequests End = ${endTime - this.propertyBag.buildRequestsStart}ms
|
|
542
|
+
logInfo(`interpretResponse going to return at time ${endTime} (took ${endTime - startTime}ms) Time from buildRequests Start -> interpretRequests End = ${endTime - this.propertyBag.buildRequestsStart}ms`);
|
|
543
|
+
logInfo('interpretResponse arrAllBids (serialised): ', JSON.parse(JSON.stringify(arrAllBids))); // this is ok to log because the renderer has not been attached yet
|
|
574
544
|
return arrAllBids;
|
|
575
545
|
},
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
546
|
+
setBidMediaTypeIfNotExist(thisBid, mediaType) {
|
|
547
|
+
if (!thisBid.hasOwnProperty('mediaType')) {
|
|
548
|
+
logInfo(`setting thisBid.mediaType = ${mediaType}`);
|
|
549
|
+
thisBid.mediaType = mediaType;
|
|
550
|
+
} else {
|
|
551
|
+
logInfo(`found value for thisBid.mediaType: ${thisBid.mediaType}`);
|
|
552
|
+
}
|
|
553
|
+
},
|
|
583
554
|
getWhitelabelConfigItem(ozoneVersion) {
|
|
584
|
-
if (this.propertyBag.whitelabel.bidder
|
|
555
|
+
if (this.propertyBag.whitelabel.bidder === 'ozone') { return config.getConfig(ozoneVersion); }
|
|
585
556
|
let whitelabelledSearch = ozoneVersion.replace('ozone', this.propertyBag.whitelabel.bidder);
|
|
586
557
|
whitelabelledSearch = whitelabelledSearch.replace('oz_', this.propertyBag.whitelabel.keyPrefix + '_');
|
|
587
558
|
return config.getConfig(whitelabelledSearch);
|
|
588
559
|
},
|
|
589
|
-
/**
|
|
590
|
-
* If a bidder bids for > 1 size for an adslot, allow only the highest bid
|
|
591
|
-
* @param seatbid object (serverResponse.seatbid)
|
|
592
|
-
*/
|
|
593
560
|
removeSingleBidderMultipleBids(seatbid) {
|
|
594
561
|
var ret = [];
|
|
595
562
|
for (let i = 0; i < seatbid.length; i++) {
|
|
@@ -620,7 +587,7 @@ export const spec = {
|
|
|
620
587
|
}
|
|
621
588
|
if (optionsType.iframeEnabled) {
|
|
622
589
|
var arrQueryString = [];
|
|
623
|
-
if (
|
|
590
|
+
if (config.getConfig('debug')) {
|
|
624
591
|
arrQueryString.push('pbjs_debug=true');
|
|
625
592
|
}
|
|
626
593
|
arrQueryString.push('gdpr=' + (deepAccess(gdprConsent, 'gdprApplies', false) ? '1' : '0'));
|
|
@@ -633,7 +600,6 @@ export const spec = {
|
|
|
633
600
|
arrQueryString.push('siteId=' + this.cookieSyncBag.siteId);
|
|
634
601
|
arrQueryString.push('cb=' + Date.now());
|
|
635
602
|
arrQueryString.push('bidder=' + this.propertyBag.whitelabel.bidder);
|
|
636
|
-
|
|
637
603
|
var strQueryString = arrQueryString.join('&');
|
|
638
604
|
if (strQueryString.length > 0) {
|
|
639
605
|
strQueryString = '?' + strQueryString;
|
|
@@ -645,11 +611,6 @@ export const spec = {
|
|
|
645
611
|
}];
|
|
646
612
|
}
|
|
647
613
|
},
|
|
648
|
-
/**
|
|
649
|
-
* Find the bid matching the bidId in the request object
|
|
650
|
-
* get instream or outstream if this was a video request else null
|
|
651
|
-
* @return object|null
|
|
652
|
-
*/
|
|
653
614
|
getBidRequestForBidId(bidId, arrBids) {
|
|
654
615
|
for (let i = 0; i < arrBids.length; i++) {
|
|
655
616
|
if (arrBids[i].bidId === bidId) { // bidId in the request comes back as impid in the seatbid bids
|
|
@@ -658,13 +619,6 @@ export const spec = {
|
|
|
658
619
|
}
|
|
659
620
|
return null;
|
|
660
621
|
},
|
|
661
|
-
/**
|
|
662
|
-
* Locate the bid inside the arrBids for this bidId, then discover the video context, and return it.
|
|
663
|
-
* IF the bid cannot be found return null, else return a string.
|
|
664
|
-
* @param bidId
|
|
665
|
-
* @param arrBids
|
|
666
|
-
* @return string|null
|
|
667
|
-
*/
|
|
668
622
|
getVideoContextForBidId(bidId, arrBids) {
|
|
669
623
|
let requestBid = this.getBidRequestForBidId(bidId, arrBids);
|
|
670
624
|
if (requestBid != null) {
|
|
@@ -672,11 +626,6 @@ export const spec = {
|
|
|
672
626
|
}
|
|
673
627
|
return null;
|
|
674
628
|
},
|
|
675
|
-
/**
|
|
676
|
-
* This is used for cookie sync, not auction call
|
|
677
|
-
* Look for pubcid & all the other IDs according to http://prebid.org/dev-docs/modules/userId.html
|
|
678
|
-
* @return map
|
|
679
|
-
*/
|
|
680
629
|
findAllUserIds(bidRequest) {
|
|
681
630
|
var ret = {};
|
|
682
631
|
let searchKeysSingle = ['pubcid', 'tdid', 'idl_env', 'criteoId', 'lotamePanoramaId', 'fabrickId'];
|
|
@@ -710,10 +659,6 @@ export const spec = {
|
|
|
710
659
|
if (sharedid) {
|
|
711
660
|
ret['sharedid'] = sharedid;
|
|
712
661
|
}
|
|
713
|
-
let sharedidthird = deepAccess(bidRequest.userId, 'sharedid.third');
|
|
714
|
-
if (sharedidthird) {
|
|
715
|
-
ret['sharedidthird'] = sharedidthird;
|
|
716
|
-
}
|
|
717
662
|
}
|
|
718
663
|
if (!ret.hasOwnProperty('pubcid')) {
|
|
719
664
|
let pubcid = deepAccess(bidRequest, 'crumbs.pubcid');
|
|
@@ -723,20 +668,9 @@ export const spec = {
|
|
|
723
668
|
}
|
|
724
669
|
return ret;
|
|
725
670
|
},
|
|
726
|
-
/**
|
|
727
|
-
* Convenient method to get the value we need for the placementId - ONLY from the bidRequest - NOT taking into account any GET override ID
|
|
728
|
-
* @param bidRequest
|
|
729
|
-
* @return string
|
|
730
|
-
*/
|
|
731
671
|
getPlacementId(bidRequest) {
|
|
732
672
|
return (bidRequest.params.placementId).toString();
|
|
733
673
|
},
|
|
734
|
-
/**
|
|
735
|
-
* GET parameter introduced in 2.2.0 : ozstoredrequest
|
|
736
|
-
* IF the GET parameter exists then it must validate for placementId correctly
|
|
737
|
-
* IF there's a $_GET['ozstoredrequest'] & it's valid then return this. Else return null.
|
|
738
|
-
* @returns null|string
|
|
739
|
-
*/
|
|
740
674
|
getPlacementIdOverrideFromGetParam() {
|
|
741
675
|
let whitelabelPrefix = this.propertyBag.whitelabel.keyPrefix;
|
|
742
676
|
let arr = this.getGetParametersAsObject();
|
|
@@ -750,68 +684,19 @@ export const spec = {
|
|
|
750
684
|
}
|
|
751
685
|
return null;
|
|
752
686
|
},
|
|
753
|
-
/**
|
|
754
|
-
* Generate an object we can append to the auction request, containing user data formatted correctly for different ssps
|
|
755
|
-
* http://prebid.org/dev-docs/modules/userId.html
|
|
756
|
-
* @param validBidRequests
|
|
757
|
-
* @return {Array}
|
|
758
|
-
*/
|
|
759
|
-
generateEids(validBidRequests) {
|
|
760
|
-
let eids;
|
|
761
|
-
const bidRequest = validBidRequests[0];
|
|
762
|
-
if (bidRequest && bidRequest.userId) {
|
|
763
|
-
eids = bidRequest.userIdAsEids;
|
|
764
|
-
this.handleTTDId(eids, validBidRequests);
|
|
765
|
-
}
|
|
766
|
-
return eids;
|
|
767
|
-
},
|
|
768
|
-
handleTTDId(eids, validBidRequests) {
|
|
769
|
-
let ttdId = null;
|
|
770
|
-
let adsrvrOrgId = config.getConfig('adsrvrOrgId');
|
|
771
|
-
if (isStr(deepAccess(validBidRequests, '0.userId.tdid'))) {
|
|
772
|
-
ttdId = validBidRequests[0].userId.tdid;
|
|
773
|
-
} else if (adsrvrOrgId && isStr(adsrvrOrgId.TDID)) {
|
|
774
|
-
ttdId = adsrvrOrgId.TDID;
|
|
775
|
-
}
|
|
776
|
-
if (ttdId !== null) {
|
|
777
|
-
eids.push({
|
|
778
|
-
'source': 'adserver.org',
|
|
779
|
-
'uids': [{
|
|
780
|
-
'id': ttdId,
|
|
781
|
-
'atype': 1,
|
|
782
|
-
'ext': {
|
|
783
|
-
'rtiPartner': 'TDID'
|
|
784
|
-
}
|
|
785
|
-
}]
|
|
786
|
-
});
|
|
787
|
-
}
|
|
788
|
-
},
|
|
789
687
|
getGetParametersAsObject() {
|
|
790
|
-
let
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
for (let index = 0; index < items.length; index++) {
|
|
794
|
-
tmp = items[index].split('=');
|
|
795
|
-
ret[tmp[0]] = tmp[1];
|
|
796
|
-
}
|
|
797
|
-
return ret;
|
|
688
|
+
let parsed = parseUrl(getRefererInfo().page);
|
|
689
|
+
logInfo('getGetParametersAsObject found:', parsed.search);
|
|
690
|
+
return parsed.search;
|
|
798
691
|
},
|
|
799
|
-
/**
|
|
800
|
-
* Do we have to block this request? Could be due to config values (no longer checking gdpr)
|
|
801
|
-
* @return {boolean|*[]} true = block the request, else false
|
|
802
|
-
*/
|
|
803
692
|
blockTheRequest() {
|
|
804
693
|
let ozRequest = this.getWhitelabelConfigItem('ozone.oz_request');
|
|
805
694
|
if (typeof ozRequest == 'boolean' && !ozRequest) {
|
|
806
|
-
logWarn(`Will not allow auction : ${this.propertyBag.whitelabel.keyPrefix}
|
|
695
|
+
logWarn(`Will not allow auction : ${this.propertyBag.whitelabel.keyPrefix}_request is set to false`);
|
|
807
696
|
return true;
|
|
808
697
|
}
|
|
809
698
|
return false;
|
|
810
699
|
},
|
|
811
|
-
/**
|
|
812
|
-
* This returns a random ID for this page. It starts off with the current ms timestamp then appends a random component
|
|
813
|
-
* @return {string}
|
|
814
|
-
*/
|
|
815
700
|
getPageId: function() {
|
|
816
701
|
if (this.propertyBag.pageId == null) {
|
|
817
702
|
let randPart = '';
|
|
@@ -829,14 +714,6 @@ export const spec = {
|
|
|
829
714
|
ret = this._unpackVideoConfigIntoIABformat(ret, childConfig);
|
|
830
715
|
return ret;
|
|
831
716
|
},
|
|
832
|
-
/**
|
|
833
|
-
*
|
|
834
|
-
* look in ONE object to get video config (we need to call this multiple times, so child settings override parent)
|
|
835
|
-
* @param ret
|
|
836
|
-
* @param objConfig
|
|
837
|
-
* @return {*}
|
|
838
|
-
* @private
|
|
839
|
-
*/
|
|
840
717
|
_unpackVideoConfigIntoIABformat(ret, objConfig) {
|
|
841
718
|
let arrVideoKeysAllowed = ['mimes', 'minduration', 'maxduration', 'protocols', 'w', 'h', 'startdelay', 'placement', 'linearity', 'skip', 'skipmin', 'skipafter', 'sequence', 'battr', 'maxextended', 'minbitrate', 'maxbitrate', 'boxingallowed', 'playbackmethod', 'playbackend', 'delivery', 'pos', 'companionad', 'api', 'companiontype'];
|
|
842
719
|
for (const key in objConfig) {
|
|
@@ -865,14 +742,6 @@ export const spec = {
|
|
|
865
742
|
objRet = this._addVideoDefaults(objRet, childConfig, true); // child config will override parent config
|
|
866
743
|
return objRet;
|
|
867
744
|
},
|
|
868
|
-
/**
|
|
869
|
-
* modify objRet, adding in default values
|
|
870
|
-
* @param objRet
|
|
871
|
-
* @param objConfig
|
|
872
|
-
* @param addIfMissing
|
|
873
|
-
* @return {*}
|
|
874
|
-
* @private
|
|
875
|
-
*/
|
|
876
745
|
_addVideoDefaults(objRet, objConfig, addIfMissing) {
|
|
877
746
|
let context = deepAccess(objConfig, 'context');
|
|
878
747
|
if (context === 'outstream') {
|
|
@@ -889,15 +758,38 @@ export const spec = {
|
|
|
889
758
|
objRet.skip = skippable ? 1 : 0;
|
|
890
759
|
}
|
|
891
760
|
return objRet;
|
|
761
|
+
},
|
|
762
|
+
getLoggableBidObject(bid) {
|
|
763
|
+
let logObj = {
|
|
764
|
+
ad: bid.ad,
|
|
765
|
+
adId: bid.adId,
|
|
766
|
+
adUnitCode: bid.adUnitCode,
|
|
767
|
+
adm: bid.adm,
|
|
768
|
+
adomain: bid.adomain,
|
|
769
|
+
adserverTargeting: bid.adserverTargeting,
|
|
770
|
+
auctionId: bid.auctionId,
|
|
771
|
+
bidId: bid.bidId,
|
|
772
|
+
bidder: bid.bidder,
|
|
773
|
+
bidderCode: bid.bidderCode,
|
|
774
|
+
cpm: bid.cpm,
|
|
775
|
+
creativeId: bid.creativeId,
|
|
776
|
+
crid: bid.crid,
|
|
777
|
+
currency: bid.currency,
|
|
778
|
+
h: bid.h,
|
|
779
|
+
w: bid.w,
|
|
780
|
+
impid: bid.impid,
|
|
781
|
+
mediaType: bid.mediaType,
|
|
782
|
+
params: bid.params,
|
|
783
|
+
price: bid.price,
|
|
784
|
+
transactionId: bid.transactionId,
|
|
785
|
+
ttl: bid.ttl
|
|
786
|
+
};
|
|
787
|
+
if (bid.hasOwnProperty('floorData')) {
|
|
788
|
+
logObj.floorData = bid.floorData;
|
|
789
|
+
}
|
|
790
|
+
return logObj;
|
|
892
791
|
}
|
|
893
792
|
};
|
|
894
|
-
|
|
895
|
-
/**
|
|
896
|
-
* add a page-level-unique adId element to all server response bids.
|
|
897
|
-
* NOTE that this is destructive - it mutates the serverResponse object sent in as a parameter
|
|
898
|
-
* @param seatbid object (serverResponse.seatbid)
|
|
899
|
-
* @returns seatbid object
|
|
900
|
-
*/
|
|
901
793
|
export function injectAdIdsIntoAllBidResponses(seatbid) {
|
|
902
794
|
logInfo('injectAdIdsIntoAllBidResponses', seatbid);
|
|
903
795
|
for (let i = 0; i < seatbid.length; i++) {
|
|
@@ -908,7 +800,6 @@ export function injectAdIdsIntoAllBidResponses(seatbid) {
|
|
|
908
800
|
}
|
|
909
801
|
return seatbid;
|
|
910
802
|
}
|
|
911
|
-
|
|
912
803
|
export function checkDeepArray(Arr) {
|
|
913
804
|
if (Array.isArray(Arr)) {
|
|
914
805
|
if (Array.isArray(Arr[0])) {
|
|
@@ -920,7 +811,6 @@ export function checkDeepArray(Arr) {
|
|
|
920
811
|
return Arr;
|
|
921
812
|
}
|
|
922
813
|
}
|
|
923
|
-
|
|
924
814
|
export function defaultSize(thebidObj) {
|
|
925
815
|
if (!thebidObj) {
|
|
926
816
|
logInfo('defaultSize received empty bid obj! going to return fixed default size');
|
|
@@ -935,13 +825,6 @@ export function defaultSize(thebidObj) {
|
|
|
935
825
|
returnObject.defaultHeight = checkDeepArray(sizes)[1];
|
|
936
826
|
return returnObject;
|
|
937
827
|
}
|
|
938
|
-
|
|
939
|
-
/**
|
|
940
|
-
* Do the messy searching for the best bid response in the serverResponse.seatbid array matching the requestBid.bidId
|
|
941
|
-
* @param requestBid
|
|
942
|
-
* @param serverResponseSeatBid
|
|
943
|
-
* @returns {*} bid object
|
|
944
|
-
*/
|
|
945
828
|
export function ozoneGetWinnerForRequestBid(requestBidId, serverResponseSeatBid) {
|
|
946
829
|
let thisBidWinner = null;
|
|
947
830
|
let winningSeat = null;
|
|
@@ -960,13 +843,6 @@ export function ozoneGetWinnerForRequestBid(requestBidId, serverResponseSeatBid)
|
|
|
960
843
|
}
|
|
961
844
|
return {'seat': winningSeat, 'bid': thisBidWinner};
|
|
962
845
|
}
|
|
963
|
-
|
|
964
|
-
/**
|
|
965
|
-
* Get a list of all the bids, for this bidId. The keys in the response object will be {seatname} OR {seatname}{w}x{h} if seatname already exists
|
|
966
|
-
* @param matchBidId
|
|
967
|
-
* @param serverResponseSeatBid
|
|
968
|
-
* @returns {} = {ozone|320x600:{obj}, ozone|320x250:{obj}, appnexus|300x250:{obj}, ... }
|
|
969
|
-
*/
|
|
970
846
|
export function ozoneGetAllBidsForBidId(matchBidId, serverResponseSeatBid) {
|
|
971
847
|
let objBids = {};
|
|
972
848
|
for (let j = 0; j < serverResponseSeatBid.length; j++) {
|
|
@@ -986,21 +862,13 @@ export function ozoneGetAllBidsForBidId(matchBidId, serverResponseSeatBid) {
|
|
|
986
862
|
}
|
|
987
863
|
return objBids;
|
|
988
864
|
}
|
|
989
|
-
|
|
990
|
-
/**
|
|
991
|
-
* Round the bid price down according to the granularity
|
|
992
|
-
* @param price
|
|
993
|
-
* @param mediaType = video, banner or native
|
|
994
|
-
*/
|
|
995
865
|
export function getRoundedBid(price, mediaType) {
|
|
996
866
|
const mediaTypeGranularity = config.getConfig(`mediaTypePriceGranularity.${mediaType}`); // might be string or object or nothing; if set then this takes precedence over 'priceGranularity'
|
|
997
867
|
let objBuckets = config.getConfig('customPriceBucket'); // this is always an object - {} if strBuckets is not 'custom'
|
|
998
868
|
let strBuckets = config.getConfig('priceGranularity'); // priceGranularity value, always a string ** if priceGranularity is set to an object then it's always 'custom' **
|
|
999
869
|
let theConfigObject = getGranularityObject(mediaType, mediaTypeGranularity, strBuckets, objBuckets);
|
|
1000
870
|
let theConfigKey = getGranularityKeyName(mediaType, mediaTypeGranularity, strBuckets);
|
|
1001
|
-
|
|
1002
871
|
logInfo('getRoundedBid. price:', price, 'mediaType:', mediaType, 'configkey:', theConfigKey, 'configObject:', theConfigObject, 'mediaTypeGranularity:', mediaTypeGranularity, 'strBuckets:', strBuckets);
|
|
1003
|
-
|
|
1004
872
|
let priceStringsObj = getPriceBucketString(
|
|
1005
873
|
price,
|
|
1006
874
|
theConfigObject,
|
|
@@ -1021,13 +889,6 @@ export function getRoundedBid(price, mediaType) {
|
|
|
1021
889
|
}
|
|
1022
890
|
return priceStringsObj['auto'];
|
|
1023
891
|
}
|
|
1024
|
-
|
|
1025
|
-
/**
|
|
1026
|
-
* return the key to use to get the value out of the priceStrings object, taking into account anything at
|
|
1027
|
-
* config.priceGranularity level or config.mediaType.xxx level
|
|
1028
|
-
* I've noticed that the key specified by prebid core : config.getConfig('priceGranularity') does not properly
|
|
1029
|
-
* take into account the 2-levels of config
|
|
1030
|
-
*/
|
|
1031
892
|
export function getGranularityKeyName(mediaType, mediaTypeGranularity, strBuckets) {
|
|
1032
893
|
if (typeof mediaTypeGranularity === 'string') {
|
|
1033
894
|
return mediaTypeGranularity;
|
|
@@ -1040,11 +901,6 @@ export function getGranularityKeyName(mediaType, mediaTypeGranularity, strBucket
|
|
|
1040
901
|
}
|
|
1041
902
|
return 'auto'; // fall back to a default key - should literally never be needed.
|
|
1042
903
|
}
|
|
1043
|
-
|
|
1044
|
-
/**
|
|
1045
|
-
* return the object to use to create the custom value of the priceStrings object, taking into account anything at
|
|
1046
|
-
* config.priceGranularity level or config.mediaType.xxx level
|
|
1047
|
-
*/
|
|
1048
904
|
export function getGranularityObject(mediaType, mediaTypeGranularity, strBuckets, objBuckets) {
|
|
1049
905
|
if (typeof mediaTypeGranularity === 'object') {
|
|
1050
906
|
return mediaTypeGranularity;
|
|
@@ -1054,12 +910,6 @@ export function getGranularityObject(mediaType, mediaTypeGranularity, strBuckets
|
|
|
1054
910
|
}
|
|
1055
911
|
return '';
|
|
1056
912
|
}
|
|
1057
|
-
|
|
1058
|
-
/**
|
|
1059
|
-
* We expect to be able to find a standard set of properties on winning bid objects; add them here.
|
|
1060
|
-
* @param seatBid
|
|
1061
|
-
* @returns {*}
|
|
1062
|
-
*/
|
|
1063
913
|
export function ozoneAddStandardProperties(seatBid, defaultWidth, defaultHeight) {
|
|
1064
914
|
seatBid.cpm = seatBid.price;
|
|
1065
915
|
seatBid.bidId = seatBid.impid;
|
|
@@ -1073,12 +923,6 @@ export function ozoneAddStandardProperties(seatBid, defaultWidth, defaultHeight)
|
|
|
1073
923
|
seatBid.ttl = 300;
|
|
1074
924
|
return seatBid;
|
|
1075
925
|
}
|
|
1076
|
-
|
|
1077
|
-
/**
|
|
1078
|
-
*
|
|
1079
|
-
* @param objVideo will be like {"playerSize":[640,480],"mimes":["video/mp4"],"context":"outstream"} or POSSIBLY {"playerSize":[[640,480]],"mimes":["video/mp4"],"context":"outstream"}
|
|
1080
|
-
* @return object {w,h} or null
|
|
1081
|
-
*/
|
|
1082
926
|
export function getWidthAndHeightFromVideoObject(objVideo) {
|
|
1083
927
|
let playerSize = getPlayerSizeFromObject(objVideo);
|
|
1084
928
|
if (!playerSize) {
|
|
@@ -1098,11 +942,6 @@ export function getWidthAndHeightFromVideoObject(objVideo) {
|
|
|
1098
942
|
}
|
|
1099
943
|
return ({'w': playerSize[0], 'h': playerSize[1]});
|
|
1100
944
|
}
|
|
1101
|
-
|
|
1102
|
-
/**
|
|
1103
|
-
* @param objVideo will be like {"playerSize":[640,480],"mimes":["video/mp4"],"context":"outstream"} or POSSIBLY {"playerSize":[[640,480]],"mimes":["video/mp4"],"context":"outstream"}
|
|
1104
|
-
* @return object {w,h} or null
|
|
1105
|
-
*/
|
|
1106
945
|
export function playerSizeIsNestedArray(objVideo) {
|
|
1107
946
|
let playerSize = getPlayerSizeFromObject(objVideo);
|
|
1108
947
|
if (!playerSize) {
|
|
@@ -1113,12 +952,6 @@ export function playerSizeIsNestedArray(objVideo) {
|
|
|
1113
952
|
}
|
|
1114
953
|
return (playerSize[0] && typeof playerSize[0] === 'object');
|
|
1115
954
|
}
|
|
1116
|
-
|
|
1117
|
-
/**
|
|
1118
|
-
* Common functionality when looking at a video object, to get the playerSize
|
|
1119
|
-
* @param objVideo
|
|
1120
|
-
* @returns {*}
|
|
1121
|
-
*/
|
|
1122
955
|
function getPlayerSizeFromObject(objVideo) {
|
|
1123
956
|
logInfo('getPlayerSizeFromObject received object', objVideo);
|
|
1124
957
|
let playerSize = deepAccess(objVideo, 'playerSize');
|
|
@@ -1135,10 +968,6 @@ function getPlayerSizeFromObject(objVideo) {
|
|
|
1135
968
|
}
|
|
1136
969
|
return playerSize;
|
|
1137
970
|
}
|
|
1138
|
-
/*
|
|
1139
|
-
Rendering video ads - create a renderer instance, mark it as not loaded, set a renderer function.
|
|
1140
|
-
The renderer function will not assume that the renderer script is loaded - it will push() the ultimate render function call
|
|
1141
|
-
*/
|
|
1142
971
|
function newRenderer(adUnitCode, rendererOptions = {}) {
|
|
1143
972
|
let isLoaded = window.ozoneVideo;
|
|
1144
973
|
logInfo(`newRenderer going to set loaded to ${isLoaded ? 'true' : 'false'}`);
|
|
@@ -1151,16 +980,18 @@ function newRenderer(adUnitCode, rendererOptions = {}) {
|
|
|
1151
980
|
try {
|
|
1152
981
|
renderer.setRender(outstreamRender);
|
|
1153
982
|
} catch (err) {
|
|
1154
|
-
logError('Prebid Error when calling setRender on renderer',
|
|
983
|
+
logError('Prebid Error when calling setRender on renderer', renderer, err);
|
|
1155
984
|
}
|
|
985
|
+
logInfo('returning renderer object');
|
|
1156
986
|
return renderer;
|
|
1157
987
|
}
|
|
1158
988
|
function outstreamRender(bid) {
|
|
1159
|
-
logInfo('outstreamRender called. Going to push the call to window.ozoneVideo.outstreamRender(bid) bid =
|
|
989
|
+
logInfo('outstreamRender called. Going to push the call to window.ozoneVideo.outstreamRender(bid) bid = (first static, then reference)');
|
|
990
|
+
logInfo(JSON.parse(JSON.stringify(spec.getLoggableBidObject(bid))));
|
|
1160
991
|
bid.renderer.push(() => {
|
|
992
|
+
logInfo('Going to execute window.ozoneVideo.outstreamRender');
|
|
1161
993
|
window.ozoneVideo.outstreamRender(bid);
|
|
1162
994
|
});
|
|
1163
995
|
}
|
|
1164
|
-
|
|
1165
996
|
registerBidder(spec);
|
|
1166
997
|
logInfo(`*BidAdapter ${OZONEVERSION} was loaded`);
|