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
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { logError, isEmpty, deepAccess, triggerPixel, logWarn, isArray } from '../src/utils.js';
|
|
2
2
|
import {createBid as createBidFactory} from '../src/bidfactory.js';
|
|
3
3
|
import {registerBidder} from '../src/adapters/bidderFactory.js';
|
|
4
4
|
import {VIDEO} from '../src/mediaTypes.js';
|
|
@@ -73,7 +73,7 @@ export const spec = {
|
|
|
73
73
|
}
|
|
74
74
|
});
|
|
75
75
|
} catch (error) {
|
|
76
|
-
|
|
76
|
+
logError(error);
|
|
77
77
|
width = 0;
|
|
78
78
|
height = 0;
|
|
79
79
|
}
|
|
@@ -83,8 +83,8 @@ export const spec = {
|
|
|
83
83
|
if (bidResult && bidResult.error) {
|
|
84
84
|
errorMessage += `: ${bidResult.error}`;
|
|
85
85
|
}
|
|
86
|
-
|
|
87
|
-
} else if (!
|
|
86
|
+
logError(errorMessage);
|
|
87
|
+
} else if (!isEmpty(bidResult.seatbid)) {
|
|
88
88
|
bidResult.seatbid[0].bid.forEach(tag => {
|
|
89
89
|
bids.push(createBid(STATUS.GOOD, bidderRequest, tag, width, height, BIDDER_CODE));
|
|
90
90
|
});
|
|
@@ -102,7 +102,7 @@ export const spec = {
|
|
|
102
102
|
getUserSyncs: function (syncOptions, serverResponses) {
|
|
103
103
|
const syncs = [];
|
|
104
104
|
if (syncOptions.pixelEnabled && serverResponses.length) {
|
|
105
|
-
(
|
|
105
|
+
(deepAccess(serverResponses, '0.body.ext.telaria.userSync') || []).forEach(url => syncs.push({type: 'image', url: url}));
|
|
106
106
|
}
|
|
107
107
|
return syncs;
|
|
108
108
|
},
|
|
@@ -114,7 +114,7 @@ export const spec = {
|
|
|
114
114
|
onTimeout: function (timeoutData) {
|
|
115
115
|
let url = getTimeoutUrl(timeoutData);
|
|
116
116
|
if (url) {
|
|
117
|
-
|
|
117
|
+
triggerPixel(url);
|
|
118
118
|
}
|
|
119
119
|
}
|
|
120
120
|
};
|
|
@@ -135,7 +135,7 @@ function getEncodedValIfNotEmpty(val) {
|
|
|
135
135
|
* @returns {string}
|
|
136
136
|
*/
|
|
137
137
|
function getSupplyChainAsUrlParam(schainObject) {
|
|
138
|
-
if (
|
|
138
|
+
if (isEmpty(schainObject)) {
|
|
139
139
|
return '';
|
|
140
140
|
}
|
|
141
141
|
|
|
@@ -157,22 +157,22 @@ function getSupplyChainAsUrlParam(schainObject) {
|
|
|
157
157
|
function getUrlParams(params, schainFromBidRequest) {
|
|
158
158
|
let urlSuffix = '';
|
|
159
159
|
|
|
160
|
-
if (!
|
|
160
|
+
if (!isEmpty(params)) {
|
|
161
161
|
for (let key in params) {
|
|
162
|
-
if (key !== 'schain' && params.hasOwnProperty(key) && !
|
|
162
|
+
if (key !== 'schain' && params.hasOwnProperty(key) && !isEmpty(params[key])) {
|
|
163
163
|
urlSuffix += `&${key}=${params[key]}`;
|
|
164
164
|
}
|
|
165
165
|
}
|
|
166
|
-
urlSuffix += getSupplyChainAsUrlParam(!
|
|
166
|
+
urlSuffix += getSupplyChainAsUrlParam(!isEmpty(schainFromBidRequest) ? schainFromBidRequest : params['schain']);
|
|
167
167
|
}
|
|
168
168
|
|
|
169
169
|
return urlSuffix;
|
|
170
170
|
}
|
|
171
171
|
|
|
172
172
|
export const getTimeoutUrl = function(timeoutData) {
|
|
173
|
-
let params =
|
|
173
|
+
let params = deepAccess(timeoutData, '0.params.0');
|
|
174
174
|
|
|
175
|
-
if (!
|
|
175
|
+
if (!isEmpty(params)) {
|
|
176
176
|
let url = `https://${EVENTS_ENDPOINT}`;
|
|
177
177
|
|
|
178
178
|
params = Object.assign({
|
|
@@ -195,14 +195,14 @@ export const getTimeoutUrl = function(timeoutData) {
|
|
|
195
195
|
* @returns {string}
|
|
196
196
|
*/
|
|
197
197
|
function generateUrl(bid, bidderRequest) {
|
|
198
|
-
let playerSize =
|
|
198
|
+
let playerSize = deepAccess(bid, 'mediaTypes.video.playerSize');
|
|
199
199
|
if (!playerSize) {
|
|
200
|
-
|
|
200
|
+
logWarn(`Although player size isn't required it is highly recommended`);
|
|
201
201
|
}
|
|
202
202
|
|
|
203
203
|
let width, height;
|
|
204
204
|
if (playerSize) {
|
|
205
|
-
if (
|
|
205
|
+
if (isArray(playerSize) && (playerSize.length === 2) && (!isNaN(playerSize[0]) && !isNaN(playerSize[1]))) {
|
|
206
206
|
width = playerSize[0];
|
|
207
207
|
height = playerSize[1];
|
|
208
208
|
} else if (typeof playerSize === 'object') {
|
|
@@ -211,8 +211,8 @@ function generateUrl(bid, bidderRequest) {
|
|
|
211
211
|
}
|
|
212
212
|
}
|
|
213
213
|
|
|
214
|
-
let supplyCode =
|
|
215
|
-
let adCode =
|
|
214
|
+
let supplyCode = deepAccess(bid, 'params.supplyCode');
|
|
215
|
+
let adCode = deepAccess(bid, 'params.adCode');
|
|
216
216
|
|
|
217
217
|
if (supplyCode && adCode) {
|
|
218
218
|
let url = `https://${supplyCode}.${TAG_ENDPOINT}?adCode=${adCode}`;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { parseSizesInput, parseQueryStringParameters, logError } from '../src/utils.js';
|
|
2
2
|
import { registerBidder } from '../src/adapters/bidderFactory.js';
|
|
3
3
|
import { BANNER, NATIVE } from '../src/mediaTypes.js';
|
|
4
4
|
|
|
@@ -36,7 +36,7 @@ export const spec = {
|
|
|
36
36
|
requestid: req.bidId
|
|
37
37
|
};
|
|
38
38
|
if (mediaType === 'display') {
|
|
39
|
-
data.sizes =
|
|
39
|
+
data.sizes = parseSizesInput(
|
|
40
40
|
req.mediaTypes && req.mediaTypes.banner && req.mediaTypes.banner.sizes
|
|
41
41
|
).join('|')
|
|
42
42
|
}
|
|
@@ -44,7 +44,7 @@ export const spec = {
|
|
|
44
44
|
return {
|
|
45
45
|
method: ENDPOINT_METHOD,
|
|
46
46
|
url: ENDPOINT_URL,
|
|
47
|
-
data:
|
|
47
|
+
data: parseQueryStringParameters(data),
|
|
48
48
|
options: { withCredentials: false, requestId: req.bidId, mediaType: mediaType }
|
|
49
49
|
};
|
|
50
50
|
});
|
|
@@ -128,7 +128,7 @@ export const spec = {
|
|
|
128
128
|
}
|
|
129
129
|
return bidResponses;
|
|
130
130
|
} catch (err) {
|
|
131
|
-
|
|
131
|
+
logError(err);
|
|
132
132
|
return [];
|
|
133
133
|
}
|
|
134
134
|
},
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
+
import { parseSizesInput, getWindowLocation, buildUrl } from '../src/utils.js';
|
|
1
2
|
import { ajax } from '../src/ajax.js';
|
|
2
3
|
import adapter from '../src/AnalyticsAdapter.js';
|
|
3
4
|
import adapterManager from '../src/adapterManager.js';
|
|
4
5
|
import CONSTANTS from '../src/constants.json';
|
|
5
|
-
import * as utils from '../src/utils.js';
|
|
6
6
|
|
|
7
7
|
const emptyUrl = '';
|
|
8
8
|
const analyticsType = 'endpoint';
|
|
@@ -56,7 +56,7 @@ function mapBidRequests(params) {
|
|
|
56
56
|
requestId: bid.bidderRequestId,
|
|
57
57
|
auctionId: bid.auctionId,
|
|
58
58
|
transactionId: bid.transactionId,
|
|
59
|
-
sizes:
|
|
59
|
+
sizes: parseSizesInput(bid.mediaTypes.banner.sizes).toString(),
|
|
60
60
|
renderStatus: 1,
|
|
61
61
|
requestTimestamp: params.auctionStart
|
|
62
62
|
});
|
|
@@ -110,13 +110,13 @@ function mapBidResponse(bidResponse, status) {
|
|
|
110
110
|
}
|
|
111
111
|
|
|
112
112
|
function send(data, status) {
|
|
113
|
-
let location =
|
|
113
|
+
let location = getWindowLocation();
|
|
114
114
|
if (typeof data !== 'undefined' && typeof data.auctionInit !== 'undefined') {
|
|
115
115
|
Object.assign(data.auctionInit, { host: location.host, path: location.pathname, search: location.search });
|
|
116
116
|
}
|
|
117
117
|
data.initOptions = initOptions;
|
|
118
118
|
|
|
119
|
-
let terceptAnalyticsRequestUrl =
|
|
119
|
+
let terceptAnalyticsRequestUrl = buildUrl({
|
|
120
120
|
protocol: 'https',
|
|
121
121
|
hostname: (initOptions && initOptions.hostName) || defaultHostName,
|
|
122
122
|
pathname: (initOptions && initOptions.pathName) || defaultPathName,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { logInfo, isEmpty, deepAccess, parseUrl, getDNT, parseSizesInput, _map } from '../src/utils.js';
|
|
2
2
|
import {
|
|
3
3
|
BANNER,
|
|
4
4
|
NATIVE,
|
|
@@ -125,7 +125,7 @@ export const spec = {
|
|
|
125
125
|
* @return boolean True if this is a valid bid, and false otherwise.
|
|
126
126
|
*/
|
|
127
127
|
isBidRequestValid: function (bid) {
|
|
128
|
-
|
|
128
|
+
logInfo('theadx.isBidRequestValid', bid);
|
|
129
129
|
let res = false;
|
|
130
130
|
if (bid && bid.params) {
|
|
131
131
|
res = !!(bid.params.pid && bid.params.tagId);
|
|
@@ -141,10 +141,10 @@ export const spec = {
|
|
|
141
141
|
* @return ServerRequest Info describing the request to the server.
|
|
142
142
|
*/
|
|
143
143
|
buildRequests: function (validBidRequests, bidderRequest) {
|
|
144
|
-
|
|
144
|
+
logInfo('theadx.buildRequests', 'validBidRequests', validBidRequests, 'bidderRequest', bidderRequest);
|
|
145
145
|
let results = [];
|
|
146
146
|
const requestType = 'POST';
|
|
147
|
-
if (!
|
|
147
|
+
if (!isEmpty(validBidRequests)) {
|
|
148
148
|
results = validBidRequests.map(
|
|
149
149
|
bidRequest => {
|
|
150
150
|
return {
|
|
@@ -176,7 +176,7 @@ export const spec = {
|
|
|
176
176
|
* @return {Bid[]} An array of bids which were nested inside the server.
|
|
177
177
|
*/
|
|
178
178
|
interpretResponse: (serverResponse, request) => {
|
|
179
|
-
|
|
179
|
+
logInfo('theadx.interpretResponse', 'serverResponse', serverResponse, ' request', request);
|
|
180
180
|
|
|
181
181
|
let responses = [];
|
|
182
182
|
|
|
@@ -185,8 +185,8 @@ export const spec = {
|
|
|
185
185
|
|
|
186
186
|
let seatBids = responseBody.seatbid;
|
|
187
187
|
|
|
188
|
-
if (!(
|
|
189
|
-
|
|
188
|
+
if (!(isEmpty(seatBids) ||
|
|
189
|
+
isEmpty(seatBids[0].bid))) {
|
|
190
190
|
let seatBid = seatBids[0];
|
|
191
191
|
let bid = seatBid.bid[0];
|
|
192
192
|
|
|
@@ -280,7 +280,7 @@ export const spec = {
|
|
|
280
280
|
* @return {UserSync[]} The user syncs which should be dropped.
|
|
281
281
|
*/
|
|
282
282
|
getUserSyncs: function (syncOptions, serverResponses) {
|
|
283
|
-
|
|
283
|
+
logInfo('theadx.getUserSyncs', 'syncOptions', syncOptions, 'serverResponses', serverResponses)
|
|
284
284
|
const syncs = [];
|
|
285
285
|
|
|
286
286
|
if (!syncOptions.iframeEnabled && !syncOptions.pixelEnabled) {
|
|
@@ -288,8 +288,8 @@ export const spec = {
|
|
|
288
288
|
}
|
|
289
289
|
|
|
290
290
|
serverResponses.forEach(resp => {
|
|
291
|
-
const syncIframeUrls =
|
|
292
|
-
const syncImageUrls =
|
|
291
|
+
const syncIframeUrls = deepAccess(resp, 'body.ext.sync.iframe');
|
|
292
|
+
const syncImageUrls = deepAccess(resp, 'body.ext.sync.image');
|
|
293
293
|
if (syncOptions.iframeEnabled && syncIframeUrls) {
|
|
294
294
|
syncIframeUrls.forEach(syncIframeUrl => {
|
|
295
295
|
syncs.push({
|
|
@@ -314,7 +314,7 @@ export const spec = {
|
|
|
314
314
|
}
|
|
315
315
|
|
|
316
316
|
let buildSiteComponent = (bidRequest, bidderRequest) => {
|
|
317
|
-
let loc =
|
|
317
|
+
let loc = parseUrl(bidderRequest.refererInfo.referer, {
|
|
318
318
|
decodeSearchAsString: true
|
|
319
319
|
});
|
|
320
320
|
|
|
@@ -353,7 +353,7 @@ let buildDeviceComponent = (bidRequest, bidderRequest) => {
|
|
|
353
353
|
language: ('language' in navigator) ? navigator.language : null,
|
|
354
354
|
ua: ('userAgent' in navigator) ? navigator.userAgent : null,
|
|
355
355
|
devicetype: isMobile() ? 1 : isConnectedTV() ? 3 : 2,
|
|
356
|
-
dnt:
|
|
356
|
+
dnt: getDNT() ? 1 : 0,
|
|
357
357
|
};
|
|
358
358
|
// Include connection info if available
|
|
359
359
|
const CONNECTION = navigator.connection || navigator.webkitConnection;
|
|
@@ -383,14 +383,14 @@ let extractValidSize = (bidRequest, bidderRequest) => {
|
|
|
383
383
|
} else {
|
|
384
384
|
requestedSizes = mediaTypes.video.sizes;
|
|
385
385
|
}
|
|
386
|
-
} else if (!
|
|
386
|
+
} else if (!isEmpty(bidRequest.sizes)) {
|
|
387
387
|
requestedSizes = bidRequest.sizes
|
|
388
388
|
}
|
|
389
389
|
|
|
390
390
|
// Ensure the size array is normalized
|
|
391
|
-
let conformingSize =
|
|
391
|
+
let conformingSize = parseSizesInput(requestedSizes);
|
|
392
392
|
|
|
393
|
-
if (!
|
|
393
|
+
if (!isEmpty(conformingSize) && conformingSize[0] != null) {
|
|
394
394
|
// Currently only the first size is utilized
|
|
395
395
|
let splitSizes = conformingSize[0].split('x');
|
|
396
396
|
|
|
@@ -423,7 +423,7 @@ let generateBannerComponent = (bidRequest, bidderRequest) => {
|
|
|
423
423
|
}
|
|
424
424
|
|
|
425
425
|
let generateNativeComponent = (bidRequest, bidderRequest) => {
|
|
426
|
-
const assets =
|
|
426
|
+
const assets = _map(bidRequest.mediaTypes.native, (bidParams, key) => {
|
|
427
427
|
const props = NATIVEPROBS[key];
|
|
428
428
|
const asset = {
|
|
429
429
|
required: bidParams.required & 1,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
|
|
2
2
|
import { submodule } from '../src/hook.js';
|
|
3
3
|
import * as ajax from '../src/ajax.js';
|
|
4
|
-
import
|
|
4
|
+
import { logInfo, deepAccess, logError } from '../src/utils.js';
|
|
5
5
|
import { getGlobal } from '../src/prebidGlobal.js';
|
|
6
6
|
|
|
7
7
|
const SUBMODULE_NAME = 'timeout';
|
|
@@ -70,14 +70,14 @@ function getConnectionSpeed() {
|
|
|
70
70
|
* @return {int}
|
|
71
71
|
*/
|
|
72
72
|
function calculateTimeoutModifier(adUnits, rules) {
|
|
73
|
-
|
|
73
|
+
logInfo('Timeout rules', rules);
|
|
74
74
|
let timeoutModifier = 0;
|
|
75
75
|
let toAdd = 0;
|
|
76
76
|
|
|
77
77
|
if (rules.includesVideo) {
|
|
78
78
|
const hasVideo = timeoutRtdFunctions.checkVideo(adUnits);
|
|
79
79
|
toAdd = rules.includesVideo[hasVideo] || 0;
|
|
80
|
-
|
|
80
|
+
logInfo(`Adding ${toAdd} to timeout for includesVideo ${hasVideo}`)
|
|
81
81
|
timeoutModifier += toAdd;
|
|
82
82
|
}
|
|
83
83
|
|
|
@@ -89,7 +89,7 @@ function calculateTimeoutModifier(adUnits, rules) {
|
|
|
89
89
|
for (const [rangeStr, timeoutVal] of entries(rules.numAdUnits)) {
|
|
90
90
|
const [lowerBound, upperBound] = rangeStr.split('-');
|
|
91
91
|
if (parseInt(lowerBound) <= numAdUnits && numAdUnits <= parseInt(upperBound)) {
|
|
92
|
-
|
|
92
|
+
logInfo(`Adding ${timeoutVal} to timeout for numAdUnits ${numAdUnits}`)
|
|
93
93
|
timeoutModifier += timeoutVal;
|
|
94
94
|
break;
|
|
95
95
|
}
|
|
@@ -100,18 +100,18 @@ function calculateTimeoutModifier(adUnits, rules) {
|
|
|
100
100
|
if (rules.deviceType) {
|
|
101
101
|
const deviceType = timeoutRtdFunctions.getDeviceType();
|
|
102
102
|
toAdd = rules.deviceType[deviceType] || 0;
|
|
103
|
-
|
|
103
|
+
logInfo(`Adding ${toAdd} to timeout for deviceType ${deviceType}`)
|
|
104
104
|
timeoutModifier += toAdd;
|
|
105
105
|
}
|
|
106
106
|
|
|
107
107
|
if (rules.connectionSpeed) {
|
|
108
108
|
const connectionSpeed = timeoutRtdFunctions.getConnectionSpeed();
|
|
109
109
|
toAdd = rules.connectionSpeed[connectionSpeed] || 0;
|
|
110
|
-
|
|
110
|
+
logInfo(`Adding ${toAdd} to timeout for connectionSpeed ${connectionSpeed}`)
|
|
111
111
|
timeoutModifier += toAdd;
|
|
112
112
|
}
|
|
113
113
|
|
|
114
|
-
|
|
114
|
+
logInfo('timeout Modifier calculated', timeoutModifier);
|
|
115
115
|
return timeoutModifier;
|
|
116
116
|
}
|
|
117
117
|
|
|
@@ -123,30 +123,30 @@ function calculateTimeoutModifier(adUnits, rules) {
|
|
|
123
123
|
* @param {Object} userConsent
|
|
124
124
|
*/
|
|
125
125
|
function getBidRequestData(reqBidsConfigObj, callback, config, userConsent) {
|
|
126
|
-
|
|
127
|
-
const timeoutUrl =
|
|
126
|
+
logInfo('Timeout rtd config', config);
|
|
127
|
+
const timeoutUrl = deepAccess(config, 'params.endpoint.url');
|
|
128
128
|
if (timeoutUrl) {
|
|
129
|
-
|
|
129
|
+
logInfo('Timeout url', timeoutUrl);
|
|
130
130
|
ajax.ajaxBuilder()(timeoutUrl, {
|
|
131
131
|
success: function(response) {
|
|
132
132
|
try {
|
|
133
133
|
const rules = JSON.parse(response);
|
|
134
134
|
timeoutRtdFunctions.handleTimeoutIncrement(reqBidsConfigObj, rules);
|
|
135
135
|
} catch (e) {
|
|
136
|
-
|
|
136
|
+
logError('Error parsing json response from timeout provider.')
|
|
137
137
|
}
|
|
138
138
|
callback();
|
|
139
139
|
},
|
|
140
140
|
error: function(errorStatus) {
|
|
141
|
-
|
|
141
|
+
logError('Timeout request error!', errorStatus);
|
|
142
142
|
callback();
|
|
143
143
|
}
|
|
144
144
|
});
|
|
145
|
-
} else if (
|
|
146
|
-
timeoutRtdFunctions.handleTimeoutIncrement(reqBidsConfigObj,
|
|
145
|
+
} else if (deepAccess(config, 'params.rules')) {
|
|
146
|
+
timeoutRtdFunctions.handleTimeoutIncrement(reqBidsConfigObj, deepAccess(config, 'params.rules'));
|
|
147
147
|
callback();
|
|
148
148
|
} else {
|
|
149
|
-
|
|
149
|
+
logInfo('No timeout endpoint or timeout rules found. Exiting timeout rtd module');
|
|
150
150
|
callback();
|
|
151
151
|
}
|
|
152
152
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* eslint-disable no-tabs */
|
|
2
2
|
import { registerBidder } from '../src/adapters/bidderFactory.js';
|
|
3
|
-
import
|
|
3
|
+
import { parseUrl, deepAccess } from '../src/utils.js';
|
|
4
4
|
import { BANNER } from '../src/mediaTypes.js';
|
|
5
5
|
|
|
6
6
|
export const ADAPTER_VERSION = '1';
|
|
@@ -72,7 +72,7 @@ registerBidder(spec);
|
|
|
72
72
|
* Creates site description object
|
|
73
73
|
*/
|
|
74
74
|
function createSite(refInfo) {
|
|
75
|
-
let url =
|
|
75
|
+
let url = parseUrl(refInfo.referer);
|
|
76
76
|
let site = {
|
|
77
77
|
'domain': url.hostname,
|
|
78
78
|
'page': url.protocol + '://' + url.hostname + url.pathname
|
|
@@ -102,7 +102,7 @@ function parseSizes(sizes) {
|
|
|
102
102
|
}
|
|
103
103
|
|
|
104
104
|
function getBannerSizes(bidRequest) {
|
|
105
|
-
return parseSizes(
|
|
105
|
+
return parseSizes(deepAccess(bidRequest, 'mediaTypes.banner.sizes') || bidRequest.sizes);
|
|
106
106
|
}
|
|
107
107
|
|
|
108
108
|
function bidToRequest(bid) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { getBidIdParameter, parseSizesInput, tryAppendQueryString } from '../src/utils.js';
|
|
2
2
|
import {registerBidder} from '../src/adapters/bidderFactory.js';
|
|
3
3
|
import { getStorageManager } from '../src/storageManager.js';
|
|
4
4
|
|
|
@@ -112,11 +112,11 @@ function getPublisherUrl() {
|
|
|
112
112
|
}
|
|
113
113
|
|
|
114
114
|
function buildTrionUrlParams(bid, bidderRequest) {
|
|
115
|
-
var pubId =
|
|
116
|
-
var sectionId =
|
|
115
|
+
var pubId = getBidIdParameter('pubId', bid.params);
|
|
116
|
+
var sectionId = getBidIdParameter('sectionId', bid.params);
|
|
117
117
|
var url = getPublisherUrl();
|
|
118
118
|
var bidSizes = getBidSizesFromBidRequest(bid);
|
|
119
|
-
var sizes =
|
|
119
|
+
var sizes = parseSizesInput(bidSizes).join(',');
|
|
120
120
|
var isAutomated = (navigator && navigator.webdriver) ? '1' : '0';
|
|
121
121
|
var isHidden = (document.hidden) ? '1' : '0';
|
|
122
122
|
var visibilityState = encodeURIComponent(document.visibilityState);
|
|
@@ -131,10 +131,10 @@ function buildTrionUrlParams(bid, bidderRequest) {
|
|
|
131
131
|
setStorageData(BASE_KEY + 'lps', pubId + ':' + sectionId);
|
|
132
132
|
var trionUrl = '';
|
|
133
133
|
|
|
134
|
-
trionUrl =
|
|
135
|
-
trionUrl =
|
|
136
|
-
trionUrl =
|
|
137
|
-
trionUrl =
|
|
134
|
+
trionUrl = tryAppendQueryString(trionUrl, 'bidId', bid.bidId);
|
|
135
|
+
trionUrl = tryAppendQueryString(trionUrl, 'pubId', pubId);
|
|
136
|
+
trionUrl = tryAppendQueryString(trionUrl, 'sectionId', sectionId);
|
|
137
|
+
trionUrl = tryAppendQueryString(trionUrl, 'vers', '$prebid.version$');
|
|
138
138
|
if (url) {
|
|
139
139
|
trionUrl += 'url=' + url + '&';
|
|
140
140
|
}
|
|
@@ -142,22 +142,22 @@ function buildTrionUrlParams(bid, bidderRequest) {
|
|
|
142
142
|
trionUrl += 'sizes=' + sizes + '&';
|
|
143
143
|
}
|
|
144
144
|
if (intT) {
|
|
145
|
-
trionUrl =
|
|
145
|
+
trionUrl = tryAppendQueryString(trionUrl, 'int_t', encodeURIComponent(intT));
|
|
146
146
|
}
|
|
147
|
-
trionUrl =
|
|
148
|
-
trionUrl =
|
|
149
|
-
trionUrl =
|
|
147
|
+
trionUrl = tryAppendQueryString(trionUrl, 'tr_wd', isAutomated);
|
|
148
|
+
trionUrl = tryAppendQueryString(trionUrl, 'tr_hd', isHidden);
|
|
149
|
+
trionUrl = tryAppendQueryString(trionUrl, 'tr_vs', visibilityState);
|
|
150
150
|
if (bidderRequest && bidderRequest.gdprConsent) {
|
|
151
151
|
var gdpr = bidderRequest.gdprConsent;
|
|
152
152
|
if (gdpr) {
|
|
153
153
|
if (gdpr.consentString) {
|
|
154
|
-
trionUrl =
|
|
154
|
+
trionUrl = tryAppendQueryString(trionUrl, 'gdprc', encodeURIComponent(gdpr.consentString));
|
|
155
155
|
}
|
|
156
|
-
trionUrl =
|
|
156
|
+
trionUrl = tryAppendQueryString(trionUrl, 'gdpr', (gdpr.gdprApplies ? 1 : 0));
|
|
157
157
|
}
|
|
158
158
|
}
|
|
159
159
|
if (bidderRequest && bidderRequest.uspConsent) {
|
|
160
|
-
trionUrl =
|
|
160
|
+
trionUrl = tryAppendQueryString(trionUrl, 'usp', encodeURIComponent(bidderRequest.uspConsent));
|
|
161
161
|
}
|
|
162
162
|
// remove the trailing "&"
|
|
163
163
|
if (trionUrl.lastIndexOf('&') === trionUrl.length - 1) {
|
|
@@ -1,11 +1,13 @@
|
|
|
1
|
+
import { tryAppendQueryString, logMessage, isEmpty } from '../src/utils.js';
|
|
1
2
|
import { BANNER, VIDEO } from '../src/mediaTypes.js';
|
|
2
3
|
import { registerBidder } from '../src/adapters/bidderFactory.js';
|
|
3
|
-
import * as utils from '../src/utils.js';
|
|
4
4
|
import { config } from '../src/config.js';
|
|
5
5
|
|
|
6
6
|
const GVLID = 28;
|
|
7
7
|
const BIDDER_CODE = 'triplelift';
|
|
8
8
|
const STR_ENDPOINT = 'https://tlx.3lift.com/header/auction?';
|
|
9
|
+
const BANNER_TIME_TO_LIVE = 300;
|
|
10
|
+
const INSTREAM_TIME_TO_LIVE = 3600;
|
|
9
11
|
let gdprApplies = true;
|
|
10
12
|
let consentString = null;
|
|
11
13
|
|
|
@@ -21,41 +23,41 @@ export const tripleliftAdapterSpec = {
|
|
|
21
23
|
let tlCall = STR_ENDPOINT;
|
|
22
24
|
let data = _buildPostBody(bidRequests);
|
|
23
25
|
|
|
24
|
-
tlCall =
|
|
25
|
-
tlCall =
|
|
26
|
+
tlCall = tryAppendQueryString(tlCall, 'lib', 'prebid');
|
|
27
|
+
tlCall = tryAppendQueryString(tlCall, 'v', '$prebid.version$');
|
|
26
28
|
|
|
27
29
|
if (bidderRequest && bidderRequest.refererInfo) {
|
|
28
30
|
let referrer = bidderRequest.refererInfo.referer;
|
|
29
|
-
tlCall =
|
|
31
|
+
tlCall = tryAppendQueryString(tlCall, 'referrer', referrer);
|
|
30
32
|
}
|
|
31
33
|
|
|
32
34
|
if (bidderRequest && bidderRequest.timeout) {
|
|
33
|
-
tlCall =
|
|
35
|
+
tlCall = tryAppendQueryString(tlCall, 'tmax', bidderRequest.timeout);
|
|
34
36
|
}
|
|
35
37
|
|
|
36
38
|
if (bidderRequest && bidderRequest.gdprConsent) {
|
|
37
39
|
if (typeof bidderRequest.gdprConsent.gdprApplies !== 'undefined') {
|
|
38
40
|
gdprApplies = bidderRequest.gdprConsent.gdprApplies;
|
|
39
|
-
tlCall =
|
|
41
|
+
tlCall = tryAppendQueryString(tlCall, 'gdpr', gdprApplies.toString());
|
|
40
42
|
}
|
|
41
43
|
if (typeof bidderRequest.gdprConsent.consentString !== 'undefined') {
|
|
42
44
|
consentString = bidderRequest.gdprConsent.consentString;
|
|
43
|
-
tlCall =
|
|
45
|
+
tlCall = tryAppendQueryString(tlCall, 'cmp_cs', consentString);
|
|
44
46
|
}
|
|
45
47
|
}
|
|
46
48
|
|
|
47
49
|
if (bidderRequest && bidderRequest.uspConsent) {
|
|
48
|
-
tlCall =
|
|
50
|
+
tlCall = tryAppendQueryString(tlCall, 'us_privacy', bidderRequest.uspConsent);
|
|
49
51
|
}
|
|
50
52
|
|
|
51
53
|
if (config.getConfig('coppa') === true) {
|
|
52
|
-
tlCall =
|
|
54
|
+
tlCall = tryAppendQueryString(tlCall, 'coppa', true);
|
|
53
55
|
}
|
|
54
56
|
|
|
55
57
|
if (tlCall.lastIndexOf('&') === tlCall.length - 1) {
|
|
56
58
|
tlCall = tlCall.substring(0, tlCall.length - 1);
|
|
57
59
|
}
|
|
58
|
-
|
|
60
|
+
logMessage('tlCall request built: ' + tlCall);
|
|
59
61
|
|
|
60
62
|
return {
|
|
61
63
|
method: 'POST',
|
|
@@ -79,17 +81,17 @@ export const tripleliftAdapterSpec = {
|
|
|
79
81
|
let syncEndpoint = 'https://eb2.3lift.com/sync?';
|
|
80
82
|
|
|
81
83
|
if (syncType === 'image') {
|
|
82
|
-
syncEndpoint =
|
|
83
|
-
syncEndpoint =
|
|
84
|
+
syncEndpoint = tryAppendQueryString(syncEndpoint, 'px', 1);
|
|
85
|
+
syncEndpoint = tryAppendQueryString(syncEndpoint, 'src', 'prebid');
|
|
84
86
|
}
|
|
85
87
|
|
|
86
88
|
if (consentString !== null) {
|
|
87
|
-
syncEndpoint =
|
|
88
|
-
syncEndpoint =
|
|
89
|
+
syncEndpoint = tryAppendQueryString(syncEndpoint, 'gdpr', gdprApplies);
|
|
90
|
+
syncEndpoint = tryAppendQueryString(syncEndpoint, 'cmp_cs', consentString);
|
|
89
91
|
}
|
|
90
92
|
|
|
91
93
|
if (usPrivacy) {
|
|
92
|
-
syncEndpoint =
|
|
94
|
+
syncEndpoint = tryAppendQueryString(syncEndpoint, 'us_privacy', usPrivacy);
|
|
93
95
|
}
|
|
94
96
|
|
|
95
97
|
return [{
|
|
@@ -122,7 +124,7 @@ function _buildPostBody(bidRequests) {
|
|
|
122
124
|
} else if (bidRequest.mediaTypes.banner) {
|
|
123
125
|
imp.banner = { format: _sizes(bidRequest.sizes) };
|
|
124
126
|
};
|
|
125
|
-
if (!
|
|
127
|
+
if (!isEmpty(bidRequest.ortb2Imp)) {
|
|
126
128
|
imp.fpd = _getAdUnitFpd(bidRequest.ortb2Imp);
|
|
127
129
|
}
|
|
128
130
|
return imp;
|
|
@@ -143,7 +145,7 @@ function _buildPostBody(bidRequests) {
|
|
|
143
145
|
|
|
144
146
|
let ext = _getExt(schain, globalFpd);
|
|
145
147
|
|
|
146
|
-
if (!
|
|
148
|
+
if (!isEmpty(ext)) {
|
|
147
149
|
data.ext = ext;
|
|
148
150
|
}
|
|
149
151
|
return data;
|
|
@@ -198,10 +200,10 @@ function _getGlobalFpd() {
|
|
|
198
200
|
_addEntries(context, fpdContext);
|
|
199
201
|
_addEntries(user, fpdUser);
|
|
200
202
|
|
|
201
|
-
if (!
|
|
203
|
+
if (!isEmpty(context)) {
|
|
202
204
|
fpd.context = context;
|
|
203
205
|
}
|
|
204
|
-
if (!
|
|
206
|
+
if (!isEmpty(user)) {
|
|
205
207
|
fpd.user = user;
|
|
206
208
|
}
|
|
207
209
|
return fpd;
|
|
@@ -213,7 +215,7 @@ function _getAdUnitFpd(adUnitFpd) {
|
|
|
213
215
|
|
|
214
216
|
_addEntries(context, adUnitFpd.ext);
|
|
215
217
|
|
|
216
|
-
if (!
|
|
218
|
+
if (!isEmpty(context)) {
|
|
217
219
|
fpd.context = context;
|
|
218
220
|
}
|
|
219
221
|
|
|
@@ -221,7 +223,7 @@ function _getAdUnitFpd(adUnitFpd) {
|
|
|
221
223
|
}
|
|
222
224
|
|
|
223
225
|
function _addEntries(target, source) {
|
|
224
|
-
if (!
|
|
226
|
+
if (!isEmpty(source)) {
|
|
225
227
|
Object.keys(source).forEach(key => {
|
|
226
228
|
if (source[key] != null) {
|
|
227
229
|
target[key] = source[key];
|
|
@@ -232,10 +234,10 @@ function _addEntries(target, source) {
|
|
|
232
234
|
|
|
233
235
|
function _getExt(schain, fpd) {
|
|
234
236
|
let ext = {};
|
|
235
|
-
if (!
|
|
237
|
+
if (!isEmpty(schain)) {
|
|
236
238
|
ext.schain = { ...schain };
|
|
237
239
|
}
|
|
238
|
-
if (!
|
|
240
|
+
if (!isEmpty(fpd)) {
|
|
239
241
|
ext.fpd = { ...fpd };
|
|
240
242
|
}
|
|
241
243
|
return ext;
|
|
@@ -311,7 +313,7 @@ function _buildResponseObject(bidderRequest, bid) {
|
|
|
311
313
|
creativeId: creativeId,
|
|
312
314
|
dealId: dealId,
|
|
313
315
|
currency: 'USD',
|
|
314
|
-
ttl:
|
|
316
|
+
ttl: BANNER_TIME_TO_LIVE,
|
|
315
317
|
tl_source: bid.tl_source,
|
|
316
318
|
meta: {}
|
|
317
319
|
};
|
|
@@ -319,6 +321,7 @@ function _buildResponseObject(bidderRequest, bid) {
|
|
|
319
321
|
if (_isInstreamBidRequest(breq)) {
|
|
320
322
|
bidResponse.vastXml = bid.ad;
|
|
321
323
|
bidResponse.mediaType = 'video';
|
|
324
|
+
bidResponse.ttl = INSTREAM_TIME_TO_LIVE;
|
|
322
325
|
};
|
|
323
326
|
|
|
324
327
|
if (bid.advertiser_name) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { deepAccess, getUniqueIdentifierStr } from '../src/utils.js';
|
|
2
2
|
import { registerBidder } from '../src/adapters/bidderFactory.js';
|
|
3
3
|
import { config } from '../src/config.js';
|
|
4
4
|
import { BANNER } from '../src/mediaTypes.js';
|
|
@@ -13,7 +13,7 @@ export const spec = {
|
|
|
13
13
|
|
|
14
14
|
isBidRequestValid: function (bidRequest) {
|
|
15
15
|
return (bidRequest.params.site_id && bidRequest.params.bidfloor &&
|
|
16
|
-
|
|
16
|
+
deepAccess(bidRequest, 'mediaTypes.banner') && (deepAccess(bidRequest, 'mediaTypes.banner.sizes.length') > 0));
|
|
17
17
|
},
|
|
18
18
|
|
|
19
19
|
buildRequests: function (validBidRequests, bidderRequest) {
|
|
@@ -23,7 +23,7 @@ export const spec = {
|
|
|
23
23
|
|
|
24
24
|
let queryParams = buildCommonQueryParamsFromBids(validBidRequests, bidderRequest);
|
|
25
25
|
|
|
26
|
-
let siteId =
|
|
26
|
+
let siteId = deepAccess(validBidRequests[0], 'params.site_id');
|
|
27
27
|
|
|
28
28
|
let url = BIDDER_URL + siteId + '?hb=1&transactionId=' + validBidRequests[0].transactionId;
|
|
29
29
|
|
|
@@ -121,7 +121,7 @@ function buildCommonQueryParamsFromBids(validBidRequests, bidderRequest) {
|
|
|
121
121
|
let page = window.location.host + window.location.pathname + location.search + location.hash;
|
|
122
122
|
|
|
123
123
|
let defaultParams = {
|
|
124
|
-
id:
|
|
124
|
+
id: getUniqueIdentifierStr(),
|
|
125
125
|
imp: [
|
|
126
126
|
{
|
|
127
127
|
id: validBidRequests[0].bidId,
|