prebid.js 9.46.0 → 9.48.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/codeql/queries/jsonRequestContentType.ql +18 -0
- package/AGENTS.md +42 -0
- package/CLAUDE.md +1 -0
- package/babelConfig.js +1 -1
- package/dist/33acrossAnalyticsAdapter.js +1 -1
- package/dist/33acrossBidAdapter.js +1 -1
- package/dist/33acrossIdSystem.js +1 -1
- package/dist/BTBidAdapter.js +1 -1
- package/dist/adagioAnalyticsAdapter.js +1 -1
- package/dist/adagioBidAdapter.js +1 -1
- package/dist/adagioUtils.js +1 -1
- package/dist/addefendBidAdapter.js +1 -1
- package/dist/adgenerationBidAdapter.js +1 -1
- package/dist/adlooxRtdProvider.js +1 -1
- package/dist/adqueryBidAdapter.js +1 -1
- package/dist/adrelevantisBidAdapter.js +1 -1
- package/dist/adstirBidAdapter.js +1 -1
- package/dist/adtrgtmeBidAdapter.js +1 -1
- package/dist/advangUtils.js +1 -1
- package/dist/adverxoBidAdapter.js +1 -1
- package/dist/adxcgAnalyticsAdapter.js +1 -1
- package/dist/adxcgBidAdapter.js +1 -1
- package/dist/adyoulikeBidAdapter.js +1 -1
- package/dist/agmaAnalyticsAdapter.js +1 -1
- package/dist/ajaBidAdapter.js +1 -1
- package/dist/amxBidAdapter.js +1 -1
- package/dist/amxIdSystem.js +1 -1
- package/dist/aniviewBidAdapter.js +1 -1
- package/dist/appierAnalyticsAdapter.js +1 -1
- package/dist/appnexusBidAdapter.js +1 -1
- package/dist/asoBidAdapter.js +1 -1
- package/dist/axonixBidAdapter.js +1 -1
- package/dist/beopBidAdapter.js +1 -1
- package/dist/bidglassBidAdapter.js +1 -1
- package/dist/big-richmediaBidAdapter.js +1 -1
- package/dist/bitmediaBidAdapter.js +1 -1
- package/dist/blueBidAdapter.js +1 -1
- package/dist/blueUtils.js +1 -0
- package/dist/bmsBidAdapter.js +1 -1
- package/dist/bridBidAdapter.js +1 -1
- package/dist/bridgeuppBidAdapter.js +1 -1
- package/dist/bridgewellBidAdapter.js +1 -1
- package/dist/brightMountainMediaBidAdapter.js +1 -1
- package/dist/browsiUtils.js +1 -1
- package/dist/carodaBidAdapter.js +1 -1
- package/dist/chtnwBidAdapter.js +1 -1
- package/dist/chunk-core.js +1 -1
- package/dist/concertBidAdapter.js +1 -1
- package/dist/connectadBidAdapter.js +1 -1
- package/dist/consumableBidAdapter.js +1 -1
- package/dist/contxtfulBidAdapter.js +1 -1
- package/dist/conversantAnalyticsAdapter.js +1 -1
- package/dist/conversantBidAdapter.js +1 -1
- package/dist/craftBidAdapter.js +1 -1
- package/dist/criteoBidAdapter.js +1 -1
- package/dist/cwireBidAdapter.js +1 -1
- package/dist/czechAdIdSystem.js +1 -1
- package/dist/dailymotionBidAdapter.js +1 -1
- package/dist/debugging-standalone.js +1 -1
- package/dist/dependencies.json +16 -2
- package/dist/dspxBidAdapter.js +1 -1
- package/dist/dxkultureBidAdapter.js +1 -1
- package/dist/dynamicAdBoostRtdProvider.js +1 -1
- package/dist/eplanningBidAdapter.js +1 -1
- package/dist/eskimiBidAdapter.js +1 -1
- package/dist/euidIdSystem.js +1 -1
- package/dist/exadsBidAdapter.js +1 -1
- package/dist/excoBidAdapter.js +1 -1
- package/dist/feedadBidAdapter.js +1 -1
- package/dist/finativeBidAdapter.js +1 -1
- package/dist/freewheel-sspBidAdapter.js +1 -1
- package/dist/gmosspBidAdapter.js +1 -1
- package/dist/gptUtils.js +1 -1
- package/dist/greenbidsAnalyticsAdapter.js +1 -1
- package/dist/greenbidsBidAdapter.js +1 -1
- package/dist/greenbidsRtdProvider.js +1 -1
- package/dist/gridBidAdapter.js +1 -1
- package/dist/gumgumBidAdapter.js +1 -1
- package/dist/h12mediaBidAdapter.js +1 -1
- package/dist/hypelabBidAdapter.js +1 -1
- package/dist/id5AnalyticsAdapter.js +1 -1
- package/dist/id5IdSystem.js +1 -1
- package/dist/imdsBidAdapter.js +1 -1
- package/dist/improvedigitalBidAdapter.js +1 -1
- package/dist/inmobiBidAdapter.js +1 -1
- package/dist/insticatorBidAdapter.js +1 -1
- package/dist/intentIqAnalyticsAdapter.js +1 -1
- package/dist/ixBidAdapter.js +1 -1
- package/dist/jixieBidAdapter.js +1 -1
- package/dist/justpremiumBidAdapter.js +1 -1
- package/dist/kargoBidAdapter.js +1 -1
- package/dist/kimberliteBidAdapter.js +1 -1
- package/dist/konduitAnalyticsAdapter.js +1 -1
- package/dist/kueezBidAdapter.js +1 -1
- package/dist/lassoBidAdapter.js +1 -1
- package/dist/lifestreetBidAdapter.js +1 -1
- package/dist/liveIntentId.js +1 -1
- package/dist/logicadBidAdapter.js +1 -1
- package/dist/loglyliftBidAdapter.js +1 -1
- package/dist/luceadBidAdapter.js +1 -1
- package/dist/luponmediaBidAdapter.js +1 -1
- package/dist/mabidderBidAdapter.js +1 -1
- package/dist/madsenseBidAdapter.js +1 -1
- package/dist/magniteAnalyticsAdapter.js +1 -1
- package/dist/malltvAnalyticsAdapter.js +1 -1
- package/dist/marsmediaBidAdapter.js +1 -1
- package/dist/mediafuseBidAdapter.js +1 -1
- package/dist/medianetBidAdapter.js +1 -1
- package/dist/medianetUtils.js +1 -1
- package/dist/mediasquareBidAdapter.js +1 -1
- package/dist/mgidBidAdapter.js +1 -1
- package/dist/missenaBidAdapter.js +1 -1
- package/dist/mobilefuseBidAdapter.js +1 -1
- package/dist/nativeryBidAdapter.js +1 -0
- package/dist/nextMillenniumBidAdapter.js +1 -1
- package/dist/nexx360Utils.js +1 -1
- package/dist/nobidAnalyticsAdapter.js +1 -1
- package/dist/nobidBidAdapter.js +1 -1
- package/dist/nodalsAiRtdProvider.js +1 -1
- package/dist/not-for-prod/prebid.js +187 -184
- package/dist/oguryBidAdapter.js +1 -1
- package/dist/onetagBidAdapter.js +1 -1
- package/dist/ooloAnalyticsAdapter.js +1 -1
- package/dist/openxBidAdapter.js +1 -1
- package/dist/optidigitalBidAdapter.js +1 -1
- package/dist/orbidderBidAdapter.js +1 -1
- package/dist/outbrainBidAdapter.js +1 -1
- package/dist/pinkLionBidAdapter.js +1 -0
- package/dist/pixfutureBidAdapter.js +1 -1
- package/dist/prebidServerBidAdapter.js +1 -1
- package/dist/priceFloors.js +1 -1
- package/dist/publinkIdSystem.js +1 -1
- package/dist/pubmaticAnalyticsAdapter.js +1 -1
- package/dist/pubmaticBidAdapter.js +1 -1
- package/dist/pubmaticRtdProvider.js +1 -1
- package/dist/pubwiseAnalyticsAdapter.js +1 -1
- package/dist/pubxaiAnalyticsAdapter.js +1 -1
- package/dist/pubxaiRtdProvider.js +1 -1
- package/dist/pxyzBidAdapter.js +1 -1
- package/dist/quantcastBidAdapter.js +1 -1
- package/dist/readpeakBidAdapter.js +1 -1
- package/dist/relaidoBidAdapter.js +1 -1
- package/dist/retailspotBidAdapter.js +1 -1
- package/dist/rhythmoneBidAdapter.js +1 -1
- package/dist/riseUtils.js +1 -1
- package/dist/rtbhouseBidAdapter.js +1 -1
- package/dist/rubiconBidAdapter.js +1 -1
- package/dist/seedingAllianceBidAdapter.js +1 -1
- package/dist/seedtagBidAdapter.js +1 -1
- package/dist/sharethroughAnalyticsAdapter.js +1 -1
- package/dist/sharethroughBidAdapter.js +1 -1
- package/dist/showheroes-bsBidAdapter.js +1 -1
- package/dist/smaatoBidAdapter.js +1 -1
- package/dist/smartadserverBidAdapter.js +1 -1
- package/dist/smartxBidAdapter.js +1 -1
- package/dist/smilewantedBidAdapter.js +1 -1
- package/dist/snigelBidAdapter.js +1 -1
- package/dist/sonobiBidAdapter.js +1 -1
- package/dist/sovrnBidAdapter.js +1 -1
- package/dist/sparteoBidAdapter.js +1 -1
- package/dist/sspBCBidAdapter.js +1 -1
- package/dist/stroeerCoreBidAdapter.js +1 -1
- package/dist/stvBidAdapter.js +1 -1
- package/dist/sublimeBidAdapter.js +1 -1
- package/dist/taboolaBidAdapter.js +1 -1
- package/dist/tappxBidAdapter.js +1 -1
- package/dist/targetVideoBidAdapter.js +1 -1
- package/dist/teadsBidAdapter.js +1 -1
- package/dist/terceptAnalyticsAdapter.js +1 -1
- package/dist/themoneytizerBidAdapter.js +1 -1
- package/dist/trionBidAdapter.js +1 -1
- package/dist/tripleliftBidAdapter.js +1 -1
- package/dist/ttdBidAdapter.js +1 -1
- package/dist/ucfunnelAnalyticsAdapter.js +1 -1
- package/dist/uid2IdSystem.js +1 -1
- package/dist/underdogmediaBidAdapter.js +1 -1
- package/dist/undertoneBidAdapter.js +1 -1
- package/dist/unifiedIdSystem.js +1 -1
- package/dist/unrulyBidAdapter.js +1 -1
- package/dist/userId.js +1 -1
- package/dist/vidazooUtils.js +1 -1
- package/dist/videobyteBidAdapter.js +1 -1
- package/dist/visxBidAdapter.js +1 -1
- package/dist/vuukleBidAdapter.js +1 -1
- package/dist/weboramaRtdProvider.js +1 -1
- package/dist/widespaceBidAdapter.js +1 -1
- package/dist/winrBidAdapter.js +1 -1
- package/dist/xeUtils.js +1 -1
- package/dist/yahooAdsBidAdapter.js +1 -1
- package/dist/yandexBidAdapter.js +1 -1
- package/dist/yieldmoBidAdapter.js +1 -1
- package/dist/yieldoneAnalyticsAdapter.js +1 -1
- package/eslint.config.js +1 -3
- package/gulpHelpers.js +3 -6
- package/gulpfile.js +25 -24
- package/karma.conf.maker.js +1 -3
- package/libraries/advangUtils/index.js +3 -4
- package/libraries/blueUtils/bidderUtils.js +113 -0
- package/libraries/browsiUtils/browsiUtils.js +1 -2
- package/libraries/gptUtils/gptUtils.js +1 -2
- package/libraries/liveIntentId/shared.js +4 -0
- package/libraries/xeUtils/bidderUtils.js +3 -4
- package/modules/adagioBidAdapter.js +1 -2
- package/modules/addefendBidAdapter.md +1 -1
- package/modules/adtrgtmeBidAdapter.js +6 -8
- package/modules/aduptechBidAdapter.md +1 -1
- package/modules/adverxoBidAdapter.js +3 -3
- package/modules/blueBidAdapter.js +24 -104
- package/modules/bmsBidAdapter.js +25 -105
- package/modules/concertBidAdapter.md +1 -1
- package/modules/contxtfulBidAdapter.js +56 -10
- package/modules/conversantBidAdapter.js +0 -58
- package/modules/cwireBidAdapter.js +8 -0
- package/modules/czechAdIdSystem.js +13 -3
- package/modules/dynamicAdBoostRtdProvider.js +16 -33
- package/modules/dynamicAdBoostRtdProvider.md +1 -6
- package/modules/ixBidAdapter.js +2 -3
- package/modules/luponmediaBidAdapter.js +117 -522
- package/modules/luponmediaBidAdapter.md +2 -3
- package/modules/mediasquareBidAdapter.js +14 -20
- package/modules/microadBidAdapter.js +0 -1
- package/modules/nativeryBidAdapter.js +135 -0
- package/modules/nativeryBidAdapter.md +95 -0
- package/modules/nativoBidAdapter.js +3 -3
- package/modules/onetagBidAdapter.js +0 -1
- package/modules/pinkLionBidAdapter.js +17 -0
- package/modules/pinkLionBidAdapter.md +79 -0
- package/modules/prebidServerBidAdapter/ortbConverter.js +1 -1
- package/modules/priceFloors.js +2 -2
- package/modules/pubmaticBidAdapter.js +4 -1
- package/modules/qortexRtdProvider.md +1 -1
- package/modules/reconciliationRtdProvider.md +4 -4
- package/modules/rtbhouseBidAdapter.js +4 -83
- package/modules/rubiconBidAdapter.js +1 -1
- package/modules/sspBCBidAdapter.js +1 -1
- package/modules/stroeerCoreBidAdapter.js +3 -3
- package/modules/stvBidAdapter.js +19 -14
- package/modules/topicsFpdModule.md +1 -1
- package/modules/unifiedIdSystem.js +8 -1
- package/modules/userId/eids.js +15 -0
- package/modules/videoModule/index.js +0 -1
- package/modules/videoModule/videoImpressionVerifier.js +0 -1
- package/modules/yieldlabBidAdapter.js +1 -2
- package/modules/yieldmoBidAdapter.js +1 -2
- package/package.json +13 -20
- package/src/Renderer.js +1 -2
- package/src/adapterManager.js +14 -4
- package/src/auction.js +2 -3
- package/src/config.js +1 -2
- package/src/cpmBucketManager.js +1 -2
- package/src/secureCreatives.js +2 -3
- package/src/targeting.js +1 -2
- package/test/fake-server/README.md +3 -3
- package/test/helpers/index_adapter_utils.js +2 -2
- package/test/helpers/testing-utils.js +1 -1
- package/test/spec/auctionmanager_spec.js +2 -3
- package/test/spec/fpd/enrichment_spec.js +1 -1
- package/test/spec/libraries/greedy/greedyPromise_spec.js +2 -2
- package/test/spec/modules/adfBidAdapter_spec.js +1 -1
- package/test/spec/modules/adnuntiusBidAdapter_spec.js +25 -9
- package/test/spec/modules/adtrgtmeBidAdapter_spec.js +2 -4
- package/test/spec/modules/adverxoBidAdapter_spec.js +25 -1
- package/test/spec/modules/afpBidAdapter_spec.js +0 -1
- package/test/spec/modules/bliinkBidAdapter_spec.js +15 -7
- package/test/spec/modules/contxtfulBidAdapter_spec.js +606 -82
- package/test/spec/modules/conversantBidAdapter_spec.js +1 -139
- package/test/spec/modules/cwireBidAdapter_spec.js +2 -2
- package/test/spec/modules/czechAdIdSystem_spec.js +4 -4
- package/test/spec/modules/displayioBidAdapter_spec.js +1 -1
- package/test/spec/modules/dynamicAdBoostRtdProvider_spec.js +0 -42
- package/test/spec/modules/enrichmentLiftMeasurement_spec.js +8 -8
- package/test/spec/modules/hypelabBidAdapter_spec.js +17 -11
- package/test/spec/modules/iasRtdProvider_spec.js +2 -2
- package/test/spec/modules/id5IdSystem_spec.js +1 -1
- package/test/spec/modules/idxIdSystem_spec.js +1 -2
- package/test/spec/modules/intentIqAnalyticsAdapter_spec.js +25 -25
- package/test/spec/modules/intentIqIdSystem_spec.js +32 -32
- package/test/spec/modules/kargoBidAdapter_spec.js +11 -5
- package/test/spec/modules/liveIntentIdSystem_spec.js +14 -0
- package/test/spec/modules/lmpIdSystem_spec.js +1 -2
- package/test/spec/modules/lockrAIMIdSystem_spec.js +2 -2
- package/test/spec/modules/luceadBidAdapter_spec.js +1 -1
- package/test/spec/modules/luponmediaBidAdapter_spec.js +186 -324
- package/test/spec/modules/mediaeyesBidAdapter_spec.js +1 -1
- package/test/spec/modules/mediakeysBidAdapter_spec.js +1 -2
- package/test/spec/modules/mediasquareBidAdapter_spec.js +13 -2
- package/test/spec/modules/missenaBidAdapter_spec.js +1 -1
- package/test/spec/modules/nativeryBidAdapter_spec.js +195 -0
- package/test/spec/modules/nexx360BidAdapter_spec.js +6 -6
- package/test/spec/modules/oguryBidAdapter_spec.js +2 -2
- package/test/spec/modules/omsBidAdapter_spec.js +1 -1
- package/test/spec/modules/onetagBidAdapter_spec.js +1 -2
- package/test/spec/modules/onomagicBidAdapter_spec.js +2 -2
- package/test/spec/modules/overtoneRtdProvider_spec.mjs +1 -1
- package/test/spec/modules/permutiveIdentityManagerIdSystem_spec.js +17 -14
- package/test/spec/modules/pinkLionBidAdapter_spec.js +480 -0
- package/test/spec/modules/prebidServerBidAdapter_spec.js +2 -2
- package/test/spec/modules/previousAuctionInfo_spec.js +2 -2
- package/test/spec/modules/pubmaticAnalyticsAdapter_spec.js +1 -1
- package/test/spec/modules/pubmaticBidAdapter_spec.js +19 -1
- package/test/spec/modules/pubmaticRtdProvider_spec.js +16 -17
- package/test/spec/modules/pubwiseAnalyticsAdapter_spec.js +2 -2
- package/test/spec/modules/rtbhouseBidAdapter_spec.js +0 -182
- package/test/spec/modules/rubiconBidAdapter_spec.js +3 -4
- package/test/spec/modules/sizeMappingV2_spec.js +1 -1
- package/test/spec/modules/sizeMapping_spec.js +2 -3
- package/test/spec/modules/stroeerCoreBidAdapter_spec.js +36 -26
- package/test/spec/modules/stvBidAdapter_spec.js +108 -40
- package/test/spec/modules/topLevelPaapi_spec.js +1 -1
- package/test/spec/modules/tpmnBidAdapter_spec.js +1 -1
- package/test/spec/modules/ttdBidAdapter_spec.js +1 -1
- package/test/spec/modules/unifiedIdSystem_spec.js +20 -0
- package/test/spec/modules/userId_spec.js +1 -1
- package/test/spec/modules/vibrantmediaBidAdapter_spec.js +1 -1
- package/test/spec/modules/videoModule/submodules/videojsVideoProvider_spec.js +1 -1
- package/test/spec/modules/yieldmoBidAdapter_spec.js +2 -2
- package/test/spec/modules/zeotapIdPlusIdSystem_spec.js +1 -2
- package/test/spec/unit/core/adapterManager_spec.js +29 -17
- package/test/spec/unit/core/targeting_spec.js +1 -1
- package/test/spec/unit/pbjs_api_spec.js +4 -5
- package/test/spec/utils_spec.js +20 -12
- package/test/test_deps.js +1 -1
- package/nightwatch.browserstack.json +0 -46
- package/nightwatch.conf.js +0 -36
- package/nightwatch.json +0 -40
|
@@ -17,15 +17,14 @@ Module that connects to LuponMedia's demand sources
|
|
|
17
17
|
code: 'test-div',
|
|
18
18
|
mediaTypes: {
|
|
19
19
|
banner: {
|
|
20
|
-
sizes: [[300, 250]]
|
|
20
|
+
sizes: [[300, 250]]
|
|
21
21
|
}
|
|
22
22
|
},
|
|
23
23
|
bids: [
|
|
24
24
|
{
|
|
25
25
|
bidder: "luponmedia",
|
|
26
26
|
params: {
|
|
27
|
-
|
|
28
|
-
keyId: '4o2c4'
|
|
27
|
+
keyId: 'uid@test_12345'
|
|
29
28
|
}
|
|
30
29
|
}
|
|
31
30
|
]
|
|
@@ -50,33 +50,30 @@ export const spec = {
|
|
|
50
50
|
|
|
51
51
|
let codes = [];
|
|
52
52
|
let endpoint = document.location.search.match(/msq_test=true/) ? BIDDER_URL_TEST : BIDDER_URL_PROD;
|
|
53
|
-
let floor = {};
|
|
54
53
|
const test = config.getConfig('debug') ? 1 : 0;
|
|
55
54
|
let adunitValue = null;
|
|
56
55
|
Object.keys(validBidRequests).forEach(key => {
|
|
57
|
-
floor = {};
|
|
58
56
|
adunitValue = validBidRequests[key];
|
|
57
|
+
let code = {
|
|
58
|
+
owner: adunitValue.params.owner,
|
|
59
|
+
code: adunitValue.params.code,
|
|
60
|
+
adunit: adunitValue.adUnitCode,
|
|
61
|
+
bidId: adunitValue.bidId,
|
|
62
|
+
mediatypes: adunitValue.mediaTypes,
|
|
63
|
+
floor: {}
|
|
64
|
+
}
|
|
59
65
|
if (typeof adunitValue.getFloor === 'function') {
|
|
60
66
|
if (Array.isArray(adunitValue.sizes)) {
|
|
61
67
|
adunitValue.sizes.forEach(value => {
|
|
62
68
|
let tmpFloor = adunitValue.getFloor({currency: 'USD', mediaType: '*', size: value});
|
|
63
|
-
if (tmpFloor != {}) { floor[value.join('x')] = tmpFloor; }
|
|
69
|
+
if (tmpFloor != {}) { code.floor[value.join('x')] = tmpFloor; }
|
|
64
70
|
});
|
|
65
71
|
}
|
|
66
72
|
let tmpFloor = adunitValue.getFloor({currency: 'USD', mediaType: '*', size: '*'});
|
|
67
|
-
if (tmpFloor != {}) { floor['*'] = tmpFloor; }
|
|
73
|
+
if (tmpFloor != {}) { code.floor['*'] = tmpFloor; }
|
|
68
74
|
}
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
code: adunitValue.params.code,
|
|
72
|
-
adunit: adunitValue.adUnitCode,
|
|
73
|
-
bidId: adunitValue.bidId,
|
|
74
|
-
// TODO: fix auctionId leak: https://github.com/prebid/Prebid.js/issues/9781
|
|
75
|
-
auctionId: adunitValue.auctionId,
|
|
76
|
-
transactionId: adunitValue.ortb2Imp?.ext?.tid,
|
|
77
|
-
mediatypes: adunitValue.mediaTypes,
|
|
78
|
-
floor: floor
|
|
79
|
-
});
|
|
75
|
+
if (adunitValue.ortb2Imp) { code.ortb2Imp = adunitValue.ortb2Imp }
|
|
76
|
+
codes.push(code);
|
|
80
77
|
});
|
|
81
78
|
const payload = {
|
|
82
79
|
codes: codes,
|
|
@@ -93,12 +90,9 @@ export const spec = {
|
|
|
93
90
|
}
|
|
94
91
|
if (bidderRequest.uspConsent) { payload.uspConsent = bidderRequest.uspConsent; }
|
|
95
92
|
if (bidderRequest.schain) { payload.schain = bidderRequest.schain; }
|
|
96
|
-
if (bidderRequest.
|
|
97
|
-
payload.userId = bidderRequest.userId;
|
|
98
|
-
} else if (bidderRequest.hasOwnProperty('bids') && typeof bidderRequest.bids == 'object' && bidderRequest.bids.length > 0 && bidderRequest.bids[0].hasOwnProperty('userId')) {
|
|
99
|
-
payload.userId = bidderRequest.bids[0].userId;
|
|
100
|
-
}
|
|
93
|
+
if (bidderRequest.userIdAsEids) { payload.eids = bidderRequest.userIdAsEids };
|
|
101
94
|
if (bidderRequest.ortb2?.regs?.ext?.dsa) { payload.dsa = bidderRequest.ortb2.regs.ext.dsa }
|
|
95
|
+
if (bidderRequest.ortb2) { payload.ortb2 = bidderRequest.ortb2 }
|
|
102
96
|
};
|
|
103
97
|
if (test) { payload.debug = true; }
|
|
104
98
|
const payloadString = JSON.stringify(payload);
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { deepAccess, isArray, isEmpty, isStr } from '../src/utils.js';
|
|
2
|
-
import { } from '../src/polyfill.js';
|
|
3
2
|
import { registerBidder } from '../src/adapters/bidderFactory.js';
|
|
4
3
|
import { BANNER } from '../src/mediaTypes.js';
|
|
5
4
|
import { convertOrtbRequestToProprietaryNative } from '../src/native.js';
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
import { BANNER, NATIVE, VIDEO } from '../src/mediaTypes.js';
|
|
2
|
+
import { chunk } from '../libraries/chunk/chunk.js';
|
|
3
|
+
import {
|
|
4
|
+
deepAccess,
|
|
5
|
+
deepClone,
|
|
6
|
+
deepSetValue,
|
|
7
|
+
logError,
|
|
8
|
+
logWarn,
|
|
9
|
+
} from '../src/utils.js';
|
|
10
|
+
import { ortbConverter } from '../libraries/ortbConverter/converter.js';
|
|
11
|
+
import { registerBidder } from '../src/adapters/bidderFactory.js';
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* @typedef {import('../src/adapters/bidderFactory.js').BidRequest} BidRequest
|
|
15
|
+
* @typedef {import('../src/adapters/bidderFactory.js').Bid} Bid
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
const BIDDER_CODE = 'nativery';
|
|
19
|
+
const BIDDER_ALIAS = ['nat'];
|
|
20
|
+
const ENDPOINT = 'https://hb.nativery.com/openrtb2/auction';
|
|
21
|
+
const DEFAULT_CURRENCY = 'EUR';
|
|
22
|
+
const TTL = 30;
|
|
23
|
+
const MAX_IMPS_PER_REQUEST = 10;
|
|
24
|
+
const GVLID = 1133;
|
|
25
|
+
|
|
26
|
+
export const converter = ortbConverter({
|
|
27
|
+
context: {
|
|
28
|
+
netRevenue: true,
|
|
29
|
+
ttl: TTL,
|
|
30
|
+
currency: DEFAULT_CURRENCY,
|
|
31
|
+
},
|
|
32
|
+
imp(buildImp, bidRequest, context) {
|
|
33
|
+
const imp = buildImp(bidRequest, context);
|
|
34
|
+
imp.tagid = bidRequest.adUnitCode;
|
|
35
|
+
deepSetValue(imp, `ext.${BIDDER_CODE}`, {
|
|
36
|
+
widgetId: bidRequest.params.widgetId,
|
|
37
|
+
});
|
|
38
|
+
return imp;
|
|
39
|
+
},
|
|
40
|
+
});
|
|
41
|
+
|
|
42
|
+
export const spec = {
|
|
43
|
+
code: BIDDER_CODE,
|
|
44
|
+
gvlid: GVLID,
|
|
45
|
+
aliases: BIDDER_ALIAS,
|
|
46
|
+
supportedMediaTypes: [BANNER, NATIVE, VIDEO],
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Determines whether or not the given bid request is valid.
|
|
50
|
+
*
|
|
51
|
+
* @param {object} bid The bid to validate.
|
|
52
|
+
* @return boolean True if this is a valid bid, and false otherwise.
|
|
53
|
+
*/
|
|
54
|
+
isBidRequestValid: function (bid) {
|
|
55
|
+
return !!bid.params?.widgetId;
|
|
56
|
+
},
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* Make a server request from the list of BidRequests.
|
|
60
|
+
*
|
|
61
|
+
* @param {BidRequest[]} bidRequests A non-empty list of bid requests which should be sent to the Server.
|
|
62
|
+
* @return ServerRequest Info describing the request to the server.
|
|
63
|
+
*/
|
|
64
|
+
buildRequests: function (bidRequests, bidderRequest) {
|
|
65
|
+
const data = converter.toORTB({ bidRequests, bidderRequest });
|
|
66
|
+
return formatRequest(data, bidderRequest);
|
|
67
|
+
},
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* Unpack the response from the server into a list of bids.
|
|
71
|
+
*
|
|
72
|
+
* @param {*} serverResponse A successful response from the server.
|
|
73
|
+
* @return {Bid[]} An array of bids which were nested inside the server.
|
|
74
|
+
*/
|
|
75
|
+
interpretResponse: function (serverResponse, bidderRequest) {
|
|
76
|
+
// check overall response
|
|
77
|
+
if (!serverResponse.body || typeof serverResponse.body !== 'object') {
|
|
78
|
+
return [];
|
|
79
|
+
}
|
|
80
|
+
try {
|
|
81
|
+
// Response from PBS Go openRTB
|
|
82
|
+
if (Array.isArray(serverResponse.body?.seatbid)) {
|
|
83
|
+
const responseErrors = deepAccess(
|
|
84
|
+
serverResponse.body,
|
|
85
|
+
'ext.errors.nativery'
|
|
86
|
+
);
|
|
87
|
+
if (Array.isArray(responseErrors) && responseErrors.length > 0) {
|
|
88
|
+
logWarn(
|
|
89
|
+
'Nativery: Error in bid response ' + JSON.stringify(responseErrors)
|
|
90
|
+
);
|
|
91
|
+
}
|
|
92
|
+
const ortb = converter.fromORTB({
|
|
93
|
+
request: bidderRequest.data,
|
|
94
|
+
response: serverResponse.body,
|
|
95
|
+
});
|
|
96
|
+
return ortb.bids ?? [];
|
|
97
|
+
}
|
|
98
|
+
} catch (error) {
|
|
99
|
+
const errMsg = error?.message ?? JSON.stringify(error);
|
|
100
|
+
logError('Nativery: unhandled error in bid response ' + errMsg);
|
|
101
|
+
return [];
|
|
102
|
+
}
|
|
103
|
+
return [];
|
|
104
|
+
},
|
|
105
|
+
};
|
|
106
|
+
|
|
107
|
+
function formatRequest(ortbPayload) {
|
|
108
|
+
let request = [];
|
|
109
|
+
const options = {
|
|
110
|
+
withCredentials: true,
|
|
111
|
+
};
|
|
112
|
+
|
|
113
|
+
if (ortbPayload.imp.length > MAX_IMPS_PER_REQUEST) {
|
|
114
|
+
const clonedPayload = deepClone(ortbPayload);
|
|
115
|
+
chunk(ortbPayload.imp, MAX_IMPS_PER_REQUEST).forEach((imps) => {
|
|
116
|
+
clonedPayload.imp = imps;
|
|
117
|
+
request.push({
|
|
118
|
+
method: 'POST',
|
|
119
|
+
url: ENDPOINT,
|
|
120
|
+
data: clonedPayload,
|
|
121
|
+
options,
|
|
122
|
+
});
|
|
123
|
+
});
|
|
124
|
+
} else {
|
|
125
|
+
request = {
|
|
126
|
+
method: 'POST',
|
|
127
|
+
url: ENDPOINT,
|
|
128
|
+
data: ortbPayload,
|
|
129
|
+
options,
|
|
130
|
+
};
|
|
131
|
+
}
|
|
132
|
+
return request;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
registerBidder(spec);
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
# Overview
|
|
2
|
+
|
|
3
|
+
```
|
|
4
|
+
Module Name: Nativery Bid Adapter
|
|
5
|
+
Module Type: Bidder Adapter
|
|
6
|
+
Maintainer: developer@nativery.com
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
# Description
|
|
10
|
+
|
|
11
|
+
Connects to Nativery exchange for bids.
|
|
12
|
+
|
|
13
|
+
Nativery bid adapter supports Banner, Video (instream and outstream) and Native.
|
|
14
|
+
|
|
15
|
+
# Test Parameters
|
|
16
|
+
```
|
|
17
|
+
var adUnits = [
|
|
18
|
+
// Banner adUnit
|
|
19
|
+
{
|
|
20
|
+
code: 'banner-div',
|
|
21
|
+
mediaTypes: {
|
|
22
|
+
banner: {
|
|
23
|
+
sizes: [[300, 250], [300, 600]]
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
bids: [{
|
|
27
|
+
bidder: 'nativery',
|
|
28
|
+
params: {
|
|
29
|
+
widgetId: '680f3e6326ef69d8ad04b6f6'
|
|
30
|
+
}
|
|
31
|
+
}]
|
|
32
|
+
},
|
|
33
|
+
// Native adUnit
|
|
34
|
+
{
|
|
35
|
+
code: 'native-div',
|
|
36
|
+
mediaTypes: {
|
|
37
|
+
native: {
|
|
38
|
+
title: {
|
|
39
|
+
required: true
|
|
40
|
+
},
|
|
41
|
+
image: {
|
|
42
|
+
required: true
|
|
43
|
+
},
|
|
44
|
+
sponsoredBy: {
|
|
45
|
+
required: true
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
bids: [{
|
|
50
|
+
bidder: 'nativery',
|
|
51
|
+
params: {
|
|
52
|
+
widgetId: '680f3e6326ef69d8ad04b6f6'
|
|
53
|
+
}
|
|
54
|
+
}]
|
|
55
|
+
}
|
|
56
|
+
// Video instream adUnit
|
|
57
|
+
{
|
|
58
|
+
code: 'video-instream',
|
|
59
|
+
mediaTypes: {
|
|
60
|
+
video: {
|
|
61
|
+
mimes: ["video/mp4"], // required
|
|
62
|
+
playerSize: [[640, 480]],
|
|
63
|
+
context: 'instream'
|
|
64
|
+
... // Aditional ORTB video params
|
|
65
|
+
},
|
|
66
|
+
},
|
|
67
|
+
bids: [{
|
|
68
|
+
bidder: 'nativery',
|
|
69
|
+
params: {
|
|
70
|
+
widgetId: '680f3e6326ef69d8ad04b6f6'
|
|
71
|
+
}
|
|
72
|
+
}]
|
|
73
|
+
},
|
|
74
|
+
// Video outstream adUnit
|
|
75
|
+
{
|
|
76
|
+
code: 'video-outstream',
|
|
77
|
+
mediaTypes: {
|
|
78
|
+
video: {
|
|
79
|
+
mimes: ["video/mp4"], // required
|
|
80
|
+
playerSize: [[640, 480]],
|
|
81
|
+
context: 'outstream'
|
|
82
|
+
... // Aditional ORTB video params
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
bids: [
|
|
86
|
+
{
|
|
87
|
+
bidder: 'nativery',
|
|
88
|
+
params: {
|
|
89
|
+
widgetId: '680f3e6326ef69d8ad04b6f6'
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
]
|
|
93
|
+
}
|
|
94
|
+
];
|
|
95
|
+
```
|
|
@@ -110,7 +110,7 @@ const campaignsToFilter = new Set()
|
|
|
110
110
|
|
|
111
111
|
// Prebid adapter referrence doc: https://docs.prebid.org/dev-docs/bidder-adaptor.html
|
|
112
112
|
|
|
113
|
-
// Validity checks for
|
|
113
|
+
// Validity checks for optional parameters
|
|
114
114
|
const validParameter = {
|
|
115
115
|
url: (value) => typeof value === 'string',
|
|
116
116
|
placementId: (value) => {
|
|
@@ -141,7 +141,7 @@ export const spec = {
|
|
|
141
141
|
const value = bid.params[key]
|
|
142
142
|
const validityCheck = validParameter[key]
|
|
143
143
|
|
|
144
|
-
// We don't have a test for this so it's not a
|
|
144
|
+
// We don't have a test for this so it's not a parameter we care about
|
|
145
145
|
if (!validityCheck) return false
|
|
146
146
|
|
|
147
147
|
// Return if the check is not passed
|
|
@@ -280,7 +280,7 @@ export const spec = {
|
|
|
280
280
|
// Convert Set to Array (IE 11 Safe)
|
|
281
281
|
const placements = []
|
|
282
282
|
placementIds.forEach((value) => placements.push(value))
|
|
283
|
-
// Append to query string
|
|
283
|
+
// Append to query string parameters
|
|
284
284
|
params.unshift({ key: 'ntv_ptd', value: placements.join(',') })
|
|
285
285
|
}
|
|
286
286
|
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
import { BANNER, VIDEO, NATIVE } from '../src/mediaTypes.js';
|
|
4
4
|
import { INSTREAM, OUTSTREAM } from '../src/video.js';
|
|
5
5
|
import { Renderer } from '../src/Renderer.js';
|
|
6
|
-
import { } from '../src/polyfill.js';
|
|
7
6
|
import { getStorageManager } from '../src/storageManager.js';
|
|
8
7
|
import { registerBidder } from '../src/adapters/bidderFactory.js';
|
|
9
8
|
import { deepClone, logError, deepAccess, getWinDimensions } from '../src/utils.js';
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { registerBidder } from '../src/adapters/bidderFactory.js';
|
|
2
|
+
import { BANNER, NATIVE, VIDEO } from '../src/mediaTypes.js';
|
|
3
|
+
import { isBidRequestValid, buildRequests, interpretResponse } from '../libraries/teqblazeUtils/bidderUtils.js';
|
|
4
|
+
|
|
5
|
+
const BIDDER_CODE = 'pinkLion';
|
|
6
|
+
const AD_URL = 'https://us-east-ep.pinklion.io/pbjs';
|
|
7
|
+
|
|
8
|
+
export const spec = {
|
|
9
|
+
code: BIDDER_CODE,
|
|
10
|
+
supportedMediaTypes: [BANNER, VIDEO, NATIVE],
|
|
11
|
+
|
|
12
|
+
isBidRequestValid: isBidRequestValid(),
|
|
13
|
+
buildRequests: buildRequests(AD_URL),
|
|
14
|
+
interpretResponse
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
registerBidder(spec);
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
# Overview
|
|
2
|
+
|
|
3
|
+
```
|
|
4
|
+
Module Name: PinkLion Bidder Adapter
|
|
5
|
+
Module Type: PinkLion Bidder Adapter
|
|
6
|
+
Maintainer: prebid@pinklion.io
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
# Description
|
|
10
|
+
|
|
11
|
+
Connects to PinkLion Bidder exchange for bids.
|
|
12
|
+
PinkLion Bidder bid adapter supports Banner, Video (instream and outstream) and Native.
|
|
13
|
+
|
|
14
|
+
# Test Parameters
|
|
15
|
+
```
|
|
16
|
+
var adUnits = [
|
|
17
|
+
// Will return static test banner
|
|
18
|
+
{
|
|
19
|
+
code: 'adunit1',
|
|
20
|
+
mediaTypes: {
|
|
21
|
+
banner: {
|
|
22
|
+
sizes: [ [300, 250], [320, 50] ],
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
bids: [
|
|
26
|
+
{
|
|
27
|
+
bidder: 'pinkLion',
|
|
28
|
+
params: {
|
|
29
|
+
placementId: 'testBanner',
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
]
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
code: 'addunit2',
|
|
36
|
+
mediaTypes: {
|
|
37
|
+
video: {
|
|
38
|
+
playerSize: [ [640, 480] ],
|
|
39
|
+
context: 'instream',
|
|
40
|
+
minduration: 5,
|
|
41
|
+
maxduration: 60,
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
bids: [
|
|
45
|
+
{
|
|
46
|
+
bidder: 'pinkLion',
|
|
47
|
+
params: {
|
|
48
|
+
placementId: 'testVideo',
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
]
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
code: 'addunit3',
|
|
55
|
+
mediaTypes: {
|
|
56
|
+
native: {
|
|
57
|
+
title: {
|
|
58
|
+
required: true
|
|
59
|
+
},
|
|
60
|
+
body: {
|
|
61
|
+
required: true
|
|
62
|
+
},
|
|
63
|
+
icon: {
|
|
64
|
+
required: true,
|
|
65
|
+
size: [64, 64]
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
bids: [
|
|
70
|
+
{
|
|
71
|
+
bidder: 'pinkLion',
|
|
72
|
+
params: {
|
|
73
|
+
placementId: 'testNative',
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
]
|
|
77
|
+
}
|
|
78
|
+
];
|
|
79
|
+
```
|
|
@@ -62,7 +62,7 @@ const PBS_CONVERTER = ortbConverter({
|
|
|
62
62
|
let {s2sBidRequest} = context;
|
|
63
63
|
const request = buildRequest(imps, proxyBidderRequest, context);
|
|
64
64
|
|
|
65
|
-
request.tmax = s2sBidRequest.s2sConfig.timeout ?? Math.min(s2sBidRequest.requestBidsTimeout * 0.75, s2sBidRequest.s2sConfig.maxTimeout ?? s2sDefaultConfig.maxTimeout);
|
|
65
|
+
request.tmax = Math.floor(s2sBidRequest.s2sConfig.timeout ?? Math.min(s2sBidRequest.requestBidsTimeout * 0.75, s2sBidRequest.s2sConfig.maxTimeout ?? s2sDefaultConfig.maxTimeout));
|
|
66
66
|
request.ext.tmaxmax = request.ext.tmaxmax || s2sBidRequest.requestBidsTimeout;
|
|
67
67
|
|
|
68
68
|
[request.app, request.dooh, request.site].forEach(section => {
|
package/modules/priceFloors.js
CHANGED
|
@@ -635,7 +635,7 @@ function handleFetchError(status) {
|
|
|
635
635
|
* @param {object} floorEndpoint the floors config coming from setConfig
|
|
636
636
|
*/
|
|
637
637
|
export function generateAndHandleFetch(floorEndpoint) {
|
|
638
|
-
// if a fetch url is defined and one is not already
|
|
638
|
+
// if a fetch url is defined and one is not already occurring, fire it!
|
|
639
639
|
if (floorEndpoint.url && !fetching) {
|
|
640
640
|
// default to GET and we only support GET for now
|
|
641
641
|
let requestMethod = floorEndpoint.method || 'GET';
|
|
@@ -646,7 +646,7 @@ export function generateAndHandleFetch(floorEndpoint) {
|
|
|
646
646
|
fetching = true;
|
|
647
647
|
}
|
|
648
648
|
} else if (fetching) {
|
|
649
|
-
logWarn(`${MODULE_NAME}: A fetch is already
|
|
649
|
+
logWarn(`${MODULE_NAME}: A fetch is already occurring. Skipping.`);
|
|
650
650
|
}
|
|
651
651
|
}
|
|
652
652
|
|
|
@@ -105,6 +105,9 @@ const converter = ortbConverter({
|
|
|
105
105
|
const marketPlaceEnabled = bidderRequest?.bidderCode
|
|
106
106
|
? bidderSettings.get(bidderRequest.bidderCode, 'allowAlternateBidderCodes') : undefined;
|
|
107
107
|
if (marketPlaceEnabled) updateRequestExt(request, bidderRequest);
|
|
108
|
+
if (bidderRequest?.ortb2?.ext?.prebid?.previousauctioninfo) {
|
|
109
|
+
deepSetValue(request, 'ext.previousAuctionInfo', bidderRequest.ortb2.ext.prebid.previousauctioninfo);
|
|
110
|
+
}
|
|
108
111
|
return request;
|
|
109
112
|
},
|
|
110
113
|
bidResponse(buildBidResponse, bid, context) {
|
|
@@ -464,7 +467,7 @@ const updateResponseWithCustomFields = (res, bid, ctx) => {
|
|
|
464
467
|
}
|
|
465
468
|
|
|
466
469
|
// add meta fields
|
|
467
|
-
// NOTE: We will not
|
|
470
|
+
// NOTE: We will not receive below fields from the translator response also not sure on what will be the key names for these in the response,
|
|
468
471
|
// when we needed we can add it back.
|
|
469
472
|
// New fields added, assignee fields name may change
|
|
470
473
|
// if (bid.ext.networkName) res.meta.networkName = bid.ext.networkName;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
The purpose of this Real Time Data Provider is to allow publishers to match impressions
|
|
1
|
+
The purpose of this Real Time Data Provider is to allow publishers to match impressions across the supply chain.
|
|
2
2
|
|
|
3
3
|
**Reconciliation SDK**
|
|
4
|
-
The purpose of Reconciliation SDK module is to collect supply chain structure information and vendor-specific impression IDs from suppliers participating in ad creative delivery and report it to the Reconciliation Service, allowing publishers, advertisers and other supply chain participants to match and reconcile ad server, SSP, DSP and
|
|
4
|
+
The purpose of Reconciliation SDK module is to collect supply chain structure information and vendor-specific impression IDs from suppliers participating in ad creative delivery and report it to the Reconciliation Service, allowing publishers, advertisers and other supply chain participants to match and reconcile ad server, SSP, DSP and verification system log file records. Reconciliation SDK was created as part of TAG DLT initiative ( https://www.tagtoday.net/pressreleases/dlt_9_7_2020 ).
|
|
5
5
|
|
|
6
6
|
**Usage for Publishers:**
|
|
7
7
|
|
|
@@ -32,7 +32,7 @@ pbjs.setConfig({
|
|
|
32
32
|
|
|
33
33
|
where:
|
|
34
34
|
- `publisherMemberId` (required) - ID associated with the publisher
|
|
35
|
-
- `access` (optional) true/false - Whether ad markup will
|
|
35
|
+
- `access` (optional) true/false - Whether ad markup will receive Ad Unit Id's via Reconciliation Tag
|
|
36
36
|
|
|
37
37
|
**Example:**
|
|
38
38
|
|
|
@@ -42,7 +42,7 @@ To view an example:
|
|
|
42
42
|
|
|
43
43
|
`gulp serve --modules=reconciliationRtdProvider,appnexusBidAdapter`
|
|
44
44
|
|
|
45
|
-
|
|
45
|
+
You could also change 'appnexusBidAdapter' to another one.
|
|
46
46
|
|
|
47
47
|
- in your browser, navigate to:
|
|
48
48
|
|
|
@@ -1,18 +1,14 @@
|
|
|
1
|
-
import {deepAccess, deepClone, isArray, logError,
|
|
1
|
+
import {deepAccess, deepClone, isArray, logError, mergeDeep, isEmpty, isPlainObject, isNumber, isStr} from '../src/utils.js';
|
|
2
2
|
import {getOrigin} from '../libraries/getOrigin/index.js';
|
|
3
3
|
import {BANNER, NATIVE} from '../src/mediaTypes.js';
|
|
4
4
|
import {registerBidder} from '../src/adapters/bidderFactory.js';
|
|
5
5
|
|
|
6
6
|
import {convertOrtbRequestToProprietaryNative} from '../src/native.js';
|
|
7
|
-
import {config} from '../src/config.js';
|
|
8
7
|
import { interpretNativeBid, OPENRTB } from '../libraries/precisoUtils/bidNativeUtils.js';
|
|
9
8
|
|
|
10
9
|
const BIDDER_CODE = 'rtbhouse';
|
|
11
10
|
const REGIONS = ['prebid-eu', 'prebid-us', 'prebid-asia'];
|
|
12
11
|
const ENDPOINT_URL = 'creativecdn.com/bidder/prebid/bids';
|
|
13
|
-
const FLEDGE_ENDPOINT_URL = 'creativecdn.com/bidder/prebidfledge/bids';
|
|
14
|
-
const FLEDGE_SELLER_URL = 'https://fledge-ssp.creativecdn.com';
|
|
15
|
-
const FLEDGE_DECISION_LOGIC_URL = 'https://fledge-ssp.creativecdn.com/component-seller-prebid.js';
|
|
16
12
|
|
|
17
13
|
const DEFAULT_CURRENCY_ARR = ['USD']; // NOTE - USD is the only supported currency right now; Hardcoded for bids
|
|
18
14
|
const SUPPORTED_MEDIA_TYPES = [BANNER, NATIVE];
|
|
@@ -92,17 +88,6 @@ export const spec = {
|
|
|
92
88
|
|
|
93
89
|
let computedEndpointUrl = ENDPOINT_URL;
|
|
94
90
|
|
|
95
|
-
if (bidderRequest.paapi?.enabled) {
|
|
96
|
-
const fromConfig = config.getConfig('paapiConfig') || config.getConfig('fledgeConfig') || { sellerTimeout: 500 };
|
|
97
|
-
const fledgeConfig = {
|
|
98
|
-
seller: FLEDGE_SELLER_URL,
|
|
99
|
-
decisionLogicUrl: FLEDGE_DECISION_LOGIC_URL,
|
|
100
|
-
...fromConfig
|
|
101
|
-
};
|
|
102
|
-
mergeDeep(request, { ext: { fledge_config: fledgeConfig } });
|
|
103
|
-
computedEndpointUrl = FLEDGE_ENDPOINT_URL;
|
|
104
|
-
}
|
|
105
|
-
|
|
106
91
|
return {
|
|
107
92
|
method: 'POST',
|
|
108
93
|
url: 'https://' + validBidRequests[0].params.region + '.' + computedEndpointUrl,
|
|
@@ -142,66 +127,7 @@ export const spec = {
|
|
|
142
127
|
return bids;
|
|
143
128
|
},
|
|
144
129
|
interpretResponse: function (serverResponse, originalRequest) {
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
const responseBody = serverResponse.body;
|
|
148
|
-
let fledgeAuctionConfigs = null;
|
|
149
|
-
|
|
150
|
-
if (responseBody.bidid && isArray(responseBody?.ext?.igbid)) {
|
|
151
|
-
// we have fledge response
|
|
152
|
-
// mimic the original response ([{},...])
|
|
153
|
-
bids = this.interpretOrtbResponse({ body: responseBody.seatbid[0]?.bid }, originalRequest);
|
|
154
|
-
const paapiAdapterConfig = config.getConfig('paapiConfig') || config.getConfig('fledgeConfig') || {};
|
|
155
|
-
const fledgeInterestGroupBuyers = paapiAdapterConfig.interestGroupBuyers || [];
|
|
156
|
-
// values from the response.ext are the most important
|
|
157
|
-
const {
|
|
158
|
-
decisionLogicUrl = paapiAdapterConfig.decisionLogicUrl || paapiAdapterConfig.decisionLogicURL ||
|
|
159
|
-
FLEDGE_DECISION_LOGIC_URL,
|
|
160
|
-
seller = paapiAdapterConfig.seller || FLEDGE_SELLER_URL,
|
|
161
|
-
sellerTimeout = 500
|
|
162
|
-
} = responseBody.ext;
|
|
163
|
-
|
|
164
|
-
const fledgeConfig = {
|
|
165
|
-
seller,
|
|
166
|
-
decisionLogicUrl,
|
|
167
|
-
decisionLogicURL: decisionLogicUrl,
|
|
168
|
-
sellerTimeout
|
|
169
|
-
};
|
|
170
|
-
// fledgeConfig settings are more important; other paapiAdapterConfig settings are facultative
|
|
171
|
-
mergeDeep(fledgeConfig, paapiAdapterConfig, fledgeConfig);
|
|
172
|
-
responseBody.ext.igbid.forEach((igbid) => {
|
|
173
|
-
const perBuyerSignals = {...fledgeConfig.perBuyerSignals}; // may come from paapiAdapterConfig
|
|
174
|
-
igbid.igbuyer.forEach(buyerItem => {
|
|
175
|
-
perBuyerSignals[buyerItem.igdomain] = buyerItem.buyersignal
|
|
176
|
-
});
|
|
177
|
-
fledgeAuctionConfigs = fledgeAuctionConfigs || {};
|
|
178
|
-
fledgeAuctionConfigs[igbid.impid] = mergeDeep({}, fledgeConfig,
|
|
179
|
-
{
|
|
180
|
-
interestGroupBuyers: [...new Set([...fledgeInterestGroupBuyers, ...Object.keys(perBuyerSignals)])],
|
|
181
|
-
perBuyerSignals,
|
|
182
|
-
}
|
|
183
|
-
);
|
|
184
|
-
});
|
|
185
|
-
} else {
|
|
186
|
-
bids = this.interpretOrtbResponse(serverResponse, originalRequest);
|
|
187
|
-
}
|
|
188
|
-
|
|
189
|
-
if (fledgeAuctionConfigs) {
|
|
190
|
-
fledgeAuctionConfigs = Object.entries(fledgeAuctionConfigs).map(([bidId, cfg]) => {
|
|
191
|
-
return {
|
|
192
|
-
bidId,
|
|
193
|
-
config: Object.assign({
|
|
194
|
-
auctionSignals: {}
|
|
195
|
-
}, cfg)
|
|
196
|
-
}
|
|
197
|
-
});
|
|
198
|
-
logInfo('Response with FLEDGE:', { bids, fledgeAuctionConfigs });
|
|
199
|
-
return {
|
|
200
|
-
bids,
|
|
201
|
-
paapi: fledgeAuctionConfigs,
|
|
202
|
-
}
|
|
203
|
-
}
|
|
204
|
-
return bids;
|
|
130
|
+
return this.interpretOrtbResponse(serverResponse, originalRequest);
|
|
205
131
|
}
|
|
206
132
|
};
|
|
207
133
|
registerBidder(spec);
|
|
@@ -239,13 +165,8 @@ function mapImpression(slot, bidderRequest) {
|
|
|
239
165
|
imp.bidfloor = bidfloor;
|
|
240
166
|
}
|
|
241
167
|
|
|
242
|
-
if (
|
|
243
|
-
imp.ext
|
|
244
|
-
imp.ext.ae = slot?.ortb2Imp?.ext?.ae
|
|
245
|
-
} else {
|
|
246
|
-
if (imp.ext?.ae) {
|
|
247
|
-
delete imp.ext.ae;
|
|
248
|
-
}
|
|
168
|
+
if (imp.ext?.ae) {
|
|
169
|
+
delete imp.ext.ae;
|
|
249
170
|
}
|
|
250
171
|
|
|
251
172
|
const tid = deepAccess(slot, 'ortb2Imp.ext.tid');
|
|
@@ -1001,7 +1001,7 @@ function applyFPD(bidRequest, mediaType, data) {
|
|
|
1001
1001
|
return param;
|
|
1002
1002
|
}
|
|
1003
1003
|
|
|
1004
|
-
// finally we will add this one, if param has been added already, add our
|
|
1004
|
+
// finally we will add this one, if param has been added already, add our separator
|
|
1005
1005
|
if (param) {
|
|
1006
1006
|
param += '~~'
|
|
1007
1007
|
}
|
|
@@ -306,7 +306,7 @@ const getHighestFloor = (slot) => {
|
|
|
306
306
|
const getCurrency = (bidderRequest) => getCurrencyFromBidderRequest(bidderRequest) || DEFAULT_CURRENCY;
|
|
307
307
|
|
|
308
308
|
/**
|
|
309
|
-
* Get value for first
|
|
309
|
+
* Get value for first occurrence of key within the collection
|
|
310
310
|
*/
|
|
311
311
|
const setOnAny = (collection, key) => collection.reduce((prev, next) => prev || deepAccess(next, key), false);
|
|
312
312
|
|