prebid.js 7.18.0 → 7.20.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/dist/33acrossBidAdapter.js +1 -1
- package/dist/33acrossIdSystem.js +1 -1
- package/dist/adWMGAnalyticsAdapter.js +1 -1
- package/dist/adagioAnalyticsAdapter.js +1 -1
- package/dist/adagioBidAdapter.js +1 -1
- package/dist/adbookpspBidAdapter.js +1 -1
- package/dist/adfBidAdapter.js +1 -1
- package/dist/adgenerationBidAdapter.js +1 -1
- package/dist/adkernelAdnAnalyticsAdapter.js +1 -1
- package/dist/adkernelBidAdapter.js +1 -1
- package/dist/adlooxAdServerVideo.js +1 -1
- package/dist/adlooxAnalyticsAdapter.js +1 -1
- package/dist/adlooxRtdProvider.js +1 -1
- package/dist/adomikAnalyticsAdapter.js +1 -1
- package/dist/adqueryIdSystem.js +1 -1
- package/dist/adrelevantisBidAdapter.js +1 -1
- package/dist/adtrgtmeBidAdapter.js +1 -1
- package/dist/adxcgAnalyticsAdapter.js +1 -1
- package/dist/adxcgBidAdapter.js +1 -1
- package/dist/adxpremiumAnalyticsAdapter.js +1 -1
- package/dist/ajaBidAdapter.js +1 -1
- package/dist/amxBidAdapter.js +1 -1
- package/dist/amxIdSystem.js +1 -1
- package/dist/aolBidAdapter.js +1 -1
- package/dist/appierAnalyticsAdapter.js +1 -1
- package/dist/appnexusBidAdapter.js +1 -1
- package/dist/asoBidAdapter.js +1 -1
- package/dist/atsAnalyticsAdapter.js +1 -1
- package/dist/axonixBidAdapter.js +1 -1
- package/dist/{andBeyondMediaBidAdapter.js → beyondmediaBidAdapter.js} +1 -1
- package/dist/bidViewability.js +1 -1
- package/dist/bidglassBidAdapter.js +1 -1
- package/dist/bidwatchAnalyticsAdapter.js +1 -1
- package/dist/big-richmediaBidAdapter.js +1 -1
- package/dist/bridgewellBidAdapter.js +1 -1
- package/dist/brightMountainMediaBidAdapter.js +1 -1
- package/dist/byDataAnalyticsAdapter.js +1 -1
- package/dist/carodaBidAdapter.js +1 -1
- package/dist/categoryTranslation.js +1 -1
- package/dist/cleanioRtdProvider.js +1 -1
- package/dist/colossussspBidAdapter.js +1 -1
- package/dist/concertAnalyticsAdapter.js +1 -1
- package/dist/concertBidAdapter.js +1 -1
- package/dist/connectIdSystem.js +1 -1
- package/dist/connectadBidAdapter.js +1 -1
- package/dist/consentManagement.js +1 -1
- package/dist/consentManagementUsp.js +1 -1
- package/dist/consumableBidAdapter.js +1 -1
- package/dist/conversantAnalyticsAdapter.js +1 -0
- package/dist/conversantBidAdapter.js +1 -1
- package/dist/craftBidAdapter.js +1 -1
- package/dist/criteoBidAdapter.js +1 -1
- package/dist/currency.js +1 -1
- package/dist/datablocksAnalyticsAdapter.js +1 -1
- package/dist/dchain.js +1 -1
- package/dist/debugging-standalone.js +1 -1
- package/dist/debugging.js +1 -1
- package/dist/dependencies.json +9 -0
- package/dist/dfpAdServerVideo.js +1 -1
- package/dist/dgkeywordRtdProvider.js +1 -1
- package/dist/dianomiBidAdapter.js +1 -1
- package/dist/dspxBidAdapter.js +1 -1
- package/dist/enrichmentFpdModule.js +1 -1
- package/dist/eplanningAnalyticsAdapter.js +1 -1
- package/dist/eplanningBidAdapter.js +1 -1
- package/dist/finativeBidAdapter.js +1 -1
- package/dist/fintezaAnalyticsAdapter.js +1 -1
- package/dist/fpd.js +1 -0
- package/dist/ftrackIdSystem.js +1 -1
- package/dist/gdprEnforcement.js +1 -1
- package/dist/glimpseBidAdapter.js +1 -1
- package/dist/gmosspBidAdapter.js +1 -1
- package/dist/goldbachBidAdapter.js +1 -1
- package/dist/googleAnalyticsAdapter.js +1 -1
- package/dist/gridBidAdapter.js +1 -1
- package/dist/gridNMBidAdapter.js +1 -1
- package/dist/gumgumBidAdapter.js +1 -1
- package/dist/h12mediaBidAdapter.js +1 -1
- package/dist/hadronAnalyticsAdapter.js +1 -1
- package/dist/id5AnalyticsAdapter.js +1 -1
- package/dist/id5IdSystem.js +1 -1
- package/dist/improvedigitalBidAdapter.js +1 -1
- package/dist/inmarBidAdapter.js +1 -1
- package/dist/insticatorBidAdapter.js +1 -1
- package/dist/invisiblyAnalyticsAdapter.js +1 -1
- package/dist/ixBidAdapter.js +1 -1
- package/dist/justpremiumBidAdapter.js +1 -1
- package/dist/kargoAnalyticsAdapter.js +1 -1
- package/dist/kinessoIdSystem.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/liveIntentAnalyticsAdapter.js +1 -1
- package/dist/liveIntentIdSystem.js +1 -1
- package/dist/livewrappedAnalyticsAdapter.js +1 -1
- package/dist/liveyieldAnalyticsAdapter.js +1 -1
- package/dist/logicadBidAdapter.js +1 -1
- package/dist/loglyliftBidAdapter.js +1 -1
- package/dist/lotamePanoramaIdSystem.js +1 -1
- package/dist/magniteAnalyticsAdapter.js +1 -0
- package/dist/malltvAnalyticsAdapter.js +1 -1
- package/dist/marsmediaAnalyticsAdapter.js +1 -1
- package/dist/marsmediaBidAdapter.js +1 -1
- package/dist/mass.js +1 -1
- package/dist/mediafuseBidAdapter.js +1 -1
- package/dist/mediakeysBidAdapter.js +1 -1
- package/dist/medianetAnalyticsAdapter.js +1 -1
- package/dist/mediasquareBidAdapter.js +1 -1
- package/dist/mgidBidAdapter.js +1 -1
- package/dist/minutemediaBidAdapter.js +1 -1
- package/dist/multibid.js +1 -1
- package/dist/nativoBidAdapter.js +1 -1
- package/dist/not-for-prod/prebid.js +198 -194
- package/dist/oguryBidAdapter.js +1 -1
- package/dist/onetagBidAdapter.js +1 -1
- package/dist/ooloAnalyticsAdapter.js +1 -1
- package/dist/openxAnalyticsAdapter.js +1 -1
- package/dist/optimonAnalyticsAdapter.js +1 -1
- package/dist/outbrainBidAdapter.js +1 -1
- package/dist/parrableIdSystem.js +1 -1
- package/dist/pianoDmpAnalyticsAdapter.js +1 -1
- package/dist/pixfutureBidAdapter.js +1 -1
- package/dist/prebid-core.js +2 -2
- package/dist/prebidServerBidAdapter.js +1 -1
- package/dist/prebidmanagerAnalyticsAdapter.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/pubperfAnalyticsAdapter.js +1 -1
- package/dist/pubstackAnalyticsAdapter.js +1 -1
- package/dist/pubwiseAnalyticsAdapter.js +1 -1
- package/dist/pubxaiAnalyticsAdapter.js +1 -1
- package/dist/pulsepointAnalyticsAdapter.js +1 -1
- package/dist/pxyzBidAdapter.js +1 -1
- package/dist/quantcastBidAdapter.js +1 -1
- package/dist/quantcastIdSystem.js +1 -1
- package/dist/readpeakBidAdapter.js +1 -1
- package/dist/realvuAnalyticsAdapter.js +1 -1
- package/dist/relaidoBidAdapter.js +1 -1
- package/dist/relevantAnalyticsAdapter.js +1 -1
- package/dist/rhythmoneBidAdapter.js +1 -1
- package/dist/riseBidAdapter.js +1 -1
- package/dist/rivrAnalyticsAdapter.js +1 -1
- package/dist/roxotAnalyticsAdapter.js +1 -1
- package/dist/rtdModule.js +1 -1
- package/dist/rubiconAnalyticsAdapter.js +1 -1
- package/dist/rubiconBidAdapter.js +1 -1
- package/dist/s2sTesting.js +1 -1
- package/dist/scaleableAnalyticsAdapter.js +1 -1
- package/dist/schain.js +1 -1
- package/dist/seedingAllianceBidAdapter.js +1 -1
- package/dist/seedtagBidAdapter.js +1 -1
- package/dist/sharedIdSystem.js +1 -1
- package/dist/sharethroughAnalyticsAdapter.js +1 -1
- package/dist/sharethroughBidAdapter.js +1 -1
- package/dist/shinezBidAdapter.js +1 -1
- package/dist/sigmoidAnalyticsAdapter.js +1 -1
- package/dist/smaatoBidAdapter.js +1 -1
- package/dist/smartadserverBidAdapter.js +1 -1
- package/dist/smartxBidAdapter.js +1 -1
- package/dist/smilewantedBidAdapter.js +1 -1
- package/dist/sonobiAnalyticsAdapter.js +1 -1
- package/dist/sonobiBidAdapter.js +1 -1
- package/dist/sovrnAnalyticsAdapter.js +1 -1
- package/dist/sovrnBidAdapter.js +1 -1
- package/dist/sspBCBidAdapter.js +1 -1
- package/dist/staqAnalyticsAdapter.js +1 -1
- package/dist/sublimeBidAdapter.js +1 -1
- package/dist/synacormediaBidAdapter.js +1 -1
- package/dist/taboolaBidAdapter.js +1 -1
- package/dist/tapadIdSystem.js +1 -1
- package/dist/targetVideoBidAdapter.js +1 -1
- package/dist/teadsBidAdapter.js +1 -1
- package/dist/teadsIdSystem.js +1 -0
- package/dist/terceptAnalyticsAdapter.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/underdogmediaBidAdapter.js +1 -1
- package/dist/undertoneBidAdapter.js +1 -1
- package/dist/userId.js +1 -1
- package/dist/vidazooBidAdapter.js +1 -1
- package/dist/videobyteBidAdapter.js +1 -1
- package/dist/visxBidAdapter.js +1 -1
- package/dist/vrtcalBidAdapter.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/yahoosspBidAdapter.js +1 -1
- package/dist/yandexBidAdapter.js +1 -1
- package/dist/yieldmoBidAdapter.js +1 -1
- package/dist/yieldoneAnalyticsAdapter.js +1 -1
- package/dist/yuktamediaAnalyticsAdapter.js +1 -1
- package/dist/zeta_global_sspAnalyticsAdapter.js +1 -1
- package/libraries/fpd/sua.js +98 -0
- package/modules/.submodules.json +1 -0
- package/modules/adfBidAdapter.js +1 -1
- package/modules/adkernelAdnBidAdapter.js +1 -0
- package/modules/adkernelBidAdapter.js +2 -2
- package/modules/adqueryIdSystem.js +8 -8
- package/modules/adxcgBidAdapter.js +1 -1
- package/modules/amxBidAdapter.js +1 -1
- package/modules/aolBidAdapter.js +25 -2
- package/modules/appnexusBidAdapter.js +19 -2
- package/modules/{andBeyondMediaBidAdapter.js → beyondmediaBidAdapter.js} +0 -0
- package/modules/{andBeyondMediaBidAdapter.md → beyondmediaBidAdapter.md} +1 -1
- package/modules/categoryTranslation.js +4 -4
- package/modules/cleanioRtdProvider.js +3 -4
- package/modules/colossussspBidAdapter.js +2 -1
- package/modules/connectIdSystem.js +16 -1
- package/modules/conversantAnalyticsAdapter.js +560 -0
- package/modules/conversantAnalyticsAdapter.md +47 -0
- package/modules/criteoBidAdapter.js +1 -1
- package/modules/currency.js +11 -11
- package/modules/dchain.js +2 -2
- package/modules/debugging/bidInterceptor.js +2 -2
- package/modules/debugging/debugging.js +10 -2
- package/modules/debugging/legacy.js +2 -2
- package/modules/dgkeywordRtdProvider.js +21 -3
- package/modules/dianomiBidAdapter.js +1 -1
- package/modules/enrichmentFpdModule.js +33 -14
- package/modules/eplanningBidAdapter.js +48 -2
- package/modules/finativeBidAdapter.js +1 -1
- package/modules/gridBidAdapter.js +187 -117
- package/modules/improvedigitalBidAdapter.js +2 -2
- package/modules/ixBidAdapter.js +94 -23
- package/modules/liveIntentIdSystem.js +39 -5
- package/modules/lotamePanoramaIdSystem.js +10 -6
- package/modules/magniteAnalyticsAdapter.js +902 -0
- package/modules/magniteAnalyticsAdapter.md +18 -0
- package/modules/mass.js +2 -2
- package/modules/mediakeysBidAdapter.js +6 -1
- package/modules/mediakeysBidAdapter.md +50 -40
- package/modules/multibid/index.js +5 -5
- package/modules/nativoBidAdapter.js +1 -1
- package/modules/pixfutureBidAdapter.js +46 -15
- package/modules/prebidServerBidAdapter/index.js +54 -19
- package/modules/priceFloors.js +8 -22
- package/modules/readpeakBidAdapter.js +1 -1
- package/modules/rubiconAnalyticsAdapter.js +14 -9
- package/modules/rubiconBidAdapter.js +2 -3
- package/modules/seedingAllianceBidAdapter.js +1 -1
- package/modules/sharethroughBidAdapter.js +1 -1
- package/modules/taboolaBidAdapter.js +5 -5
- package/modules/talkadsBidAdapter.js +1 -0
- package/modules/teadsIdSystem.js +234 -0
- package/modules/teadsIdSystem.md +22 -0
- package/modules/truereachBidAdapter.js +1 -0
- package/modules/ttdBidAdapter.js +1 -1
- package/modules/userId/index.js +21 -14
- package/modules/vrtcalBidAdapter.js +7 -1
- package/modules/vuukleBidAdapter.js +34 -3
- package/modules/yahoosspBidAdapter.js +4 -2
- package/modules/yandexBidAdapter.js +31 -8
- package/package.json +2 -2
- package/src/adapterManager.js +2 -4
- package/src/adapters/bidderFactory.js +13 -11
- package/src/auction.js +140 -69
- package/src/constants.json +8 -0
- package/src/cpmBucketManager.js +22 -3
- package/src/native.js +1 -5
- package/src/prebid.js +5 -6
- package/src/targeting.js +31 -14
- package/test/fixtures/fixtures.js +2 -1
- package/test/spec/auctionmanager_spec.js +109 -21
- package/test/spec/cpmBucketManager_spec.js +239 -177
- package/test/spec/fpd/sua_spec.js +244 -0
- package/test/spec/modules/adfBidAdapter_spec.js +2 -3
- package/test/spec/modules/adqueryIdSystem_spec.js +0 -2
- package/test/spec/modules/adxcgBidAdapter_spec.js +2 -3
- package/test/spec/modules/amxBidAdapter_spec.js +3 -2
- package/test/spec/modules/aolBidAdapter_spec.js +42 -9
- package/test/spec/modules/appnexusBidAdapter_spec.js +24 -0
- package/test/spec/modules/{andBeyondMediaBidAdapter_spec.js → beyondmediaBidAdapter_spec.js} +1 -1
- package/test/spec/modules/colossussspBidAdapter_spec.js +4 -2
- package/test/spec/modules/connectIdSystem_spec.js +20 -0
- package/test/spec/modules/conversantAnalyticsAdapter_spec.js +963 -0
- package/test/spec/modules/currency_spec.js +14 -6
- package/test/spec/modules/debugging_mod_spec.js +9 -0
- package/test/spec/modules/dgkeywordRtdProvider_spec.js +83 -1
- package/test/spec/modules/dianomiBidAdapter_spec.js +2 -3
- package/test/spec/modules/enrichmentFpdModule_spec.js +50 -7
- package/test/spec/modules/eplanningBidAdapter_spec.js +285 -1
- package/test/spec/modules/fpdModule_spec.js +9 -0
- package/test/spec/modules/gridBidAdapter_spec.js +87 -31
- package/test/spec/modules/ixBidAdapter_spec.js +221 -2
- package/test/spec/modules/liveIntentIdMinimalSystem_spec.js +62 -8
- package/test/spec/modules/liveIntentIdSystem_spec.js +62 -8
- package/test/spec/modules/lotamePanoramaIdSystem_spec.js +0 -1
- package/test/spec/modules/magniteAnalyticsAdapter_spec.js +1942 -0
- package/test/spec/modules/mediakeysBidAdapter_spec.js +20 -3
- package/test/spec/modules/nativoBidAdapter_spec.js +13 -2
- package/test/spec/modules/prebidServerBidAdapter_spec.js +202 -15
- package/test/spec/modules/priceFloors_spec.js +5 -5
- package/test/spec/modules/rubiconAnalyticsAdapter_spec.js +2 -3
- package/test/spec/modules/seedtagBidAdapter_spec.js +15 -18
- package/test/spec/modules/sharethroughBidAdapter_spec.js +2 -1
- package/test/spec/modules/taboolaBidAdapter_spec.js +112 -13
- package/test/spec/modules/teadsIdSystem_spec.js +271 -0
- package/test/spec/modules/ttdBidAdapter_spec.js +3 -3
- package/test/spec/modules/userId_spec.js +39 -4
- package/test/spec/modules/vrtcalBidAdapter_spec.js +12 -1
- package/test/spec/modules/vuukleBidAdapter_spec.js +87 -0
- package/test/spec/modules/yahoosspBidAdapter_spec.js +48 -1
- package/test/spec/modules/yandexBidAdapter_spec.js +8 -5
- package/test/spec/native_spec.js +5 -0
- package/test/spec/unit/core/bidderFactory_spec.js +66 -11
- package/test/spec/unit/core/targeting_spec.js +28 -9
- package/test/spec/unit/pbjs_api_spec.js +48 -2
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# Magnite Analytics Adapter
|
|
2
|
+
|
|
3
|
+
```
|
|
4
|
+
Module Name: Magnite Analytics Adapter
|
|
5
|
+
Module Type: Analytics Adapter
|
|
6
|
+
Maintainer: demand-manager-support@magnite.com
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
## How to configure?
|
|
10
|
+
```
|
|
11
|
+
pbjs.enableAnalytics({
|
|
12
|
+
provider: 'magnite',
|
|
13
|
+
options: {
|
|
14
|
+
accountId: 12345, // The account id assigned to you by the Magnite Team
|
|
15
|
+
endpoint: 'http:localhost:9999/event' // Given by the Magnite Team
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
```
|
package/modules/mass.js
CHANGED
|
@@ -78,7 +78,7 @@ export function updateRenderers() {
|
|
|
78
78
|
/**
|
|
79
79
|
* Before hook for 'addBidResponse'.
|
|
80
80
|
*/
|
|
81
|
-
export const addBidResponseHook = timedBidResponseHook('mass', function addBidResponseHook(next, adUnitCode, bid, {index = auctionManager.index} = {}) {
|
|
81
|
+
export const addBidResponseHook = timedBidResponseHook('mass', function addBidResponseHook(next, adUnitCode, bid, reject, {index = auctionManager.index} = {}) {
|
|
82
82
|
let renderer;
|
|
83
83
|
for (let i = 0; i < renderers.length; i++) {
|
|
84
84
|
if (renderers[i].match(bid)) {
|
|
@@ -104,7 +104,7 @@ export const addBidResponseHook = timedBidResponseHook('mass', function addBidRe
|
|
|
104
104
|
addListenerOnce();
|
|
105
105
|
}
|
|
106
106
|
|
|
107
|
-
next(adUnitCode, bid);
|
|
107
|
+
next(adUnitCode, bid, reject);
|
|
108
108
|
});
|
|
109
109
|
|
|
110
110
|
/**
|
|
@@ -572,7 +572,12 @@ function nativeBidResponseHandler(bid) {
|
|
|
572
572
|
native.impressionTrackers.push(tracker.url);
|
|
573
573
|
break;
|
|
574
574
|
case 2:
|
|
575
|
-
|
|
575
|
+
const script = `<script async src=\"${tracker.url}\"></script>`;
|
|
576
|
+
if (!native.javascriptTrackers) {
|
|
577
|
+
native.javascriptTrackers = script;
|
|
578
|
+
} else {
|
|
579
|
+
native.javascriptTrackers += `\n${script}`;
|
|
580
|
+
}
|
|
576
581
|
break;
|
|
577
582
|
}
|
|
578
583
|
});
|
|
@@ -14,9 +14,10 @@ Connects to Mediakeys demand source to fetch bids.
|
|
|
14
14
|
|
|
15
15
|
## Banner only Ad Unit
|
|
16
16
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
17
|
+
The Mediakeys adapter accepts any valid OpenRTB Spec 2.5 property.
|
|
18
|
+
|
|
19
|
+
```javascript
|
|
20
|
+
var adUnits = [{
|
|
20
21
|
code: 'test',
|
|
21
22
|
mediaTypes: {
|
|
22
23
|
banner: {
|
|
@@ -27,20 +28,26 @@ var adUnits = [
|
|
|
27
28
|
bidder: 'mediakeys',
|
|
28
29
|
params: {} // no params required.
|
|
29
30
|
}]
|
|
30
|
-
}
|
|
31
|
+
}]
|
|
31
32
|
```
|
|
32
33
|
|
|
33
34
|
## Native only Ad Unit
|
|
34
35
|
|
|
35
36
|
The Mediakeys adapter accepts two optional params for native requests. Please see the [OpenRTB Native Ads Specification](https://www.iab.com/wp-content/uploads/2018/03/OpenRTB-Native-Ads-Specification-Final-1.2.pdf) for valid values.
|
|
36
37
|
|
|
37
|
-
```
|
|
38
|
-
var adUnits = [
|
|
39
|
-
{
|
|
38
|
+
```javascript
|
|
39
|
+
var adUnits = [{
|
|
40
40
|
code: 'test',
|
|
41
41
|
mediaTypes: {
|
|
42
42
|
native: {
|
|
43
|
-
|
|
43
|
+
title: {
|
|
44
|
+
required: true,
|
|
45
|
+
len: 120
|
|
46
|
+
},
|
|
47
|
+
image: {
|
|
48
|
+
required: true,
|
|
49
|
+
sizes: [300, 250]
|
|
50
|
+
}
|
|
44
51
|
}
|
|
45
52
|
},
|
|
46
53
|
bids: [{
|
|
@@ -52,7 +59,7 @@ var adUnits = [
|
|
|
52
59
|
}
|
|
53
60
|
}
|
|
54
61
|
}]
|
|
55
|
-
}
|
|
62
|
+
}]
|
|
56
63
|
```
|
|
57
64
|
|
|
58
65
|
## Video only Ad Unit
|
|
@@ -61,63 +68,65 @@ The Mediakeys adapter accepts any valid openRTB 2.5 video property. Properties c
|
|
|
61
68
|
|
|
62
69
|
### Outstream context
|
|
63
70
|
|
|
64
|
-
```
|
|
65
|
-
var adUnits = [
|
|
66
|
-
{
|
|
71
|
+
```javascript
|
|
72
|
+
var adUnits = [{
|
|
67
73
|
code: 'test',
|
|
68
74
|
mediaTypes: {
|
|
69
75
|
video: {
|
|
70
76
|
context: 'outstream',
|
|
71
|
-
playerSize: [
|
|
77
|
+
playerSize: [1280, 720],
|
|
72
78
|
// additional OpenRTB video params
|
|
73
79
|
// placement: 2,
|
|
74
80
|
// api: [1],
|
|
75
81
|
// …
|
|
82
|
+
mimes: ['video/mp4'],
|
|
83
|
+
protocols: [2, 3],
|
|
84
|
+
skip: 0
|
|
76
85
|
}
|
|
77
86
|
},
|
|
78
87
|
renderer: {
|
|
79
88
|
url: 'https://acdn.adnxs.com/video/outstream/ANOutstreamVideo.js',
|
|
89
|
+
// the render method must fetch the vast xml document before displaying video
|
|
80
90
|
render: function (bid) {
|
|
81
|
-
var
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
content: text,
|
|
88
|
-
player_width: bid.width || bidReqConfig.mediaTypes.video.playerSize[0],
|
|
89
|
-
player_height: bid.height || bidReqConfig.mediaTypes.video.playerSize[1],
|
|
90
|
-
}
|
|
91
|
+
var adResponse = fetch(bid.vastUrl).then(resp => resp.text()).then(text => ({
|
|
92
|
+
ad: {
|
|
93
|
+
video: {
|
|
94
|
+
content: text,
|
|
95
|
+
player_height: bid.playerHeight,
|
|
96
|
+
player_width: bid.playerWidth
|
|
91
97
|
}
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
98
|
+
}
|
|
99
|
+
}))
|
|
100
|
+
|
|
101
|
+
adResponse.then((content) => {
|
|
102
|
+
bid.renderer.push(() => {
|
|
103
|
+
ANOutstreamVideo.renderAd({
|
|
104
|
+
targetId: bid.adUnitCode,
|
|
105
|
+
adResponse: content
|
|
100
106
|
});
|
|
101
|
-
})
|
|
102
|
-
}
|
|
107
|
+
});
|
|
108
|
+
})
|
|
103
109
|
}
|
|
104
110
|
},
|
|
105
111
|
bids: [{
|
|
106
112
|
bidder: 'mediakeys',
|
|
107
113
|
params: {
|
|
108
114
|
video: {
|
|
109
|
-
// additional OpenRTB video params.
|
|
115
|
+
// additional OpenRTB video params.
|
|
116
|
+
// will be merged with params defined at mediaTypes level
|
|
117
|
+
api: [1]
|
|
110
118
|
}
|
|
111
119
|
}
|
|
112
120
|
}]
|
|
113
|
-
}
|
|
121
|
+
}]
|
|
114
122
|
```
|
|
115
123
|
|
|
116
124
|
### Instream context
|
|
117
125
|
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
126
|
+
For Instream Video, you have to enable the Instream Tracking Module to have Prebid emit the onBidWon required event.
|
|
127
|
+
|
|
128
|
+
```javascript
|
|
129
|
+
var adUnits = [{
|
|
121
130
|
code: 'test',
|
|
122
131
|
mediaTypes: {
|
|
123
132
|
video: {
|
|
@@ -132,8 +141,9 @@ var adUnits = [
|
|
|
132
141
|
bids: [{
|
|
133
142
|
bidder: 'mediakeys',
|
|
134
143
|
params: {
|
|
135
|
-
// additional OpenRTB video params.
|
|
144
|
+
// additional OpenRTB video params.
|
|
145
|
+
// will be merged with params defined at mediaTypes level
|
|
136
146
|
}
|
|
137
147
|
}]
|
|
138
|
-
}
|
|
148
|
+
}]
|
|
139
149
|
```
|
|
@@ -99,7 +99,7 @@ export function adjustBidderRequestsHook(fn, bidderRequests) {
|
|
|
99
99
|
* @param {String} ad unit code for bid
|
|
100
100
|
* @param {Object} bid object
|
|
101
101
|
*/
|
|
102
|
-
export const addBidResponseHook = timedBidResponseHook('multibid', function addBidResponseHook(fn, adUnitCode, bid) {
|
|
102
|
+
export const addBidResponseHook = timedBidResponseHook('multibid', function addBidResponseHook(fn, adUnitCode, bid, reject) {
|
|
103
103
|
let floor = deepAccess(bid, 'floorData.floorValue');
|
|
104
104
|
|
|
105
105
|
if (!config.getConfig('multibid')) resetMultiConfig();
|
|
@@ -107,7 +107,7 @@ export const addBidResponseHook = timedBidResponseHook('multibid', function addB
|
|
|
107
107
|
// Else checks if multiconfig exists and bid bidderCode exists within config
|
|
108
108
|
// Else continue with no modifications
|
|
109
109
|
if (hasMultibid && multiConfig[bid.bidderCode] && deepAccess(bid, 'video.context') === 'adpod') {
|
|
110
|
-
fn.call(this, adUnitCode, bid);
|
|
110
|
+
fn.call(this, adUnitCode, bid, reject);
|
|
111
111
|
} else if (hasMultibid && multiConfig[bid.bidderCode]) {
|
|
112
112
|
// Set property multibidPrefix on bid
|
|
113
113
|
if (multiConfig[bid.bidderCode].prefix) bid.multibidPrefix = multiConfig[bid.bidderCode].prefix;
|
|
@@ -127,7 +127,7 @@ export const addBidResponseHook = timedBidResponseHook('multibid', function addB
|
|
|
127
127
|
if (multiConfig[bid.bidderCode].prefix) bid.targetingBidder = multiConfig[bid.bidderCode].prefix + length;
|
|
128
128
|
if (length === multiConfig[bid.bidderCode].maxbids) multibidUnits[adUnitCode][bid.bidderCode].maxReached = true;
|
|
129
129
|
|
|
130
|
-
fn.call(this, adUnitCode, bid);
|
|
130
|
+
fn.call(this, adUnitCode, bid, reject);
|
|
131
131
|
} else {
|
|
132
132
|
logWarn(`Filtering multibid received from bidder ${bid.bidderCode}: ` + ((multibidUnits[adUnitCode][bid.bidderCode].maxReached) ? `Maximum bid limit reached for ad unit code ${adUnitCode}` : 'Bid cpm under floors value.'));
|
|
133
133
|
}
|
|
@@ -137,10 +137,10 @@ export const addBidResponseHook = timedBidResponseHook('multibid', function addB
|
|
|
137
137
|
deepSetValue(multibidUnits, [adUnitCode, bid.bidderCode], {ads: [bid]});
|
|
138
138
|
if (multibidUnits[adUnitCode][bid.bidderCode].ads.length === multiConfig[bid.bidderCode].maxbids) multibidUnits[adUnitCode][bid.bidderCode].maxReached = true;
|
|
139
139
|
|
|
140
|
-
fn.call(this, adUnitCode, bid);
|
|
140
|
+
fn.call(this, adUnitCode, bid, reject);
|
|
141
141
|
}
|
|
142
142
|
} else {
|
|
143
|
-
fn.call(this, adUnitCode, bid);
|
|
143
|
+
fn.call(this, adUnitCode, bid, reject);
|
|
144
144
|
}
|
|
145
145
|
});
|
|
146
146
|
|
|
@@ -145,7 +145,7 @@ export const spec = {
|
|
|
145
145
|
'params.url',
|
|
146
146
|
)
|
|
147
147
|
if (pageUrl == undefined || pageUrl === '') {
|
|
148
|
-
pageUrl = bidderRequest.refererInfo.
|
|
148
|
+
pageUrl = bidderRequest.refererInfo.location
|
|
149
149
|
}
|
|
150
150
|
|
|
151
151
|
placementId = deepAccess(bidRequest, 'params.placementId')
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {registerBidder} from '../src/adapters/bidderFactory.js';
|
|
2
|
-
import {getStorageManager} from '../src/storageManager.js';
|
|
3
|
-
import {BANNER} from '../src/mediaTypes.js';
|
|
4
|
-
import {config} from '../src/config.js';
|
|
5
|
-
import {find, includes} from '../src/polyfill.js';
|
|
1
|
+
import { registerBidder } from '../src/adapters/bidderFactory.js';
|
|
2
|
+
import { getStorageManager } from '../src/storageManager.js';
|
|
3
|
+
import { BANNER } from '../src/mediaTypes.js';
|
|
4
|
+
import { config } from '../src/config.js';
|
|
5
|
+
import { find, includes } from '../src/polyfill.js';
|
|
6
6
|
import {
|
|
7
7
|
convertCamelToUnderscore,
|
|
8
8
|
deepAccess,
|
|
@@ -13,14 +13,17 @@ import {
|
|
|
13
13
|
isPlainObject,
|
|
14
14
|
transformBidderParamKeywords
|
|
15
15
|
} from '../src/utils.js';
|
|
16
|
-
import {auctionManager} from '../src/auctionManager.js';
|
|
17
|
-
import {hasPurpose1Consent} from '../src/utils/gpdr.js';
|
|
16
|
+
import { auctionManager } from '../src/auctionManager.js';
|
|
18
17
|
|
|
19
18
|
const SOURCE = 'pbjs';
|
|
20
19
|
const storageManager = getStorageManager({bidderCode: 'pixfuture'});
|
|
21
20
|
const USER_PARAMS = ['age', 'externalUid', 'segments', 'gender', 'dnt', 'language'];
|
|
21
|
+
let pixID = '';
|
|
22
|
+
const GVLID = 839;
|
|
23
|
+
|
|
22
24
|
export const spec = {
|
|
23
25
|
code: 'pixfuture',
|
|
26
|
+
gvlid: GVLID,
|
|
24
27
|
hostname: 'https://gosrv.pixfuture.com',
|
|
25
28
|
|
|
26
29
|
getHostname() {
|
|
@@ -41,6 +44,10 @@ export const spec = {
|
|
|
41
44
|
const tags = validBidRequests.map(bidToTag);
|
|
42
45
|
const hostname = this.getHostname();
|
|
43
46
|
return validBidRequests.map((bidRequest) => {
|
|
47
|
+
if (bidRequest.params.pix_id) {
|
|
48
|
+
pixID = bidRequest.params.pix_id
|
|
49
|
+
}
|
|
50
|
+
|
|
44
51
|
let referer = '';
|
|
45
52
|
if (bidderRequest && bidderRequest.refererInfo) {
|
|
46
53
|
referer = bidderRequest.refererInfo.page || '';
|
|
@@ -123,7 +130,7 @@ export const spec = {
|
|
|
123
130
|
const ret = {
|
|
124
131
|
url: `${hostname}/pixservices`,
|
|
125
132
|
method: 'POST',
|
|
126
|
-
options: {withCredentials:
|
|
133
|
+
options: {withCredentials: true},
|
|
127
134
|
data: {
|
|
128
135
|
v: $$PREBID_GLOBAL$$.version,
|
|
129
136
|
pageUrl: referer,
|
|
@@ -162,15 +169,39 @@ export const spec = {
|
|
|
162
169
|
|
|
163
170
|
return bids;
|
|
164
171
|
},
|
|
165
|
-
getUserSyncs: function (syncOptions, bid, gdprConsent) {
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
172
|
+
getUserSyncs: function (syncOptions, bid, gdprConsent, uspConsent) {
|
|
173
|
+
const syncs = [];
|
|
174
|
+
|
|
175
|
+
let syncurl = 'pixid=' + pixID;
|
|
176
|
+
let gdpr = (gdprConsent && gdprConsent.gdprApplies) ? 1 : 0;
|
|
177
|
+
let consent = gdprConsent ? encodeURIComponent(gdprConsent.consentString || '') : '';
|
|
178
|
+
|
|
179
|
+
// Attaching GDPR Consent Params in UserSync url
|
|
180
|
+
syncurl += '&gdprconcent=' + gdpr + '&adsync=' + consent;
|
|
181
|
+
|
|
182
|
+
// CCPA
|
|
183
|
+
if (uspConsent) {
|
|
184
|
+
syncurl += '&us_privacy=' + encodeURIComponent(uspConsent);
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
// coppa compliance
|
|
188
|
+
if (config.getConfig('coppa') === true) {
|
|
189
|
+
syncurl += '&coppa=1';
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
if (syncOptions.iframeEnabled) {
|
|
193
|
+
syncs.push({
|
|
170
194
|
type: 'iframe',
|
|
171
|
-
url: 'https://gosrv.pixfuture.com/cookiesync?
|
|
172
|
-
}
|
|
195
|
+
url: 'https://gosrv.pixfuture.com/cookiesync?f=b&' + syncurl
|
|
196
|
+
});
|
|
197
|
+
} else {
|
|
198
|
+
syncs.push({
|
|
199
|
+
type: 'image',
|
|
200
|
+
url: 'https://gosrv.pixfuture.com/cookiesync?f=i&' + syncurl
|
|
201
|
+
});
|
|
173
202
|
}
|
|
203
|
+
|
|
204
|
+
return syncs;
|
|
174
205
|
}
|
|
175
206
|
};
|
|
176
207
|
|
|
@@ -522,6 +522,8 @@ Object.assign(ORTB2.prototype, {
|
|
|
522
522
|
let imps = [];
|
|
523
523
|
let aliases = {};
|
|
524
524
|
const firstBidRequest = bidRequests[0];
|
|
525
|
+
let floorMin = null;
|
|
526
|
+
let floorMinCur = null;
|
|
525
527
|
|
|
526
528
|
// transform ad unit into array of OpenRTB impression objects
|
|
527
529
|
let impIds = new Set();
|
|
@@ -671,21 +673,21 @@ Object.assign(ORTB2.prototype, {
|
|
|
671
673
|
|
|
672
674
|
mergeDeep(imp, mediaTypes);
|
|
673
675
|
|
|
676
|
+
const convertCurrency = typeof getGlobal().convertCurrency !== 'function'
|
|
677
|
+
? (amount) => amount
|
|
678
|
+
: (amount, from, to) => {
|
|
679
|
+
if (from === to) return amount;
|
|
680
|
+
let result = null;
|
|
681
|
+
try {
|
|
682
|
+
result = getGlobal().convertCurrency(amount, from, to);
|
|
683
|
+
} catch (e) {
|
|
684
|
+
}
|
|
685
|
+
return result;
|
|
686
|
+
}
|
|
687
|
+
|
|
674
688
|
const floor = (() => {
|
|
675
689
|
// we have to pick a floor for the imp - here we attempt to find the minimum floor
|
|
676
690
|
// across all bids for this adUnit
|
|
677
|
-
|
|
678
|
-
const convertCurrency = typeof getGlobal().convertCurrency !== 'function'
|
|
679
|
-
? (amount) => amount
|
|
680
|
-
: (amount, from, to) => {
|
|
681
|
-
if (from === to) return amount;
|
|
682
|
-
let result = null;
|
|
683
|
-
try {
|
|
684
|
-
result = getGlobal().convertCurrency(amount, from, to);
|
|
685
|
-
} catch (e) {
|
|
686
|
-
}
|
|
687
|
-
return result;
|
|
688
|
-
}
|
|
689
691
|
const s2sCurrency = config.getConfig('currency.adServerCurrency') || DEFAULT_S2S_CURRENCY;
|
|
690
692
|
|
|
691
693
|
return adUnit.bids
|
|
@@ -696,6 +698,7 @@ Object.assign(ORTB2.prototype, {
|
|
|
696
698
|
const {currency, floor} = bid.getFloor({
|
|
697
699
|
currency: s2sCurrency
|
|
698
700
|
});
|
|
701
|
+
|
|
699
702
|
return {
|
|
700
703
|
currency,
|
|
701
704
|
floor: parseFloat(floor)
|
|
@@ -717,11 +720,13 @@ Object.assign(ORTB2.prototype, {
|
|
|
717
720
|
min.ref = min.min = floor;
|
|
718
721
|
} else {
|
|
719
722
|
const value = convertCurrency(floor.floor, floor.currency, min.ref.currency);
|
|
723
|
+
|
|
720
724
|
if (value != null && value < min.ref.floor) {
|
|
721
725
|
min.ref.floor = value;
|
|
722
726
|
min.min = floor;
|
|
723
727
|
}
|
|
724
728
|
}
|
|
729
|
+
|
|
725
730
|
return min;
|
|
726
731
|
}, {}).min
|
|
727
732
|
})();
|
|
@@ -729,6 +734,26 @@ Object.assign(ORTB2.prototype, {
|
|
|
729
734
|
if (floor) {
|
|
730
735
|
imp.bidfloor = floor.floor;
|
|
731
736
|
imp.bidfloorcur = floor.currency;
|
|
737
|
+
|
|
738
|
+
// logic below relates to https://github.com/prebid/Prebid.js/issues/8749 and does the following:
|
|
739
|
+
// 1. check client-side floors (ref bidfloor/bidfloorcur & ortb2Imp floorMin/floorMinCur (if present))
|
|
740
|
+
// 2. set pbs req wide floorMinCur to the first floor currency found when iterating over imp's
|
|
741
|
+
// (if currency conversion logic present, convert all imp floor values to this currency)
|
|
742
|
+
// 3. compare/store ref to lowest floorMin value as each imp is iterated over
|
|
743
|
+
// 4. set req wide floorMin and floorMinCur values for pbs after iterations are done
|
|
744
|
+
if (floorMinCur == null) { floorMinCur = floor.currency }
|
|
745
|
+
const ortb2ImpFloorMin = imp.ext?.prebid?.floors?.floorMin || imp.ext?.prebid?.floorMin;
|
|
746
|
+
const ortb2ImpFloorCur = imp.ext?.prebid?.floors?.floorMinCur || imp.ext?.prebid?.floorMinCur || floorMinCur;
|
|
747
|
+
|
|
748
|
+
const convertedFloorMinValue = convertCurrency(floor.floor, floor.currency, floorMinCur);
|
|
749
|
+
const convertedOrtb2ImpFloorMinValue = ortb2ImpFloorMin && ortb2ImpFloorCur ? convertCurrency(ortb2ImpFloorMin, ortb2ImpFloorCur, floorMinCur) : false;
|
|
750
|
+
|
|
751
|
+
const lowestImpFloorMin = convertedOrtb2ImpFloorMinValue && convertedOrtb2ImpFloorMinValue < convertedFloorMinValue
|
|
752
|
+
? convertedOrtb2ImpFloorMinValue
|
|
753
|
+
: convertedFloorMinValue;
|
|
754
|
+
|
|
755
|
+
deepSetValue(imp, 'ext.prebid.floors.floorMin', lowestImpFloorMin);
|
|
756
|
+
if (floorMin == null || floorMin > lowestImpFloorMin) { floorMin = lowestImpFloorMin }
|
|
732
757
|
}
|
|
733
758
|
|
|
734
759
|
if (imp.banner || imp.video || imp.native) {
|
|
@@ -742,7 +767,7 @@ Object.assign(ORTB2.prototype, {
|
|
|
742
767
|
}
|
|
743
768
|
const request = {
|
|
744
769
|
id: firstBidRequest.auctionId,
|
|
745
|
-
source: {tid:
|
|
770
|
+
source: {tid: firstBidRequest.auctionId},
|
|
746
771
|
tmax: s2sConfig.timeout,
|
|
747
772
|
imp: imps,
|
|
748
773
|
// to do: add setconfig option to pass test = 1
|
|
@@ -903,6 +928,12 @@ Object.assign(ORTB2.prototype, {
|
|
|
903
928
|
addBidderFirstPartyDataToRequest(request, s2sBidRequest.ortb2Fragments?.bidder || {});
|
|
904
929
|
|
|
905
930
|
request.imp.forEach((imp) => this.impRequested[imp.id] = imp);
|
|
931
|
+
|
|
932
|
+
if (request.ext?.prebid?.floors?.enabled) {
|
|
933
|
+
request.ext.prebid.floors.floorMin = floorMin;
|
|
934
|
+
request.ext.prebid.floors.floorMinCur = floorMinCur;
|
|
935
|
+
}
|
|
936
|
+
|
|
906
937
|
return request;
|
|
907
938
|
},
|
|
908
939
|
|
|
@@ -919,10 +950,6 @@ Object.assign(ORTB2.prototype, {
|
|
|
919
950
|
(seatbid.bid || []).forEach(bid => {
|
|
920
951
|
let bidRequest = this.getBidRequest(bid.impid, seatbid.seat);
|
|
921
952
|
if (bidRequest == null) {
|
|
922
|
-
if (!s2sConfig.allowUnknownBidderCodes) {
|
|
923
|
-
logWarn(`PBS adapter received bid from unknown bidder (${seatbid.seat}), but 's2sConfig.allowUnknownBidderCodes' is not set. Ignoring bid.`);
|
|
924
|
-
return;
|
|
925
|
-
}
|
|
926
953
|
// for stored impression, a request was made with bidder code `null`. Pick it up here so that NO_BID, BID_WON, etc events
|
|
927
954
|
// can work as expected (otherwise, the original request will always result in NO_BID).
|
|
928
955
|
bidRequest = this.getBidRequest(bid.impid, null);
|
|
@@ -937,6 +964,7 @@ Object.assign(ORTB2.prototype, {
|
|
|
937
964
|
transactionId: this.adUnitsByImp[bid.impid].transactionId,
|
|
938
965
|
auctionId: this.auctionId,
|
|
939
966
|
});
|
|
967
|
+
bidObject.requestBidder = bidRequest?.bidder;
|
|
940
968
|
bidObject.requestTimestamp = this.requestTimestamp;
|
|
941
969
|
bidObject.cpm = cpm;
|
|
942
970
|
if (bid?.ext?.prebid?.meta?.adaptercode) {
|
|
@@ -1127,8 +1155,15 @@ export function PrebidServer() {
|
|
|
1127
1155
|
onBid: function ({adUnit, bid}) {
|
|
1128
1156
|
const metrics = bid.metrics = s2sBidRequest.metrics.fork().renameWith();
|
|
1129
1157
|
metrics.checkpoint('addBidResponse');
|
|
1130
|
-
if (
|
|
1131
|
-
|
|
1158
|
+
if ((bid.requestId == null || bid.requestBidder == null) && !s2sBidRequest.s2sConfig.allowUnknownBidderCodes) {
|
|
1159
|
+
logWarn(`PBS adapter received bid from unknown bidder (${bid.bidder}), but 's2sConfig.allowUnknownBidderCodes' is not set. Ignoring bid.`);
|
|
1160
|
+
addBidResponse.reject(adUnit, bid, CONSTANTS.REJECTION_REASON.BIDDER_DISALLOWED);
|
|
1161
|
+
} else {
|
|
1162
|
+
if (metrics.measureTime('addBidResponse.validate', () => isValid(adUnit, bid))) {
|
|
1163
|
+
addBidResponse(adUnit, bid);
|
|
1164
|
+
} else {
|
|
1165
|
+
addBidResponse.reject(adUnit, bid, CONSTANTS.REJECTION_REASON.INVALID);
|
|
1166
|
+
}
|
|
1132
1167
|
}
|
|
1133
1168
|
}
|
|
1134
1169
|
})
|
package/modules/priceFloors.js
CHANGED
|
@@ -20,7 +20,6 @@ import {ajaxBuilder} from '../src/ajax.js';
|
|
|
20
20
|
import * as events from '../src/events.js';
|
|
21
21
|
import CONSTANTS from '../src/constants.json';
|
|
22
22
|
import {getHook} from '../src/hook.js';
|
|
23
|
-
import {createBid} from '../src/bidfactory.js';
|
|
24
23
|
import {find} from '../src/polyfill.js';
|
|
25
24
|
import {getRefererInfo} from '../src/refererDetection.js';
|
|
26
25
|
import {bidderSettings} from '../src/bidderSettings.js';
|
|
@@ -694,11 +693,11 @@ function shouldFloorBid(floorData, floorInfo, bid) {
|
|
|
694
693
|
* @summary The main driving force of floors. On bidResponse we hook in and intercept bidResponses.
|
|
695
694
|
* And if the rule we find determines a bid should be floored we will do so.
|
|
696
695
|
*/
|
|
697
|
-
export const addBidResponseHook = timedBidResponseHook('priceFloors', function addBidResponseHook(fn, adUnitCode, bid) {
|
|
696
|
+
export const addBidResponseHook = timedBidResponseHook('priceFloors', function addBidResponseHook(fn, adUnitCode, bid, reject) {
|
|
698
697
|
let floorData = _floorDataForAuction[bid.auctionId];
|
|
699
698
|
// if no floor data then bail
|
|
700
699
|
if (!floorData || !bid || floorData.skipped) {
|
|
701
|
-
return fn.call(this, adUnitCode, bid);
|
|
700
|
+
return fn.call(this, adUnitCode, bid, reject);
|
|
702
701
|
}
|
|
703
702
|
|
|
704
703
|
const matchingBidRequest = auctionManager.index.getBidRequest(bid);
|
|
@@ -708,7 +707,7 @@ export const addBidResponseHook = timedBidResponseHook('priceFloors', function a
|
|
|
708
707
|
|
|
709
708
|
if (!floorInfo.matchingFloor) {
|
|
710
709
|
logWarn(`${MODULE_NAME}: unable to determine a matching price floor for bidResponse`, bid);
|
|
711
|
-
return fn.call(this, adUnitCode, bid);
|
|
710
|
+
return fn.call(this, adUnitCode, bid, reject);
|
|
712
711
|
}
|
|
713
712
|
|
|
714
713
|
// determine the base cpm to use based on if the currency matches the floor currency
|
|
@@ -724,7 +723,7 @@ export const addBidResponseHook = timedBidResponseHook('priceFloors', function a
|
|
|
724
723
|
adjustedCpm = getGlobal().convertCurrency(bid.cpm, bidResponseCurrency.toUpperCase(), floorCurrency);
|
|
725
724
|
} catch (err) {
|
|
726
725
|
logError(`${MODULE_NAME}: Unable do get currency conversion for bidResponse to Floor Currency. Do you have Currency module enabled? ${bid}`);
|
|
727
|
-
return fn.call(this, adUnitCode, bid);
|
|
726
|
+
return fn.call(this, adUnitCode, bid, reject);
|
|
728
727
|
}
|
|
729
728
|
}
|
|
730
729
|
|
|
@@ -737,25 +736,12 @@ export const addBidResponseHook = timedBidResponseHook('priceFloors', function a
|
|
|
737
736
|
// now do the compare!
|
|
738
737
|
if (shouldFloorBid(floorData, floorInfo, bid)) {
|
|
739
738
|
// bid fails floor -> throw it out
|
|
740
|
-
//
|
|
741
|
-
|
|
742
|
-
Object.assign(flooredBid, pick(bid, [
|
|
743
|
-
'floorData',
|
|
744
|
-
'width',
|
|
745
|
-
'height',
|
|
746
|
-
'mediaType',
|
|
747
|
-
'currency',
|
|
748
|
-
'originalCpm',
|
|
749
|
-
'originalCurrency',
|
|
750
|
-
'getCpmInNewCurrency',
|
|
751
|
-
]));
|
|
752
|
-
flooredBid.status = CONSTANTS.BID_STATUS.BID_REJECTED;
|
|
753
|
-
// if floor not met update bid with 0 cpm so it is not included downstream and marked as no-bid
|
|
754
|
-
flooredBid.cpm = 0;
|
|
739
|
+
// continue with a "NO_BID" bid, TODO: remove this in v8
|
|
740
|
+
const flooredBid = reject(CONSTANTS.REJECTION_REASON.FLOOR_NOT_MET);
|
|
755
741
|
logWarn(`${MODULE_NAME}: ${flooredBid.bidderCode}'s Bid Response for ${adUnitCode} was rejected due to floor not met (adjusted cpm: ${bid?.floorData?.cpmAfterAdjustments}, floor: ${floorInfo?.matchingFloor})`, bid);
|
|
756
|
-
return fn.call(this, adUnitCode, flooredBid);
|
|
742
|
+
return fn.call(this, adUnitCode, flooredBid, reject);
|
|
757
743
|
}
|
|
758
|
-
return fn.call(this, adUnitCode, bid);
|
|
744
|
+
return fn.call(this, adUnitCode, bid, reject);
|
|
759
745
|
});
|
|
760
746
|
|
|
761
747
|
config.getConfig('floors', config => handleSetFloorsConfig(config.floors));
|
|
@@ -62,15 +62,20 @@ const cache = {
|
|
|
62
62
|
|
|
63
63
|
const BID_REJECTED_IPF = 'rejected-ipf';
|
|
64
64
|
|
|
65
|
-
export let rubiConf
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
65
|
+
export let rubiConf;
|
|
66
|
+
export const resetRubiConf = () => {
|
|
67
|
+
rubiConf = {
|
|
68
|
+
pvid: generateUUID().slice(0, 8),
|
|
69
|
+
analyticsEventDelay: 0,
|
|
70
|
+
dmBilling: {
|
|
71
|
+
enabled: false,
|
|
72
|
+
vendors: [],
|
|
73
|
+
waitForAuction: true
|
|
74
|
+
}
|
|
72
75
|
}
|
|
73
|
-
}
|
|
76
|
+
}
|
|
77
|
+
resetRubiConf();
|
|
78
|
+
|
|
74
79
|
// we are saving these as global to this module so that if a pub accidentally overwrites the entire
|
|
75
80
|
// rubicon object, then we do not lose other data
|
|
76
81
|
config.getConfig('rubicon', config => {
|
|
@@ -418,7 +423,7 @@ function getBidPrice(bid) {
|
|
|
418
423
|
}
|
|
419
424
|
}
|
|
420
425
|
|
|
421
|
-
export function parseBidResponse(bid, previousBidResponse
|
|
426
|
+
export function parseBidResponse(bid, previousBidResponse) {
|
|
422
427
|
// The current bidResponse for this matching requestId/bidRequestId
|
|
423
428
|
let responsePrice = getBidPrice(bid)
|
|
424
429
|
// we need to compare it with the previous one (if there was one)
|
|
@@ -333,7 +333,7 @@ export const spec = {
|
|
|
333
333
|
}
|
|
334
334
|
});
|
|
335
335
|
|
|
336
|
-
if (
|
|
336
|
+
if (config.getConfig('rubicon.singleRequest') !== true) {
|
|
337
337
|
// bids are not grouped if single request mode is not enabled
|
|
338
338
|
requests = videoRequests.concat(bidRequests.filter(bidRequest => bidType(bidRequest) === 'banner').map(bidRequest => {
|
|
339
339
|
const bidParams = spec.createSlotParams(bidRequest, bidderRequest);
|
|
@@ -1279,8 +1279,7 @@ export function hasValidSupplyChainParams(schain) {
|
|
|
1279
1279
|
}
|
|
1280
1280
|
|
|
1281
1281
|
/**
|
|
1282
|
-
* Creates a URL key value param, encoding the
|
|
1283
|
-
* param unless the key is schain
|
|
1282
|
+
* Creates a URL key value param, encoding the param unless the key is schain
|
|
1284
1283
|
* @param {String} key
|
|
1285
1284
|
* @param {String} param
|
|
1286
1285
|
* @returns {String}
|
|
@@ -67,7 +67,7 @@ export const spec = {
|
|
|
67
67
|
validBidRequests = convertOrtbRequestToProprietaryNative(validBidRequests);
|
|
68
68
|
|
|
69
69
|
const pt = setOnAny(validBidRequests, 'params.pt') || setOnAny(validBidRequests, 'params.priceType') || 'net';
|
|
70
|
-
const tid =
|
|
70
|
+
const tid = bidderRequest.auctionId;
|
|
71
71
|
const cur = [config.getConfig('currency.adServerCurrency') || DEFAULT_CUR];
|
|
72
72
|
let url = bidderRequest.refererInfo.page;
|
|
73
73
|
|