prebid.js 5.14.0 → 5.18.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/.devcontainer/Dockerfile +11 -0
- package/.devcontainer/devcontainer.json +27 -0
- package/.devcontainer/postCreate.sh +6 -0
- package/allowedModules.js +2 -1
- package/integrationExamples/gpt/afpExample.html +242 -0
- package/integrationExamples/gpt/afpGamExample.html +152 -0
- package/integrationExamples/gpt/weboramaRtdProvider_example.html +126 -0
- package/modules/.submodules.json +29 -27
- package/modules/33acrossBidAdapter.js +23 -20
- package/modules/a4gBidAdapter.js +3 -3
- package/modules/ablidaBidAdapter.js +2 -2
- package/modules/adWMGBidAdapter.js +4 -4
- package/modules/adagioAnalyticsAdapter.js +4 -4
- package/modules/adagioBidAdapter.js +85 -82
- package/modules/adbookpspBidAdapter.js +56 -54
- package/modules/adfBidAdapter.js +24 -16
- package/modules/adgenerationBidAdapter.js +42 -18
- package/modules/adhashBidAdapter.js +105 -0
- package/modules/adhashBidAdapter.md +1 -1
- package/modules/adkernelAdnAnalyticsAdapter.js +6 -6
- package/modules/adkernelAdnBidAdapter.js +23 -23
- package/modules/adkernelBidAdapter.js +49 -44
- package/modules/adlooxAdServerVideo.js +26 -26
- package/modules/adlooxAnalyticsAdapter.js +38 -35
- package/modules/adlooxRtdProvider.js +49 -46
- package/modules/admanBidAdapter.js +4 -4
- package/modules/admixerBidAdapter.js +13 -2
- package/modules/admixerIdSystem.js +4 -4
- package/modules/adnowBidAdapter.js +4 -4
- package/modules/adnuntiusBidAdapter.js +6 -5
- package/modules/adoceanBidAdapter.js +10 -10
- package/modules/adpartnerBidAdapter.js +3 -3
- package/modules/adpod.js +45 -42
- package/modules/adprimeBidAdapter.js +4 -4
- package/modules/adqueryBidAdapter.js +204 -0
- package/modules/adqueryBidAdapter.md +32 -0
- package/modules/adrelevantisBidAdapter.js +30 -27
- package/modules/adriverBidAdapter.js +13 -13
- package/modules/adtargetBidAdapter.js +24 -24
- package/modules/adtelligentBidAdapter.js +29 -29
- package/modules/adtrueBidAdapter.js +35 -35
- package/modules/aduptechBidAdapter.js +10 -10
- package/modules/advangelistsBidAdapter.js +14 -14
- package/modules/adxcgAnalyticsAdapter.js +5 -5
- package/modules/adxcgBidAdapter.js +56 -56
- package/modules/adxpremiumAnalyticsAdapter.js +17 -17
- package/modules/adyoulikeBidAdapter.js +11 -11
- package/modules/afpBidAdapter.js +166 -0
- package/modules/afpBidAdapter.md +348 -0
- package/modules/ajaBidAdapter.js +12 -12
- package/modules/akamaiDAPIdSystem.js +9 -9
- package/modules/aniviewBidAdapter.js +2 -2
- package/modules/aolBidAdapter.js +15 -14
- package/modules/apacdexBidAdapter.js +16 -16
- package/modules/appnexusBidAdapter.js +59 -59
- package/modules/apstreamBidAdapter.js +5 -5
- package/modules/asoBidAdapter.js +30 -30
- package/modules/astraoneBidAdapter.js +2 -2
- package/modules/atsAnalyticsAdapter.js +35 -30
- package/modules/audiencerunBidAdapter.js +15 -15
- package/modules/automatadBidAdapter.js +2 -2
- package/modules/axonixBidAdapter.js +7 -7
- package/modules/beachfrontBidAdapter.js +23 -23
- package/modules/beopBidAdapter.js +22 -22
- package/modules/bidViewabilityIO.js +7 -7
- package/modules/bidglassBidAdapter.js +8 -8
- package/modules/bidscubeBidAdapter.js +3 -3
- package/modules/bizzclickBidAdapter.js +10 -10
- package/modules/bliinkBidAdapter.js +58 -32
- package/modules/bliinkBidAdapter.md +29 -6
- package/modules/bluebillywigBidAdapter.js +30 -30
- package/modules/boldwinBidAdapter.js +4 -4
- package/modules/braveBidAdapter.js +5 -5
- package/modules/bridgewellBidAdapter.js +5 -5
- package/modules/brightMountainMediaBidAdapter.js +10 -10
- package/modules/brightcomBidAdapter.js +18 -18
- package/modules/britepoolIdSystem.js +7 -7
- package/modules/browsiRtdProvider.js +8 -8
- package/modules/bucksenseBidAdapter.js +9 -9
- package/modules/buzzoolaBidAdapter.js +4 -4
- package/modules/byDataAnalyticsAdapter.js +12 -12
- package/modules/ccxBidAdapter.js +38 -38
- package/modules/cleanmedianetBidAdapter.js +9 -9
- package/modules/clickforceBidAdapter.js +4 -4
- package/modules/cointrafficBidAdapter.js +4 -4
- package/modules/coinzillaBidAdapter.js +2 -2
- package/modules/colossussspBidAdapter.js +7 -3
- package/modules/concertAnalyticsAdapter.js +3 -3
- package/modules/concertBidAdapter.js +16 -17
- package/modules/connectadBidAdapter.js +13 -13
- package/modules/consentManagement.js +29 -28
- package/modules/consentManagementUsp.js +14 -14
- package/modules/consumableBidAdapter.js +3 -3
- package/modules/contentexchangeBidAdapter.js +5 -5
- package/modules/conversantBidAdapter.js +32 -31
- package/modules/cpmstarBidAdapter.js +8 -9
- package/modules/craftBidAdapter.js +10 -10
- package/modules/criteoBidAdapter.js +16 -16
- package/modules/criteoIdSystem.js +5 -5
- package/modules/currency.js +18 -18
- package/modules/cwireBidAdapter.js +272 -0
- package/modules/cwireBidAdapter.md +43 -0
- package/modules/datablocksBidAdapter.js +12 -12
- package/modules/deepintentBidAdapter.js +13 -13
- package/modules/dgkeywordRtdProvider.js +10 -11
- package/modules/districtmDMXBidAdapter.js +15 -15
- package/modules/dmdIdSystem.js +5 -5
- package/modules/docereeBidAdapter.js +9 -9
- package/modules/dspxBidAdapter.js +5 -5
- package/modules/ebdrBidAdapter.js +9 -9
- package/modules/emx_digitalBidAdapter.js +23 -23
- package/modules/enrichmentFpdModule.js +10 -9
- package/modules/eplanningAnalyticsAdapter.js +2 -2
- package/modules/eplanningBidAdapter.js +10 -10
- package/modules/etargetBidAdapter.js +4 -4
- package/modules/express.js +9 -10
- package/modules/fabrickIdSystem.js +6 -6
- package/modules/feedadBidAdapter.js +5 -5
- package/modules/fintezaAnalyticsAdapter.js +4 -4
- package/modules/flocIdSystem.js +5 -5
- package/modules/fluctBidAdapter.js +6 -5
- package/modules/freewheel-sspBidAdapter.js +6 -6
- package/modules/gamoshiBidAdapter.js +22 -22
- package/modules/gdprEnforcement.js +13 -14
- package/modules/getintentBidAdapter.js +3 -4
- package/modules/glimpseBidAdapter.js +160 -48
- package/modules/glimpseBidAdapter.md +11 -74
- package/modules/gmosspBidAdapter.js +17 -17
- package/modules/gnetBidAdapter.js +5 -5
- package/modules/googleAnalyticsAdapter.js +6 -6
- package/modules/gothamadsBidAdapter.js +9 -9
- package/modules/gptPreAuction.js +7 -7
- package/modules/gridBidAdapter.js +15 -16
- package/modules/gridNMBidAdapter.js +214 -63
- package/modules/growadvertisingBidAdapter.js +7 -8
- package/modules/gumgumBidAdapter.js +19 -13
- package/modules/h12mediaBidAdapter.js +12 -12
- package/modules/haloIdSystem.js +8 -8
- package/modules/hybridBidAdapter.js +7 -7
- package/modules/iasRtdProvider.js +79 -63
- package/modules/id5IdSystem.js +24 -24
- package/modules/idImportLibrary.js +35 -35
- package/modules/idxIdSystem.js +3 -3
- package/modules/impactifyBidAdapter.js +10 -10
- package/modules/improvedigitalBidAdapter.js +36 -36
- package/modules/imuIdSystem.js +6 -6
- package/modules/inmarBidAdapter.js +2 -2
- package/modules/innityBidAdapter.js +3 -3
- package/modules/inskinBidAdapter.js +14 -2
- package/modules/inskinBidAdapter.md +5 -4
- package/modules/instreamTracking.js +5 -5
- package/modules/integr8BidAdapter.js +4 -4
- package/modules/intentIqIdSystem.js +7 -7
- package/modules/interactiveOffersBidAdapter.js +5 -5
- package/modules/invibesBidAdapter.js +53 -19
- package/modules/invisiblyAnalyticsAdapter.js +5 -5
- package/modules/iqmBidAdapter.js +19 -19
- package/modules/iqzoneBidAdapter.js +5 -5
- package/modules/ixBidAdapter.js +73 -73
- package/modules/jixieBidAdapter.js +6 -6
- package/modules/justpremiumBidAdapter.js +5 -1
- package/modules/kargoBidAdapter.js +16 -9
- package/modules/kargoBidAdapter.md +20 -0
- package/modules/kinessoIdSystem.js +8 -8
- package/modules/koblerBidAdapter.js +12 -12
- package/modules/konduitAnalyticsAdapter.js +4 -4
- package/modules/konduitWrapper.js +14 -14
- package/modules/krushmediaBidAdapter.js +4 -4
- package/modules/kubientBidAdapter.js +5 -5
- package/modules/limelightDigitalBidAdapter.js +4 -4
- package/modules/liveIntentIdSystem.js +4 -5
- package/modules/livewrappedAnalyticsAdapter.js +27 -15
- package/modules/livewrappedBidAdapter.js +7 -7
- package/modules/liveyieldAnalyticsAdapter.js +13 -13
- package/modules/lockerdomeBidAdapter.js +2 -2
- package/modules/loganBidAdapter.js +4 -4
- package/modules/lotamePanoramaIdSystem.js +13 -13
- package/modules/lunamediahbBidAdapter.js +2 -2
- package/modules/madvertiseBidAdapter.js +3 -3
- package/modules/marsmediaBidAdapter.js +26 -26
- package/modules/mathildeadsBidAdapter.js +5 -5
- package/modules/mediaforceBidAdapter.js +11 -11
- package/modules/mediakeysBidAdapter.js +444 -53
- package/modules/mediakeysBidAdapter.md +108 -0
- package/modules/medianetAnalyticsAdapter.js +48 -125
- package/modules/medianetBidAdapter.js +38 -33
- package/modules/medianetRtdProvider.js +7 -7
- package/modules/merkleIdSystem.js +19 -19
- package/modules/mgidBidAdapter.js +50 -50
- package/modules/microadBidAdapter.js +3 -3
- package/modules/multibid/index.js +15 -13
- package/modules/mwOpenLinkIdSystem.js +7 -7
- package/modules/mytargetBidAdapter.js +112 -0
- package/modules/nativoBidAdapter.js +46 -31
- package/modules/nativoBidAdapter.md +0 -1
- package/modules/naveggIdSystem.js +3 -3
- package/modules/nextMillenniumBidAdapter.js +6 -6
- package/modules/nextrollBidAdapter.js +375 -0
- package/modules/nobidBidAdapter.js +12 -11
- package/modules/novatiqIdSystem.js +8 -8
- package/modules/oguryBidAdapter.js +22 -6
- package/modules/oneVideoBidAdapter.js +20 -20
- package/modules/onomagicBidAdapter.js +16 -16
- package/modules/ooloAnalyticsAdapter.js +13 -13
- package/modules/openwebBidAdapter.js +26 -26
- package/modules/openxAnalyticsAdapter.js +33 -33
- package/modules/openxBidAdapter.js +29 -29
- package/modules/operaadsBidAdapter.js +53 -53
- package/modules/optimeraRtdProvider.js +9 -9
- package/modules/optoutBidAdapter.js +3 -3
- package/modules/orbidderBidAdapter.js +3 -3
- package/modules/outbrainBidAdapter.js +13 -13
- package/modules/ozoneBidAdapter.js +131 -131
- package/modules/padsquadBidAdapter.js +4 -4
- package/modules/parrableIdSystem.js +17 -17
- package/modules/pixfutureBidAdapter.js +45 -25
- package/modules/pixfutureBidAdapter.md +127 -0
- package/modules/prebidServerBidAdapter/index.js +109 -105
- package/modules/prebidmanagerAnalyticsAdapter.js +7 -7
- package/modules/priceFloors.js +47 -47
- package/modules/proxistoreBidAdapter.js +6 -8
- package/modules/pubCommonId.js +11 -11
- package/modules/pubProvidedIdSystem.js +3 -3
- package/modules/publinkIdSystem.js +23 -7
- package/modules/publinkIdSystem.md +7 -2
- package/modules/pubmaticAnalyticsAdapter.js +16 -16
- package/modules/pubmaticBidAdapter.js +109 -93
- package/modules/pubmaticBidAdapter.md +1 -1
- package/modules/pubperfAnalyticsAdapter.js +3 -3
- package/modules/pubwiseAnalyticsAdapter.js +6 -6
- package/modules/pubwiseBidAdapter.js +23 -23
- package/modules/pubxBidAdapter.js +2 -2
- package/modules/pubxaiAnalyticsAdapter.js +7 -7
- package/modules/pulsepointBidAdapter.js +13 -13
- package/modules/pxyzBidAdapter.js +7 -7
- package/modules/quantcastBidAdapter.js +16 -16
- package/modules/radsBidAdapter.js +5 -5
- package/modules/realvuAnalyticsAdapter.js +5 -7
- package/modules/reconciliationRtdProvider.js +6 -6
- package/modules/relaidoBidAdapter.js +44 -38
- package/modules/resetdigitalBidAdapter.js +3 -4
- package/modules/revcontentBidAdapter.js +9 -9
- package/modules/rhythmoneBidAdapter.js +17 -16
- package/modules/richaudienceBidAdapter.js +9 -9
- package/modules/riseBidAdapter.js +26 -26
- package/modules/riseBidAdapter.md +1 -3
- package/modules/roxotAnalyticsAdapter.js +14 -14
- package/modules/rtbhouseBidAdapter.js +7 -7
- package/modules/rtbsapeBidAdapter.js +3 -4
- package/modules/rtdModule/index.js +3 -3
- package/modules/rubiconAnalyticsAdapter.js +82 -82
- package/modules/rubiconBidAdapter.js +72 -68
- package/modules/scaleableAnalyticsAdapter.js +2 -2
- package/modules/seedingAllianceBidAdapter.js +231 -0
- package/modules/seedtagBidAdapter.js +10 -10
- package/modules/sharedIdSystem.js +11 -11
- package/modules/sharethroughAnalyticsAdapter.js +8 -8
- package/modules/sharethroughBidAdapter.js +20 -27
- package/modules/showheroes-bsBidAdapter.js +23 -23
- package/modules/sigmoidAnalyticsAdapter.js +4 -5
- package/modules/sirdataRtdProvider.js +34 -34
- package/modules/sizeMappingV2.js +39 -39
- package/modules/slimcutBidAdapter.js +121 -0
- package/modules/smaatoBidAdapter.js +44 -44
- package/modules/smartadserverBidAdapter.js +7 -7
- package/modules/smartxBidAdapter.js +72 -72
- package/modules/smartyadsBidAdapter.js +2 -2
- package/modules/smilewantedBidAdapter.js +6 -6
- package/modules/sonobiAnalyticsAdapter.js +23 -23
- package/modules/sortableAnalyticsAdapter.js +5 -5
- package/modules/sortableBidAdapter.js +28 -28
- package/modules/sovrnAnalyticsAdapter.js +5 -5
- package/modules/sovrnBidAdapter.js +22 -22
- package/modules/spotxBidAdapter.js +97 -83
- package/modules/sspBCBidAdapter.js +216 -21
- package/modules/sspBCBidAdapter.md +1 -1
- package/modules/staqAnalyticsAdapter.js +9 -9
- package/modules/stroeerCoreBidAdapter.js +16 -16
- package/modules/sublimeBidAdapter.js +6 -6
- package/modules/talkadsBidAdapter.js +129 -0
- package/modules/talkadsBidAdapter.md +60 -0
- package/modules/tapadIdSystem.js +3 -3
- package/modules/tappxBidAdapter.js +63 -64
- package/modules/teadsBidAdapter.js +20 -20
- package/modules/telariaBidAdapter.js +17 -17
- package/modules/temedyaBidAdapter.js +4 -4
- package/modules/terceptAnalyticsAdapter.js +4 -4
- package/modules/theAdxBidAdapter.js +16 -16
- package/modules/timeoutRtdProvider.js +15 -15
- package/modules/tpmnBidAdapter.js +3 -3
- package/modules/trionBidAdapter.js +15 -15
- package/modules/tripleliftBidAdapter.js +27 -24
- package/modules/truereachBidAdapter.js +4 -4
- package/modules/trustxBidAdapter.js +22 -18
- package/modules/ucfunnelBidAdapter.js +3 -3
- package/modules/uid2IdSystem.js +6 -6
- package/modules/underdogmediaBidAdapter.js +4 -4
- package/modules/unicornBidAdapter.js +15 -15
- package/modules/unifiedIdSystem.js +4 -4
- package/modules/unrulyBidAdapter.js +16 -16
- package/modules/userId/eids.js +9 -9
- package/modules/userId/index.js +37 -35
- package/modules/validationFpdModule/index.js +15 -15
- package/modules/vdoaiBidAdapter.js +2 -2
- package/modules/verizonMediaIdSystem.js +5 -5
- package/modules/vidazooBidAdapter.js +5 -5
- package/modules/videobyteBidAdapter.js +24 -24
- package/modules/videoreachBidAdapter.js +7 -7
- package/modules/vidoomyBidAdapter.js +105 -22
- package/modules/viewdeosDXBidAdapter.js +17 -17
- package/modules/visxBidAdapter.js +21 -29
- package/modules/voxBidAdapter.js +7 -7
- package/modules/vuukleBidAdapter.js +2 -2
- package/modules/waardexBidAdapter.js +26 -26
- package/modules/weboramaRtdProvider.js +174 -0
- package/modules/weboramaRtdProvider.md +70 -0
- package/modules/winrBidAdapter.js +27 -27
- package/modules/wipesBidAdapter.js +2 -2
- package/modules/yahoosspBidAdapter.js +637 -0
- package/modules/yahoosspBidAdapter.md +795 -0
- package/modules/yieldlabBidAdapter.js +57 -12
- package/modules/yieldlabBidAdapter.md +16 -1
- package/modules/yieldliftBidAdapter.js +9 -9
- package/modules/yieldmoBidAdapter.js +64 -50
- package/modules/yieldoneAnalyticsAdapter.js +6 -6
- package/modules/yieldoneBidAdapter.js +11 -11
- package/modules/yuktamediaAnalyticsAdapter.js +15 -15
- package/modules/zeotapIdPlusIdSystem.js +2 -2
- package/modules/zetaBidAdapter.js +6 -6
- package/modules/zeta_global_sspBidAdapter.js +14 -14
- package/package.json +1 -1
- package/src/AnalyticsAdapter.js +6 -6
- package/src/Renderer.js +10 -8
- package/src/adapterManager.js +45 -42
- package/src/adloader.js +6 -6
- package/src/ajax.js +8 -9
- package/src/auction.js +26 -23
- package/src/bidfactory.js +2 -2
- package/src/config.js +52 -50
- package/src/cpmBucketManager.js +2 -2
- package/src/prebid.js +85 -81
- package/src/storageManager.js +5 -5
- package/src/targeting.js +25 -26
- package/src/userSync.js +35 -22
- package/src/videoCache.js +2 -2
- package/test/.eslintrc.js +2 -1
- package/test/spec/modules/adfBidAdapter_spec.js +55 -0
- package/test/spec/modules/adgenerationBidAdapter_spec.js +121 -50
- package/test/spec/modules/adhashBidAdapter_spec.js +155 -0
- package/test/spec/modules/adnuntiusBidAdapter_spec.js +68 -0
- package/test/spec/modules/adqueryBidAdapter_spec.js +185 -0
- package/test/spec/modules/afpBidAdapter_spec.js +306 -0
- package/test/spec/modules/atsAnalyticsAdapter_spec.js +37 -2
- package/test/spec/modules/bliinkBidAdapter_spec.js +87 -36
- package/test/spec/modules/colossussspBidAdapter_spec.js +14 -6
- package/test/spec/modules/cwireBidAdapter_spec.js +246 -0
- package/test/spec/modules/eplanningBidAdapter_spec.js +3 -3
- package/test/spec/modules/glimpseBidAdapter_spec.js +302 -204
- package/test/spec/modules/gridBidAdapter_spec.js +38 -2
- package/test/spec/modules/gridNMBidAdapter_spec.js +121 -47
- package/test/spec/modules/gumgumBidAdapter_spec.js +27 -6
- package/test/spec/modules/iasRtdProvider_spec.js +71 -6
- package/test/spec/modules/inskinBidAdapter_spec.js +10 -1
- package/test/spec/modules/invibesBidAdapter_spec.js +114 -2
- package/test/spec/modules/justpremiumBidAdapter_spec.js +16 -2
- package/test/spec/modules/livewrappedAnalyticsAdapter_spec.js +33 -7
- package/test/spec/modules/mediakeysBidAdapter_spec.js +406 -51
- package/test/spec/modules/medianetAnalyticsAdapter_spec.js +39 -7
- package/test/spec/modules/medianetBidAdapter_spec.js +62 -1
- package/test/spec/modules/mytargetBidAdapter_spec.js +199 -0
- package/test/spec/modules/nativoBidAdapter_spec.js +50 -3
- package/test/spec/modules/nextrollBidAdapter_spec.js +290 -0
- package/test/spec/modules/nobidBidAdapter_spec.js +65 -1
- package/test/spec/modules/oguryBidAdapter_spec.js +120 -7
- package/test/spec/modules/publinkIdSystem_spec.js +42 -12
- package/test/spec/modules/pubmaticBidAdapter_spec.js +217 -1
- package/test/spec/modules/relaidoBidAdapter_spec.js +21 -20
- package/test/spec/modules/rubiconAnalyticsAdapter_spec.js +100 -81
- package/test/spec/modules/rubiconAnalyticsSchema.json +5 -2
- package/test/spec/modules/seedingAllianceAdapter_spec.js +186 -0
- package/test/spec/modules/sharethroughBidAdapter_spec.js +156 -136
- package/test/spec/modules/slimcutBidAdapter_spec.js +200 -0
- package/test/spec/modules/spotxBidAdapter_spec.js +36 -0
- package/test/spec/modules/sspBCBidAdapter_spec.js +210 -62
- package/test/spec/modules/talkadsBidAdapter_spec.js +231 -0
- package/test/spec/modules/tappxBidAdapter_spec.js +39 -3
- package/test/spec/modules/tripleliftBidAdapter_spec.js +2 -0
- package/test/spec/modules/trustxBidAdapter_spec.js +35 -2
- package/test/spec/modules/unicornBidAdapter_spec.js +4 -4
- package/test/spec/modules/visxBidAdapter_spec.js +48 -4
- package/test/spec/modules/weboramaRtdProvider_spec.js +288 -0
- package/test/spec/modules/yahoosspBidAdapter_spec.js +1332 -0
- package/test/spec/modules/yieldlabBidAdapter_spec.js +65 -1
- package/test/spec/modules/yieldmoBidAdapter_spec.js +30 -9
- package/test/spec/unit/pbjs_api_spec.js +4 -0
- package/test/spec/userSync_spec.js +30 -2
- package/modules/turktelekomBidAdapter.md +0 -49
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* @requires module:modules/userId
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
-
import
|
|
8
|
+
import { logInfo } from '../src/utils.js';
|
|
9
9
|
import { ajax } from '../src/ajax.js';
|
|
10
10
|
import { submodule } from '../src/hook.js';
|
|
11
11
|
|
|
@@ -47,22 +47,22 @@ export const novatiqIdSubmodule = {
|
|
|
47
47
|
|
|
48
48
|
const configParams = config.params || {};
|
|
49
49
|
const srcId = this.getSrcId(configParams);
|
|
50
|
-
|
|
50
|
+
logInfo('NOVATIQ Sync request used sourceid param: ' + srcId);
|
|
51
51
|
|
|
52
52
|
let partnerhost;
|
|
53
53
|
partnerhost = window.location.hostname;
|
|
54
|
-
|
|
54
|
+
logInfo('NOVATIQ partner hostname: ' + partnerhost);
|
|
55
55
|
|
|
56
56
|
const novatiqId = snowflakeId();
|
|
57
57
|
const url = 'https://spadsync.com/sync?sptoken=' + novatiqId + '&sspid=' + srcId + '&ssphost=' + partnerhost;
|
|
58
58
|
ajax(url, undefined, undefined, { method: 'GET', withCredentials: false });
|
|
59
59
|
|
|
60
|
-
|
|
60
|
+
logInfo('NOVATIQ snowflake: ' + novatiqId);
|
|
61
61
|
return { 'id': novatiqId }
|
|
62
62
|
},
|
|
63
63
|
|
|
64
64
|
getSrcId(configParams) {
|
|
65
|
-
|
|
65
|
+
logInfo('NOVATIQ Configured sourceid param: ' + configParams.sourceid);
|
|
66
66
|
|
|
67
67
|
function isHex(str) {
|
|
68
68
|
var a = parseInt(str, 16);
|
|
@@ -72,13 +72,13 @@ export const novatiqIdSubmodule = {
|
|
|
72
72
|
let srcId;
|
|
73
73
|
if (typeof configParams.sourceid === 'undefined' || configParams.sourceid === null || configParams.sourceid === '') {
|
|
74
74
|
srcId = '000';
|
|
75
|
-
|
|
75
|
+
logInfo('NOVATIQ sourceid param set to value 000 due to undefined parameter or missing value in config section');
|
|
76
76
|
} else if (configParams.sourceid.length < 3 || configParams.sourceid.length > 3) {
|
|
77
77
|
srcId = '001';
|
|
78
|
-
|
|
78
|
+
logInfo('NOVATIQ sourceid param set to value 001 due to wrong size in config section 3 chars max e.g. 1ab');
|
|
79
79
|
} else if (isHex(configParams.sourceid) == false) {
|
|
80
80
|
srcId = '002';
|
|
81
|
-
|
|
81
|
+
logInfo('NOVATIQ sourceid param set to value 002 due to wrong format in config section expecting hex value only');
|
|
82
82
|
} else {
|
|
83
83
|
srcId = configParams.sourceid;
|
|
84
84
|
}
|
|
@@ -8,6 +8,7 @@ import { ajax } from '../src/ajax.js'
|
|
|
8
8
|
const BIDDER_CODE = 'ogury';
|
|
9
9
|
const DEFAULT_TIMEOUT = 1000;
|
|
10
10
|
const BID_HOST = 'https://mweb-hb.presage.io/api/header-bidding-request';
|
|
11
|
+
const TIMEOUT_MONITORING_HOST = 'https://ms-ads-monitoring-events.presage.io';
|
|
11
12
|
const MS_COOKIE_SYNC_DOMAIN = 'https://ms-cookie-sync.presage.io';
|
|
12
13
|
|
|
13
14
|
function isBidRequestValid(bid) {
|
|
@@ -23,10 +24,16 @@ function isBidRequestValid(bid) {
|
|
|
23
24
|
function getUserSyncs(syncOptions, serverResponses, gdprConsent, uspConsent) {
|
|
24
25
|
if (!syncOptions.pixelEnabled) return [];
|
|
25
26
|
|
|
26
|
-
return [
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
27
|
+
return [
|
|
28
|
+
{
|
|
29
|
+
type: 'image',
|
|
30
|
+
url: `${MS_COOKIE_SYNC_DOMAIN}/v1/init-sync/bid-switch?iab_string=${(gdprConsent && gdprConsent.consentString) || ''}&source=prebid`
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
type: 'image',
|
|
34
|
+
url: `${MS_COOKIE_SYNC_DOMAIN}/ttd/init-sync?iab_string=${(gdprConsent && gdprConsent.consentString) || ''}&source=prebid`
|
|
35
|
+
}
|
|
36
|
+
]
|
|
30
37
|
}
|
|
31
38
|
|
|
32
39
|
function buildRequests(validBidRequests, bidderRequest) {
|
|
@@ -40,7 +47,8 @@ function buildRequests(validBidRequests, bidderRequest) {
|
|
|
40
47
|
},
|
|
41
48
|
},
|
|
42
49
|
site: {
|
|
43
|
-
domain: location.hostname
|
|
50
|
+
domain: location.hostname,
|
|
51
|
+
page: location.href
|
|
44
52
|
},
|
|
45
53
|
user: {
|
|
46
54
|
ext: {
|
|
@@ -141,6 +149,13 @@ function onBidWon(bid) {
|
|
|
141
149
|
if (bid && bid.hasOwnProperty('nurl') && bid.nurl.length > 0) ajax(bid['nurl'], null);
|
|
142
150
|
}
|
|
143
151
|
|
|
152
|
+
function onTimeout(timeoutData) {
|
|
153
|
+
ajax(`${TIMEOUT_MONITORING_HOST}/bid_timeout`, null, JSON.stringify(timeoutData[0]), {
|
|
154
|
+
method: 'POST',
|
|
155
|
+
contentType: 'application/json'
|
|
156
|
+
});
|
|
157
|
+
}
|
|
158
|
+
|
|
144
159
|
export const spec = {
|
|
145
160
|
code: BIDDER_CODE,
|
|
146
161
|
supportedMediaTypes: [BANNER],
|
|
@@ -149,7 +164,8 @@ export const spec = {
|
|
|
149
164
|
buildRequests,
|
|
150
165
|
interpretResponse,
|
|
151
166
|
getFloor,
|
|
152
|
-
onBidWon
|
|
167
|
+
onBidWon,
|
|
168
|
+
onTimeout
|
|
153
169
|
}
|
|
154
170
|
|
|
155
171
|
registerBidder(spec);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { logError, logWarn, parseSizesInput, generateUUID, isFn, logMessage, isPlainObject, isStr, isNumber, isArray } from '../src/utils.js';
|
|
2
2
|
import {registerBidder} from '../src/adapters/bidderFactory.js';
|
|
3
3
|
|
|
4
4
|
const BIDDER_CODE = 'oneVideo';
|
|
@@ -28,7 +28,7 @@ export const spec = {
|
|
|
28
28
|
}
|
|
29
29
|
// MediaTypes Video / Banner validation
|
|
30
30
|
if (typeof bid.mediaTypes.video === 'undefined' && typeof bid.mediaTypes.banner === 'undefined') {
|
|
31
|
-
|
|
31
|
+
logError('Failed validation: adUnit mediaTypes.video OR mediaTypes.banner not declared');
|
|
32
32
|
return false;
|
|
33
33
|
};
|
|
34
34
|
|
|
@@ -36,27 +36,27 @@ export const spec = {
|
|
|
36
36
|
// Player size validation
|
|
37
37
|
if (typeof bid.mediaTypes.video.playerSize === 'undefined') {
|
|
38
38
|
if (bid.params.video && (typeof bid.params.video.playerWidth === 'undefined' || typeof bid.params.video.playerHeight === 'undefined')) {
|
|
39
|
-
|
|
39
|
+
logError('Failed validation: Player size not declared in either mediaTypes.playerSize OR bid.params.video.plauerWidth & bid.params.video.playerHeight.');
|
|
40
40
|
return false;
|
|
41
41
|
};
|
|
42
42
|
};
|
|
43
43
|
// Mimes validation
|
|
44
44
|
if (typeof bid.mediaTypes.video.mimes === 'undefined') {
|
|
45
45
|
if (!bid.params.video || typeof bid.params.video.mimes === 'undefined') {
|
|
46
|
-
|
|
46
|
+
logError('Failed validation: adUnit mediaTypes.mimes OR params.video.mimes not declared');
|
|
47
47
|
return false;
|
|
48
48
|
};
|
|
49
49
|
};
|
|
50
50
|
// Prevend DAP Outstream validation, Banner DAP validation & Multi-Format adUnit support
|
|
51
51
|
if (bid.mediaTypes.video.context === 'outstream' && bid.params.video && bid.params.video.display === 1) {
|
|
52
|
-
|
|
52
|
+
logError('Failed validation: Dynamic Ad Placement cannot be used with context Outstream (params.video.display=1)');
|
|
53
53
|
return false;
|
|
54
54
|
};
|
|
55
55
|
};
|
|
56
56
|
|
|
57
57
|
// Publisher Id (Exchange) validation
|
|
58
58
|
if (typeof bid.params.pubId === 'undefined') {
|
|
59
|
-
|
|
59
|
+
logError('Failed validation: Adapter cannot send requests without bid.params.pubId');
|
|
60
60
|
return false;
|
|
61
61
|
}
|
|
62
62
|
|
|
@@ -106,7 +106,7 @@ export const spec = {
|
|
|
106
106
|
response = null;
|
|
107
107
|
}
|
|
108
108
|
if (!response || !bid || (!bid.adm && !bid.nurl) || !bid.price) {
|
|
109
|
-
|
|
109
|
+
logWarn(`No valid bids from ${spec.code} bidder`);
|
|
110
110
|
return [];
|
|
111
111
|
}
|
|
112
112
|
size = getSize(bidRequest.sizes);
|
|
@@ -172,7 +172,7 @@ export const spec = {
|
|
|
172
172
|
};
|
|
173
173
|
|
|
174
174
|
function getSize(sizes) {
|
|
175
|
-
let parsedSizes =
|
|
175
|
+
let parsedSizes = parseSizesInput(sizes);
|
|
176
176
|
let [ width, height ] = parsedSizes.length ? parsedSizes[0].split('x') : [];
|
|
177
177
|
return {
|
|
178
178
|
width: parseInt(width, 10) || undefined,
|
|
@@ -194,7 +194,7 @@ function getRequestData(bid, consentData, bidRequest) {
|
|
|
194
194
|
size: '*'
|
|
195
195
|
};
|
|
196
196
|
let bidData = {
|
|
197
|
-
id:
|
|
197
|
+
id: generateUUID(),
|
|
198
198
|
at: 2,
|
|
199
199
|
imp: [{
|
|
200
200
|
id: '1',
|
|
@@ -286,7 +286,7 @@ function getRequestData(bid, consentData, bidRequest) {
|
|
|
286
286
|
}
|
|
287
287
|
}
|
|
288
288
|
|
|
289
|
-
if (
|
|
289
|
+
if (isFn(bid.getFloor)) {
|
|
290
290
|
let floorData = bid.getFloor(getFloorRequestObject);
|
|
291
291
|
bidData.imp[0].bidfloor = floorData.floor;
|
|
292
292
|
bidData.cur = floorData.currency;
|
|
@@ -344,7 +344,7 @@ function getRequestData(bid, consentData, bidRequest) {
|
|
|
344
344
|
}
|
|
345
345
|
}
|
|
346
346
|
if (bid.params.video.e2etest) {
|
|
347
|
-
|
|
347
|
+
logMessage('E2E test mode enabled: \n The following parameters are being overridden by e2etest mode:\n* bidfloor:null\n* width:300\n* height:250\n* mimes: video/mp4, application/javascript\n* api:2\n* site.page/ref: verizonmedia.com\n* tmax:1000');
|
|
348
348
|
bidData.imp[0].bidfloor = null;
|
|
349
349
|
bidData.imp[0].video.w = 300;
|
|
350
350
|
bidData.imp[0].video.h = 250;
|
|
@@ -354,15 +354,15 @@ function getRequestData(bid, consentData, bidRequest) {
|
|
|
354
354
|
bidData.site.ref = 'https://verizonmedia.com';
|
|
355
355
|
bidData.tmax = 1000;
|
|
356
356
|
}
|
|
357
|
-
if (bid.params.video.custom &&
|
|
357
|
+
if (bid.params.video.custom && isPlainObject(bid.params.video.custom)) {
|
|
358
358
|
bidData.imp[0].ext.custom = {};
|
|
359
359
|
for (const key in bid.params.video.custom) {
|
|
360
|
-
if (
|
|
360
|
+
if (isStr(bid.params.video.custom[key]) || isNumber(bid.params.video.custom[key])) {
|
|
361
361
|
bidData.imp[0].ext.custom[key] = bid.params.video.custom[key];
|
|
362
362
|
}
|
|
363
363
|
}
|
|
364
364
|
}
|
|
365
|
-
if (bid.params.video.content &&
|
|
365
|
+
if (bid.params.video.content && isPlainObject(bid.params.video.content)) {
|
|
366
366
|
bidData.site.content = {};
|
|
367
367
|
const contentStringKeys = ['id', 'title', 'series', 'season', 'genre', 'contentrating', 'language'];
|
|
368
368
|
const contentNumberkeys = ['episode', 'prodq', 'context', 'livestream', 'len'];
|
|
@@ -370,14 +370,14 @@ function getRequestData(bid, consentData, bidRequest) {
|
|
|
370
370
|
const contentObjectKeys = ['ext'];
|
|
371
371
|
for (const contentKey in bid.params.video.content) {
|
|
372
372
|
if (
|
|
373
|
-
(contentStringKeys.indexOf(contentKey) > -1 &&
|
|
374
|
-
(contentNumberkeys.indexOf(contentKey) > -1 &&
|
|
375
|
-
(contentObjectKeys.indexOf(contentKey) > -1 &&
|
|
376
|
-
(contentArrayKeys.indexOf(contentKey) > -1 &&
|
|
377
|
-
bid.params.video.content[contentKey].every(catStr =>
|
|
373
|
+
(contentStringKeys.indexOf(contentKey) > -1 && isStr(bid.params.video.content[contentKey])) ||
|
|
374
|
+
(contentNumberkeys.indexOf(contentKey) > -1 && isNumber(bid.params.video.content[contentKey])) ||
|
|
375
|
+
(contentObjectKeys.indexOf(contentKey) > -1 && isPlainObject(bid.params.video.content[contentKey])) ||
|
|
376
|
+
(contentArrayKeys.indexOf(contentKey) > -1 && isArray(bid.params.video.content[contentKey]) &&
|
|
377
|
+
bid.params.video.content[contentKey].every(catStr => isStr(catStr)))) {
|
|
378
378
|
bidData.site.content[contentKey] = bid.params.video.content[contentKey];
|
|
379
379
|
} else {
|
|
380
|
-
|
|
380
|
+
logMessage('oneVideo bid adapter validation error: ', contentKey, ' is either not supported is OpenRTB V2.5 or value is undefined');
|
|
381
381
|
}
|
|
382
382
|
}
|
|
383
383
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { getBidIdParameter, _each, isArray, getWindowTop, getUniqueIdentifierStr, parseUrl, logError, logWarn, createTrackPixelHtml, getWindowSelf, isFn, isPlainObject } from '../src/utils.js';
|
|
2
2
|
import { registerBidder } from '../src/adapters/bidderFactory.js';
|
|
3
3
|
import { BANNER } from '../src/mediaTypes.js';
|
|
4
4
|
import { config } from '../src/config.js';
|
|
@@ -22,17 +22,17 @@ function buildRequests(bidReqs, bidderRequest) {
|
|
|
22
22
|
referrer = bidderRequest.refererInfo.referer;
|
|
23
23
|
}
|
|
24
24
|
const onomagicImps = [];
|
|
25
|
-
const publisherId =
|
|
26
|
-
|
|
25
|
+
const publisherId = getBidIdParameter('publisherId', bidReqs[0].params);
|
|
26
|
+
_each(bidReqs, function (bid) {
|
|
27
27
|
let bidSizes = (bid.mediaTypes && bid.mediaTypes.banner && bid.mediaTypes.banner.sizes) || bid.sizes;
|
|
28
|
-
bidSizes = ((
|
|
29
|
-
bidSizes = bidSizes.filter(size =>
|
|
28
|
+
bidSizes = ((isArray(bidSizes) && isArray(bidSizes[0])) ? bidSizes : [bidSizes]);
|
|
29
|
+
bidSizes = bidSizes.filter(size => isArray(size));
|
|
30
30
|
const processedSizes = bidSizes.map(size => ({w: parseInt(size[0], 10), h: parseInt(size[1], 10)}));
|
|
31
31
|
|
|
32
32
|
const element = document.getElementById(bid.adUnitCode);
|
|
33
33
|
const minSize = _getMinSize(processedSizes);
|
|
34
34
|
const viewabilityAmount = _isViewabilityMeasurable(element)
|
|
35
|
-
? _getViewability(element,
|
|
35
|
+
? _getViewability(element, getWindowTop(), minSize)
|
|
36
36
|
: 'na';
|
|
37
37
|
const viewabilityAmountRounded = isNaN(viewabilityAmount) ? viewabilityAmount : Math.round(viewabilityAmount);
|
|
38
38
|
|
|
@@ -53,10 +53,10 @@ function buildRequests(bidReqs, bidderRequest) {
|
|
|
53
53
|
onomagicImps.push(imp);
|
|
54
54
|
});
|
|
55
55
|
const onomagicBidReq = {
|
|
56
|
-
id:
|
|
56
|
+
id: getUniqueIdentifierStr(),
|
|
57
57
|
imp: onomagicImps,
|
|
58
58
|
site: {
|
|
59
|
-
domain:
|
|
59
|
+
domain: parseUrl(referrer).host,
|
|
60
60
|
page: referrer,
|
|
61
61
|
publisher: {
|
|
62
62
|
id: publisherId
|
|
@@ -77,7 +77,7 @@ function buildRequests(bidReqs, bidderRequest) {
|
|
|
77
77
|
options: {contentType: 'text/plain', withCredentials: false}
|
|
78
78
|
};
|
|
79
79
|
} catch (e) {
|
|
80
|
-
|
|
80
|
+
logError(e, {bidReqs, bidderRequest});
|
|
81
81
|
}
|
|
82
82
|
}
|
|
83
83
|
|
|
@@ -95,7 +95,7 @@ function isBidRequestValid(bid) {
|
|
|
95
95
|
|
|
96
96
|
function interpretResponse(serverResponse) {
|
|
97
97
|
if (!serverResponse.body || typeof serverResponse.body != 'object') {
|
|
98
|
-
|
|
98
|
+
logWarn('Onomagic server returned empty/non-json response: ' + JSON.stringify(serverResponse.body));
|
|
99
99
|
return [];
|
|
100
100
|
}
|
|
101
101
|
const { body: {id, seatbid} } = serverResponse;
|
|
@@ -126,7 +126,7 @@ function interpretResponse(serverResponse) {
|
|
|
126
126
|
}
|
|
127
127
|
return onomagicBidResponses;
|
|
128
128
|
} catch (e) {
|
|
129
|
-
|
|
129
|
+
logError(e, {id, seatbid});
|
|
130
130
|
}
|
|
131
131
|
}
|
|
132
132
|
|
|
@@ -150,7 +150,7 @@ function _getDeviceType() {
|
|
|
150
150
|
function _getAdMarkup(bid) {
|
|
151
151
|
let adm = bid.adm;
|
|
152
152
|
if ('nurl' in bid) {
|
|
153
|
-
adm +=
|
|
153
|
+
adm += createTrackPixelHtml(bid.nurl);
|
|
154
154
|
}
|
|
155
155
|
return adm;
|
|
156
156
|
}
|
|
@@ -160,14 +160,14 @@ function _isViewabilityMeasurable(element) {
|
|
|
160
160
|
}
|
|
161
161
|
|
|
162
162
|
function _getViewability(element, topWin, { w, h } = {}) {
|
|
163
|
-
return
|
|
163
|
+
return getWindowTop().document.visibilityState === 'visible'
|
|
164
164
|
? _getPercentInView(element, topWin, { w, h })
|
|
165
165
|
: 0;
|
|
166
166
|
}
|
|
167
167
|
|
|
168
168
|
function _isIframe() {
|
|
169
169
|
try {
|
|
170
|
-
return
|
|
170
|
+
return getWindowSelf() !== getWindowTop();
|
|
171
171
|
} catch (e) {
|
|
172
172
|
return true;
|
|
173
173
|
}
|
|
@@ -247,7 +247,7 @@ function _getPercentInView(element, topWin, { w, h } = {}) {
|
|
|
247
247
|
}
|
|
248
248
|
|
|
249
249
|
function _getBidFloor(bid) {
|
|
250
|
-
if (!
|
|
250
|
+
if (!isFn(bid.getFloor)) {
|
|
251
251
|
return bid.params.bidFloor ? bid.params.bidFloor : null;
|
|
252
252
|
}
|
|
253
253
|
|
|
@@ -256,7 +256,7 @@ function _getBidFloor(bid) {
|
|
|
256
256
|
mediaType: '*',
|
|
257
257
|
size: '*'
|
|
258
258
|
});
|
|
259
|
-
if (
|
|
259
|
+
if (isPlainObject(floor) && !isNaN(floor.floor) && floor.currency === 'USD') {
|
|
260
260
|
return floor.floor;
|
|
261
261
|
}
|
|
262
262
|
return null;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
+
import { _each, deepClone, pick, deepSetValue, getOrigin, logError, logInfo } from '../src/utils.js';
|
|
1
2
|
import adapter from '../src/AnalyticsAdapter.js'
|
|
2
3
|
import adapterManager from '../src/adapterManager.js'
|
|
3
4
|
import CONSTANTS from '../src/constants.json'
|
|
4
|
-
import * as utils from '../src/utils.js'
|
|
5
5
|
import { ajax } from '../src/ajax.js'
|
|
6
6
|
import { config } from '../src/config.js'
|
|
7
7
|
|
|
@@ -64,7 +64,7 @@ const onAuctionInit = (args) => {
|
|
|
64
64
|
|
|
65
65
|
handleCustomFields(auction, AUCTION_INIT, args)
|
|
66
66
|
|
|
67
|
-
|
|
67
|
+
_each(adUnits, adUnit => {
|
|
68
68
|
auction.adUnits[adUnit.code] = {
|
|
69
69
|
...adUnit,
|
|
70
70
|
auctionId,
|
|
@@ -144,7 +144,7 @@ const onBidWon = (args) => {
|
|
|
144
144
|
}
|
|
145
145
|
|
|
146
146
|
const onBidTimeout = (args) => {
|
|
147
|
-
|
|
147
|
+
_each(args, bid => {
|
|
148
148
|
const { auctionId, adUnitCode } = bid
|
|
149
149
|
const bidId = parseBidId(bid)
|
|
150
150
|
let bidCache = auctions[auctionId].adUnits[adUnitCode].bids[bidId]
|
|
@@ -172,7 +172,7 @@ const onAuctionEnd = (args) => {
|
|
|
172
172
|
}
|
|
173
173
|
|
|
174
174
|
const onAdRenderFailed = (args) => {
|
|
175
|
-
const data =
|
|
175
|
+
const data = deepClone(args)
|
|
176
176
|
data.timestamp = Date.now()
|
|
177
177
|
|
|
178
178
|
if (data.bid) {
|
|
@@ -232,7 +232,7 @@ function handleEvent(eventType, args) {
|
|
|
232
232
|
}
|
|
233
233
|
|
|
234
234
|
function sendEvent(eventType, args, isRaw) {
|
|
235
|
-
let data =
|
|
235
|
+
let data = deepClone(args)
|
|
236
236
|
|
|
237
237
|
Object.assign(data, buildCommonDataProperties(), {
|
|
238
238
|
eventType
|
|
@@ -268,7 +268,7 @@ function checkEventsQueue() {
|
|
|
268
268
|
}
|
|
269
269
|
|
|
270
270
|
function buildAuctionData(auction) {
|
|
271
|
-
const auctionData =
|
|
271
|
+
const auctionData = deepClone(auction)
|
|
272
272
|
const keysToRemove = ['adUnitCodes', 'auctionStatus', 'bidderRequests', 'bidsReceived', 'noBids', 'winningBids', 'timestamp', 'config']
|
|
273
273
|
|
|
274
274
|
keysToRemove.forEach(key => {
|
|
@@ -367,12 +367,12 @@ function handleCustomFields(obj, eventType, args) {
|
|
|
367
367
|
const { pickFields, omitFields } = initOptions.serverConfig.events[eventType]
|
|
368
368
|
|
|
369
369
|
if (pickFields && obj && args) {
|
|
370
|
-
Object.assign(obj,
|
|
370
|
+
Object.assign(obj, pick(args, pickFields))
|
|
371
371
|
}
|
|
372
372
|
|
|
373
373
|
if (omitFields && obj && args) {
|
|
374
374
|
omitFields.forEach(field => {
|
|
375
|
-
|
|
375
|
+
deepSetValue(obj, field, undefined)
|
|
376
376
|
})
|
|
377
377
|
}
|
|
378
378
|
} catch (e) { }
|
|
@@ -382,7 +382,7 @@ function handleCustomRawFields(obj, omitRawFields) {
|
|
|
382
382
|
try {
|
|
383
383
|
if (omitRawFields && obj) {
|
|
384
384
|
omitRawFields.forEach(field => {
|
|
385
|
-
|
|
385
|
+
deepSetValue(obj, field, undefined)
|
|
386
386
|
})
|
|
387
387
|
}
|
|
388
388
|
} catch (e) { }
|
|
@@ -419,7 +419,7 @@ function sendPage() {
|
|
|
419
419
|
screenHeight: window.screen.height,
|
|
420
420
|
url: window.location.href,
|
|
421
421
|
protocol: window.location.protocol,
|
|
422
|
-
origin:
|
|
422
|
+
origin: getOrigin(),
|
|
423
423
|
referrer: getTopWindowReferrer(),
|
|
424
424
|
pbVersion: prebidVersion,
|
|
425
425
|
}
|
|
@@ -507,7 +507,7 @@ ooloAdapter.enableAnalytics = function (config) {
|
|
|
507
507
|
initOptions = config ? config.options : {}
|
|
508
508
|
|
|
509
509
|
if (!initOptions.pid) {
|
|
510
|
-
|
|
510
|
+
logError(buildLogMessage('enableAnalytics missing config object with "pid"'))
|
|
511
511
|
return
|
|
512
512
|
}
|
|
513
513
|
|
|
@@ -520,9 +520,9 @@ ooloAdapter.enableAnalytics = function (config) {
|
|
|
520
520
|
window.addEventListener('load', sendPage)
|
|
521
521
|
}
|
|
522
522
|
|
|
523
|
-
|
|
523
|
+
logInfo(buildLogMessage('enabled analytics adapter'), config)
|
|
524
524
|
ooloAdapter.enableAnalytics = function () {
|
|
525
|
-
|
|
525
|
+
logInfo(buildLogMessage('Analytics adapter already enabled..'))
|
|
526
526
|
}
|
|
527
527
|
}
|
|
528
528
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { isNumber, deepAccess, isArray, flatten, convertTypes, parseSizesInput } from '../src/utils.js';
|
|
2
2
|
import { registerBidder } from '../src/adapters/bidderFactory.js';
|
|
3
3
|
import { ADPOD, BANNER, VIDEO } from '../src/mediaTypes.js';
|
|
4
4
|
import { config } from '../src/config.js';
|
|
@@ -14,7 +14,7 @@ export const spec = {
|
|
|
14
14
|
gvlid: 280,
|
|
15
15
|
supportedMediaTypes: [VIDEO, BANNER, ADPOD],
|
|
16
16
|
isBidRequestValid: function (bid) {
|
|
17
|
-
return
|
|
17
|
+
return isNumber(deepAccess(bid, 'params.aid'));
|
|
18
18
|
},
|
|
19
19
|
getUserSyncs: function (syncOptions, serverResponses) {
|
|
20
20
|
const syncs = [];
|
|
@@ -43,9 +43,9 @@ export const spec = {
|
|
|
43
43
|
}
|
|
44
44
|
|
|
45
45
|
if (syncOptions.pixelEnabled || syncOptions.iframeEnabled) {
|
|
46
|
-
|
|
46
|
+
isArray(serverResponses) && serverResponses.forEach((response) => {
|
|
47
47
|
if (response.body) {
|
|
48
|
-
if (
|
|
48
|
+
if (isArray(response.body)) {
|
|
49
49
|
response.body.forEach(b => {
|
|
50
50
|
addSyncs(b);
|
|
51
51
|
})
|
|
@@ -82,26 +82,26 @@ export const spec = {
|
|
|
82
82
|
serverResponse = serverResponse.body;
|
|
83
83
|
let bids = [];
|
|
84
84
|
|
|
85
|
-
if (!
|
|
85
|
+
if (!isArray(serverResponse)) {
|
|
86
86
|
return parseRTBResponse(serverResponse, adapterRequest);
|
|
87
87
|
}
|
|
88
88
|
|
|
89
89
|
serverResponse.forEach(serverBidResponse => {
|
|
90
|
-
bids =
|
|
90
|
+
bids = flatten(bids, parseRTBResponse(serverBidResponse, adapterRequest));
|
|
91
91
|
});
|
|
92
92
|
|
|
93
93
|
return bids;
|
|
94
94
|
},
|
|
95
95
|
|
|
96
96
|
transformBidParams(params) {
|
|
97
|
-
return
|
|
97
|
+
return convertTypes({
|
|
98
98
|
'aid': 'number',
|
|
99
99
|
}, params);
|
|
100
100
|
}
|
|
101
101
|
};
|
|
102
102
|
|
|
103
103
|
function parseRTBResponse(serverResponse, adapterRequest) {
|
|
104
|
-
const isEmptyResponse = !serverResponse || !
|
|
104
|
+
const isEmptyResponse = !serverResponse || !isArray(serverResponse.bids);
|
|
105
105
|
const bids = [];
|
|
106
106
|
|
|
107
107
|
if (isEmptyResponse) {
|
|
@@ -126,26 +126,26 @@ function parseRTBResponse(serverResponse, adapterRequest) {
|
|
|
126
126
|
function bidToTag(bidRequests, adapterRequest) {
|
|
127
127
|
// start publisher env
|
|
128
128
|
const tag = {
|
|
129
|
-
Domain:
|
|
129
|
+
Domain: deepAccess(adapterRequest, 'refererInfo.referer')
|
|
130
130
|
};
|
|
131
131
|
if (config.getConfig('coppa') === true) {
|
|
132
132
|
tag.Coppa = 1;
|
|
133
133
|
}
|
|
134
|
-
if (
|
|
134
|
+
if (deepAccess(adapterRequest, 'gdprConsent.gdprApplies')) {
|
|
135
135
|
tag.GDPR = 1;
|
|
136
|
-
tag.GDPRConsent =
|
|
136
|
+
tag.GDPRConsent = deepAccess(adapterRequest, 'gdprConsent.consentString');
|
|
137
137
|
}
|
|
138
|
-
if (
|
|
139
|
-
tag.USP =
|
|
138
|
+
if (deepAccess(adapterRequest, 'uspConsent')) {
|
|
139
|
+
tag.USP = deepAccess(adapterRequest, 'uspConsent');
|
|
140
140
|
}
|
|
141
|
-
if (
|
|
142
|
-
tag.Schain =
|
|
141
|
+
if (deepAccess(bidRequests[0], 'schain')) {
|
|
142
|
+
tag.Schain = deepAccess(bidRequests[0], 'schain');
|
|
143
143
|
}
|
|
144
|
-
if (
|
|
145
|
-
tag.UserIds =
|
|
144
|
+
if (deepAccess(bidRequests[0], 'userId')) {
|
|
145
|
+
tag.UserIds = deepAccess(bidRequests[0], 'userId');
|
|
146
146
|
}
|
|
147
|
-
if (
|
|
148
|
-
tag.UserEids =
|
|
147
|
+
if (deepAccess(bidRequests[0], 'userIdAsEids')) {
|
|
148
|
+
tag.UserEids = deepAccess(bidRequests[0], 'userIdAsEids');
|
|
149
149
|
}
|
|
150
150
|
// end publisher env
|
|
151
151
|
const bids = []
|
|
@@ -164,13 +164,13 @@ function bidToTag(bidRequests, adapterRequest) {
|
|
|
164
164
|
* @returns {object}
|
|
165
165
|
*/
|
|
166
166
|
function prepareBidRequests(bidReq) {
|
|
167
|
-
const mediaType =
|
|
168
|
-
const sizes = mediaType === VIDEO ?
|
|
167
|
+
const mediaType = deepAccess(bidReq, 'mediaTypes.video') ? VIDEO : DISPLAY;
|
|
168
|
+
const sizes = mediaType === VIDEO ? deepAccess(bidReq, 'mediaTypes.video.playerSize') : deepAccess(bidReq, 'mediaTypes.banner.sizes');
|
|
169
169
|
const bidReqParams = {
|
|
170
170
|
'CallbackId': bidReq.bidId,
|
|
171
171
|
'Aid': bidReq.params.aid,
|
|
172
172
|
'AdType': mediaType,
|
|
173
|
-
'Sizes':
|
|
173
|
+
'Sizes': parseSizesInput(sizes).join(',')
|
|
174
174
|
};
|
|
175
175
|
|
|
176
176
|
bidReqParams.PlacementId = bidReq.adUnitCode;
|
|
@@ -178,9 +178,9 @@ function prepareBidRequests(bidReq) {
|
|
|
178
178
|
bidReqParams.AdmType = 'iframe';
|
|
179
179
|
}
|
|
180
180
|
if (mediaType === VIDEO) {
|
|
181
|
-
const context =
|
|
181
|
+
const context = deepAccess(bidReq, 'mediaTypes.video.context');
|
|
182
182
|
if (context === ADPOD) {
|
|
183
|
-
bidReqParams.Adpod =
|
|
183
|
+
bidReqParams.Adpod = deepAccess(bidReq, 'mediaTypes.video');
|
|
184
184
|
}
|
|
185
185
|
}
|
|
186
186
|
return bidReqParams;
|
|
@@ -192,7 +192,7 @@ function prepareBidRequests(bidReq) {
|
|
|
192
192
|
* @returns {object}
|
|
193
193
|
*/
|
|
194
194
|
function getMediaType(bidderRequest) {
|
|
195
|
-
return
|
|
195
|
+
return deepAccess(bidderRequest, 'mediaTypes.video') ? VIDEO : BANNER;
|
|
196
196
|
}
|
|
197
197
|
|
|
198
198
|
/**
|
|
@@ -203,7 +203,7 @@ function getMediaType(bidderRequest) {
|
|
|
203
203
|
*/
|
|
204
204
|
function createBid(bidResponse, bidRequest) {
|
|
205
205
|
const mediaType = getMediaType(bidRequest)
|
|
206
|
-
const context =
|
|
206
|
+
const context = deepAccess(bidRequest, 'mediaTypes.video.context');
|
|
207
207
|
const bid = {
|
|
208
208
|
requestId: bidResponse.requestId,
|
|
209
209
|
creativeId: bidResponse.cmpId,
|