prebid.js 7.26.0 → 7.28.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/workflows/issue_tracker.yml +1 -1
- 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/adgenerationBidAdapter.js +1 -1
- package/dist/adhashBidAdapter.js +1 -1
- package/dist/adkernelAdnAnalyticsAdapter.js +1 -1
- package/dist/adlooxAdServerVideo.js +1 -1
- package/dist/adlooxAnalyticsAdapter.js +1 -1
- package/dist/adlooxRtdProvider.js +1 -1
- package/dist/admaticBidAdapter.js +1 -1
- package/dist/admixerBidAdapter.js +1 -1
- package/dist/adomikAnalyticsAdapter.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/aidemBidAdapter.js +1 -0
- package/dist/ajaBidAdapter.js +1 -1
- package/dist/amxBidAdapter.js +1 -1
- package/dist/amxIdSystem.js +1 -1
- package/dist/analyticsAdapter.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/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/browsiRtdProvider.js +1 -1
- package/dist/bucksenseBidAdapter.js +1 -1
- package/dist/byDataAnalyticsAdapter.js +1 -1
- package/dist/carodaBidAdapter.js +1 -1
- package/dist/chtnwBidAdapter.js +1 -1
- package/dist/concertAnalyticsAdapter.js +1 -1
- package/dist/concertBidAdapter.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 -1
- package/dist/conversantBidAdapter.js +1 -1
- package/dist/craftBidAdapter.js +1 -1
- package/dist/criteoBidAdapter.js +1 -1
- package/dist/datablocksAnalyticsAdapter.js +1 -1
- package/dist/dependencies.json +6 -0
- package/dist/dfpAdServerVideo.js +1 -1
- package/dist/discoveryBidAdapter.js +1 -1
- package/dist/dspxBidAdapter.js +1 -1
- package/dist/eplanningAnalyticsAdapter.js +1 -1
- package/dist/eplanningBidAdapter.js +1 -1
- package/dist/finativeBidAdapter.js +1 -1
- package/dist/fintezaAnalyticsAdapter.js +1 -1
- package/dist/fluctBidAdapter.js +1 -1
- package/dist/ftrackIdSystem.js +1 -1
- package/dist/gdprEnforcement.js +1 -1
- package/dist/genericAnalyticsAdapter.js +1 -0
- package/dist/geoedgeRtdProvider.js +1 -1
- package/dist/glimpseBidAdapter.js +1 -1
- package/dist/glomexBidAdapter.js +1 -1
- package/dist/gmosspBidAdapter.js +1 -1
- package/dist/goldbachBidAdapter.js +1 -1
- package/dist/googleAnalyticsAdapter.js +1 -1
- package/dist/gravitoIdSystem.js +1 -1
- package/dist/gridBidAdapter.js +1 -1
- package/dist/gridNMBidAdapter.js +1 -1
- package/dist/growthCodeAnalyticsAdapter.js +1 -0
- package/dist/gumgumBidAdapter.js +1 -1
- package/dist/h12mediaBidAdapter.js +1 -1
- package/dist/hadronAnalyticsAdapter.js +1 -1
- package/dist/id5AnalyticsAdapter.js +1 -1
- package/dist/id5IdSystem.js +1 -1
- package/dist/impactifyBidAdapter.js +1 -1
- package/dist/improvedigitalBidAdapter.js +1 -1
- package/dist/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/jwplayerRtdProvider.js +1 -1
- package/dist/kargoAnalyticsAdapter.js +1 -1
- package/dist/kargoBidAdapter.js +1 -1
- package/dist/kinessoIdSystem.js +1 -1
- package/dist/konduitAnalyticsAdapter.js +1 -1
- package/dist/kueezBidAdapter.js +1 -1
- package/dist/kueezRtbBidAdapter.js +1 -1
- package/dist/lassoBidAdapter.js +1 -1
- package/dist/lifestreetBidAdapter.js +1 -1
- package/dist/limelightDigitalBidAdapter.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 -1
- package/dist/malltvAnalyticsAdapter.js +1 -1
- package/dist/marsmediaAnalyticsAdapter.js +1 -1
- package/dist/marsmediaBidAdapter.js +1 -1
- package/dist/mediafuseBidAdapter.js +1 -1
- package/dist/mediagoBidAdapter.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/nexx360BidAdapter.js +1 -1
- package/dist/not-for-prod/prebid.js +206 -202
- 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/pbsExtensions.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/pubCommonId.js +1 -1
- package/dist/pubProvidedIdSystem.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/rasBidAdapter.js +1 -1
- package/dist/readpeakBidAdapter.js +1 -1
- package/dist/realvuAnalyticsAdapter.js +1 -1
- package/dist/redtramBidAdapter.js +1 -0
- package/dist/relaidoBidAdapter.js +1 -1
- package/dist/relevantAnalyticsAdapter.js +1 -1
- package/dist/rhythmoneBidAdapter.js +1 -1
- package/dist/riseBidAdapter.js +1 -1
- package/dist/rivrAnalyticsAdapter.js +1 -1
- package/dist/roxotAnalyticsAdapter.js +1 -1
- package/dist/rtbhouseBidAdapter.js +1 -1
- package/dist/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 -1
- 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/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/yieldlabBidAdapter.js +1 -1
- package/dist/yieldliftBidAdapter.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/integrationExamples/gpt/growthcode.html +134 -0
- package/libraries/analyticsAdapter/AnalyticsAdapter.js +95 -102
- package/libraries/ortb2.5StrictTranslator/dsl.js +54 -0
- package/libraries/ortb2.5StrictTranslator/spec.js +81 -0
- package/libraries/ortb2.5StrictTranslator/translator.js +37 -0
- package/libraries/ortb2.5Translator/translator.js +82 -0
- package/modules/33acrossIdSystem.js +3 -0
- package/modules/adhashBidAdapter.js +115 -30
- package/modules/adhashBidAdapter.md +1 -3
- package/modules/admaticBidAdapter.js +10 -1
- package/modules/admixerBidAdapter.js +1 -1
- package/modules/aidemBidAdapter.js +492 -0
- package/modules/aidemBidAdapter.md +187 -0
- package/modules/browsiRtdProvider.js +6 -4
- package/modules/bucksenseBidAdapter.js +1 -1
- package/modules/criteoBidAdapter.js +3 -3
- package/modules/discoveryBidAdapter.js +3 -0
- package/modules/eplanningBidAdapter.js +2 -6
- package/modules/fluctBidAdapter.js +5 -0
- package/modules/gdprEnforcement.js +26 -24
- package/modules/genericAnalyticsAdapter.js +157 -0
- package/modules/geoedgeRtdProvider.js +22 -0
- package/modules/glomexBidAdapter.js +2 -0
- package/modules/gravitoIdSystem.js +3 -4
- package/modules/gridBidAdapter.js +1 -1
- package/modules/gridNMBidAdapter.js +1 -1
- package/modules/growthCodeAnalyticsAdapter.js +176 -0
- package/modules/growthCodeAnalyticsAdapter.md +41 -0
- package/modules/impactifyBidAdapter.js +19 -1
- package/modules/jwplayerRtdProvider.js +1 -2
- package/modules/kargoBidAdapter.js +1 -1
- package/modules/lassoBidAdapter.js +8 -4
- package/modules/limelightDigitalBidAdapter.js +1 -1
- package/modules/liveIntentIdSystem.js +1 -2
- package/modules/mediagoBidAdapter.js +2 -1
- package/modules/minutemediaBidAdapter.md +3 -3
- package/modules/nexx360BidAdapter.js +264 -138
- package/modules/openxBidAdapter.md +15 -14
- package/modules/pubCommonId.js +2 -1
- package/modules/pubProvidedIdSystem.js +2 -0
- package/modules/rasBidAdapter.js +8 -3
- package/modules/rasBidAdapter.md +16 -15
- package/modules/redtramBidAdapter.js +155 -0
- package/modules/redtramBidAdapter.md +33 -0
- package/modules/riseBidAdapter.js +15 -0
- package/modules/riseBidAdapter.md +3 -3
- package/modules/rtbhouseBidAdapter.js +90 -29
- package/modules/rubiconBidAdapter.js +2 -1
- package/modules/seedtagBidAdapter.js +67 -56
- package/modules/seedtagBidAdapter.md +60 -0
- package/modules/sharedIdSystem.js +3 -1
- package/modules/smartxBidAdapter.js +1 -1
- package/modules/smnBidAdapter.md +52 -0
- package/modules/taboolaBidAdapter.js +20 -7
- package/modules/tripleliftBidAdapter.js +1 -1
- package/modules/ttdBidAdapter.js +4 -0
- package/modules/vidazooBidAdapter.js +31 -8
- package/modules/yandexBidAdapter.js +85 -19
- package/modules/yandexBidAdapter.md +7 -7
- package/modules/yieldlabBidAdapter.js +10 -4
- package/modules/yieldliftBidAdapter.js +3 -3
- package/package.json +2 -2
- package/src/auction.js +30 -4
- package/src/consentHandler.js +8 -0
- package/src/constants.json +2 -1
- package/src/events.js +4 -0
- package/src/native.js +31 -20
- package/src/refererDetection.js +6 -1
- package/src/storageManager.js +6 -3
- package/test/helpers/analytics.js +34 -0
- package/test/helpers/refererDetectionHelper.js +88 -0
- package/test/mocks/analyticsStub.js +3 -1
- package/test/spec/AnalyticsAdapter_spec.js +119 -116
- package/test/spec/auctionmanager_spec.js +119 -1
- package/test/spec/modules/33acrossIdSystem_spec.js +4 -1
- package/test/spec/modules/adWMGAnalyticsAdapter_spec.js +10 -8
- package/test/spec/modules/adagioAnalyticsAdapter_spec.js +18 -25
- package/test/spec/modules/adhashBidAdapter_spec.js +65 -11
- package/test/spec/modules/aidemBidAdapter_spec.js +664 -0
- package/test/spec/modules/bidwatchAnalyticsAdapter_spec.js +0 -2
- package/test/spec/modules/browsiRtdProvider_spec.js +2 -1
- package/test/spec/modules/concertAnalyticsAdapter_spec.js +2 -4
- package/test/spec/modules/enrichmentFpdModule_spec.js +3 -2
- package/test/spec/modules/eplanningAnalyticsAdapter_spec.js +0 -3
- package/test/spec/modules/eplanningBidAdapter_spec.js +4 -4
- package/test/spec/modules/fluctBidAdapter_spec.js +37 -1
- package/test/spec/modules/fpdModule_spec.js +1 -1
- package/test/spec/modules/gdprEnforcement_spec.js +115 -68
- package/test/spec/modules/genericAnalyticsAdapter_spec.js +284 -0
- package/test/spec/modules/geoedgeRtdProvider_spec.js +15 -0
- package/test/spec/modules/glomexBidAdapter_spec.js +4 -0
- package/test/spec/modules/gravitoIdSystem_spec.js +1 -1
- package/test/spec/modules/growthCodeAnalyticsAdapter_spec.js +70 -0
- package/test/spec/modules/impactifyBidAdapter_spec.js +13 -0
- package/test/spec/modules/invisiblyAnalyticsAdapter_spec.js +17 -27
- package/test/spec/modules/jwplayerRtdProvider_spec.js +3 -3
- package/test/spec/modules/konduitAnalyticsAdapter_spec.js +0 -2
- package/test/spec/modules/liveIntentAnalyticsAdapter_spec.js +3 -6
- package/test/spec/modules/medianetAnalyticsAdapter_spec.js +7 -1
- package/test/spec/modules/nexx360BidAdapter_spec.js +441 -221
- package/test/spec/modules/optimonAnalyticsAdapter_spec.js +3 -11
- package/test/spec/modules/pianoDmpAnalyticsAdapter_spec.js +4 -11
- package/test/spec/modules/prebidmanagerAnalyticsAdapter_spec.js +3 -12
- package/test/spec/modules/pubperfAnalyticsAdapter_spec.js +6 -19
- package/test/spec/modules/pubstackAnalyticsAdapter_spec.js +3 -17
- package/test/spec/modules/pubwiseAnalyticsAdapter_spec.js +13 -19
- package/test/spec/modules/rasBidAdapter_spec.js +5 -1
- package/test/spec/modules/redtramBidAdapter_spec.js +256 -0
- package/test/spec/modules/riseBidAdapter_spec.js +24 -0
- package/test/spec/modules/rtbhouseBidAdapter_spec.js +79 -0
- package/test/spec/modules/seedtagBidAdapter_spec.js +65 -92
- package/test/spec/modules/sigmoidAnalyticsAdapter_spec.js +4 -8
- package/test/spec/modules/sovrnAnalyticsAdapter_spec.js +6 -18
- package/test/spec/modules/taboolaBidAdapter_spec.js +39 -0
- package/test/spec/modules/tripleliftBidAdapter_spec.js +3 -10
- package/test/spec/modules/ttdBidAdapter_spec.js +50 -9
- package/test/spec/modules/vidazooBidAdapter_spec.js +173 -27
- package/test/spec/modules/yandexBidAdapter_spec.js +22 -13
- package/test/spec/modules/yieldlabBidAdapter_spec.js +49 -20
- package/test/spec/modules/yieldliftBidAdapter_spec.js +1 -1
- package/test/spec/modules/yieldoneAnalyticsAdapter_spec.js +5 -2
- package/test/spec/native_spec.js +68 -56
- package/test/spec/ortb2.5StrictTranslator/dsl_spec.js +137 -0
- package/test/spec/ortb2.5StrictTranslator/spec_spec.js +358 -0
- package/test/spec/ortb2.5StrictTranslator/translator_spec.js +16 -0
- package/test/spec/ortb2.5Translator/translator_spec.js +64 -0
- package/test/spec/refererDetection_spec.js +46 -95
- package/test/spec/unit/core/storageManager_spec.js +2 -1
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
## GrowthCode Analytics Adapter
|
|
2
|
+
|
|
3
|
+
[GrowthCode](https://growthcode.io) offers scaled infrastructure-as-a-service to
|
|
4
|
+
empower independent publishers to harness data and take control of identity and
|
|
5
|
+
audience while rapidly aligning to industry changes and margin pressure.
|
|
6
|
+
|
|
7
|
+
## Building Prebid with GrowthCode Support
|
|
8
|
+
|
|
9
|
+
First, make sure to add the GrowthCode submodule to your Prebid.js package with:
|
|
10
|
+
|
|
11
|
+
```
|
|
12
|
+
gulp build --modules=growthCodeIdSystem,growthCodeAnalyticsAdapter,userId
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
The following configuration parameters are available:
|
|
16
|
+
|
|
17
|
+
```javascript
|
|
18
|
+
pbjs.enableAnalytics({
|
|
19
|
+
provider: 'growthCodeAnalytics',
|
|
20
|
+
options: {
|
|
21
|
+
pid: '<Contact GrowthCode>',
|
|
22
|
+
trackEvents: [
|
|
23
|
+
'auctionEnd',
|
|
24
|
+
'bidAdjustment',
|
|
25
|
+
'bidTimeout',
|
|
26
|
+
'bidRequested',
|
|
27
|
+
'bidResponse',
|
|
28
|
+
'noBid',
|
|
29
|
+
'bidWon',
|
|
30
|
+
'bidderDone']
|
|
31
|
+
}
|
|
32
|
+
});
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
| Param enableAnalytics | Scope | Type | Description | Example |
|
|
36
|
+
|-----------------------|----------|--------|-------------------------------------------------------------|--------------------------|
|
|
37
|
+
| provider | Required | String | The name of this Adapter. | `"growthCodeAnalytics"` |
|
|
38
|
+
| params | Required | Object | Details of module params. | |
|
|
39
|
+
| params.pid | Required | String | This is the Customer ID value obtained via Intimate Merger. | `"<Contact GrowthCode>"` |
|
|
40
|
+
| params.url | Optional | String | Custom URL for server | |
|
|
41
|
+
| params.trackEvents | Required | String | Name if the variable that holds your publisher ID | |
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { deepAccess, deepSetValue, generateUUID } from '../src/utils.js';
|
|
2
2
|
import { registerBidder } from '../src/adapters/bidderFactory.js';
|
|
3
3
|
import { config } from '../src/config.js';
|
|
4
|
-
import {ajax} from '../src/ajax.js';
|
|
4
|
+
import { ajax } from '../src/ajax.js';
|
|
5
5
|
import { createEidsArray } from './userId/eids.js';
|
|
6
6
|
|
|
7
7
|
const BIDDER_CODE = 'impactify';
|
|
@@ -27,6 +27,18 @@ const getDeviceType = () => {
|
|
|
27
27
|
return 2;
|
|
28
28
|
};
|
|
29
29
|
|
|
30
|
+
const getFloor = (bid) => {
|
|
31
|
+
const floorInfo = bid.getFloor({
|
|
32
|
+
currency: DEFAULT_CURRENCY,
|
|
33
|
+
mediaType: '*',
|
|
34
|
+
size: '*'
|
|
35
|
+
});
|
|
36
|
+
if (typeof floorInfo === 'object' && floorInfo.currency === DEFAULT_CURRENCY && !isNaN(parseFloat(floorInfo.floor))) {
|
|
37
|
+
return parseFloat(floorInfo.floor);
|
|
38
|
+
}
|
|
39
|
+
return null;
|
|
40
|
+
}
|
|
41
|
+
|
|
30
42
|
const createOpenRtbRequest = (validBidRequests, bidderRequest) => {
|
|
31
43
|
// Create request and set imp bids inside
|
|
32
44
|
let request = {
|
|
@@ -114,6 +126,12 @@ const createOpenRtbRequest = (validBidRequests, bidderRequest) => {
|
|
|
114
126
|
if (bid.params.container) {
|
|
115
127
|
imp.ext.impactify.container = bid.params.container;
|
|
116
128
|
}
|
|
129
|
+
if (typeof bid.getFloor === 'function') {
|
|
130
|
+
const floor = getFloor(bid);
|
|
131
|
+
if (floor) {
|
|
132
|
+
imp.bidfloor = floor;
|
|
133
|
+
}
|
|
134
|
+
}
|
|
117
135
|
request.imp.push(imp);
|
|
118
136
|
});
|
|
119
137
|
|
|
@@ -274,8 +274,7 @@ export function getContentSegments(segments) {
|
|
|
274
274
|
|
|
275
275
|
const formattedSegments = segments.reduce((convertedSegments, rawSegment) => {
|
|
276
276
|
convertedSegments.push({
|
|
277
|
-
id: rawSegment
|
|
278
|
-
value: rawSegment
|
|
277
|
+
id: rawSegment
|
|
279
278
|
});
|
|
280
279
|
return convertedSegments;
|
|
281
280
|
}, []);
|
|
@@ -231,7 +231,7 @@ export const spec = {
|
|
|
231
231
|
_getAllMetadata(bidderRequest, tdid) {
|
|
232
232
|
return {
|
|
233
233
|
userIDs: spec._getUserIds(tdid, bidderRequest.uspConsent, bidderRequest.gdprConsent),
|
|
234
|
-
pageURL: bidderRequest?.refererInfo?.
|
|
234
|
+
pageURL: bidderRequest?.refererInfo?.page,
|
|
235
235
|
rawCRB: storage.getCookie('krg_crb'),
|
|
236
236
|
rawCRBLocalStorage: spec._getLocalStorageSafely('krg_crb')
|
|
237
237
|
};
|
|
@@ -54,7 +54,7 @@ export const spec = {
|
|
|
54
54
|
|
|
55
55
|
return {
|
|
56
56
|
method: 'GET',
|
|
57
|
-
url: getBidRequestUrl(aimXR),
|
|
57
|
+
url: getBidRequestUrl(aimXR, bidRequest.params),
|
|
58
58
|
data: payload,
|
|
59
59
|
options: {
|
|
60
60
|
withCredentials: true
|
|
@@ -113,11 +113,15 @@ export const spec = {
|
|
|
113
113
|
supportedMediaTypes: [BANNER]
|
|
114
114
|
}
|
|
115
115
|
|
|
116
|
-
function getBidRequestUrl(aimXR) {
|
|
116
|
+
function getBidRequestUrl(aimXR, params) {
|
|
117
|
+
let path = '/request';
|
|
118
|
+
if (params && params.dtc) {
|
|
119
|
+
path = '/dtc-request';
|
|
120
|
+
}
|
|
117
121
|
if (!aimXR) {
|
|
118
|
-
return GET_IUD_URL + ENDPOINT_URL +
|
|
122
|
+
return GET_IUD_URL + ENDPOINT_URL + path;
|
|
119
123
|
}
|
|
120
|
-
return ENDPOINT_URL +
|
|
124
|
+
return ENDPOINT_URL + path;
|
|
121
125
|
}
|
|
122
126
|
|
|
123
127
|
function getDeviceData() {
|
|
@@ -10,7 +10,6 @@ import { submodule } from '../src/hook.js';
|
|
|
10
10
|
import { LiveConnect } from 'live-connect-js/esm/initializer.js';
|
|
11
11
|
import { gdprDataHandler, uspDataHandler } from '../src/adapterManager.js';
|
|
12
12
|
import { getStorageManager } from '../src/storageManager.js';
|
|
13
|
-
import { MinimalLiveConnect } from 'live-connect-js/esm/minimal-live-connect.js';
|
|
14
13
|
|
|
15
14
|
const MODULE_NAME = 'liveIntentId';
|
|
16
15
|
export const storage = getStorageManager({gvlid: null, moduleName: MODULE_NAME});
|
|
@@ -140,7 +139,7 @@ export const liveIntentIdSubmodule = {
|
|
|
140
139
|
this.moduleMode = mode
|
|
141
140
|
},
|
|
142
141
|
getInitializer() {
|
|
143
|
-
return
|
|
142
|
+
return (liveConnectConfig, storage, calls) => LiveConnect(liveConnectConfig, storage, calls, this.moduleMode)
|
|
144
143
|
},
|
|
145
144
|
|
|
146
145
|
/**
|
|
@@ -297,7 +297,8 @@ function getParam(validBidRequests, bidderRequest) {
|
|
|
297
297
|
utils.deepAccess(validBidRequests[0], 'userId.sharedid.id') ||
|
|
298
298
|
utils.deepAccess(validBidRequests[0], 'userId.pubcid');
|
|
299
299
|
let isMobile = isMobileAndTablet() ? 1 : 0;
|
|
300
|
-
|
|
300
|
+
// input test status by Publisher. more frequently for test true req
|
|
301
|
+
let isTest = validBidRequests[0].params.test || 0;
|
|
301
302
|
let auctionId = getProperty(bidderRequest, 'auctionId');
|
|
302
303
|
let items = getItems(validBidRequests, bidderRequest);
|
|
303
304
|
|
|
@@ -20,7 +20,7 @@ The adapter supports Video(instream) & Banner.
|
|
|
20
20
|
|
|
21
21
|
| Name | Scope | Type | Description | Example
|
|
22
22
|
| ---- | ----- | ---- | ----------- | -------
|
|
23
|
-
| `org` | required | String | MinuteMedia publisher Id provided by your MinuteMedia representative | "
|
|
23
|
+
| `org` | required | String | MinuteMedia publisher Id provided by your MinuteMedia representative | "1234567890abcdef12345678"
|
|
24
24
|
| `floorPrice` | optional | Number | Minimum price in USD. Misuse of this parameter can impact revenue | 2.00
|
|
25
25
|
| `placementId` | optional | String | A unique placement identifier | "12345678"
|
|
26
26
|
| `testMode` | optional | Boolean | This activates the test mode | false
|
|
@@ -43,7 +43,7 @@ var adUnits = [{
|
|
|
43
43
|
bids: [{
|
|
44
44
|
bidder: 'minutemedia',
|
|
45
45
|
params: {
|
|
46
|
-
org: '
|
|
46
|
+
org: '1234567890abcdef12345678', // Required
|
|
47
47
|
floorPrice: 2.00, // Optional
|
|
48
48
|
placementId: 'video-test', // Optional
|
|
49
49
|
testMode: false // Optional
|
|
@@ -65,7 +65,7 @@ var adUnits = [{
|
|
|
65
65
|
bids: [{
|
|
66
66
|
bidder: 'minutemedia',
|
|
67
67
|
params: {
|
|
68
|
-
org: '
|
|
68
|
+
org: '1234567890abcdef12345678', // Required
|
|
69
69
|
floorPrice: 2.00, // Optional
|
|
70
70
|
placementId: 'banner-test', // Optional
|
|
71
71
|
testMode: false // Optional
|
|
@@ -1,176 +1,302 @@
|
|
|
1
|
-
import {ajax} from '../src/ajax.js';
|
|
2
1
|
import {config} from '../src/config.js';
|
|
3
|
-
import
|
|
2
|
+
import * as utils from '../src/utils.js';
|
|
4
3
|
import {registerBidder} from '../src/adapters/bidderFactory.js';
|
|
5
4
|
import {BANNER, VIDEO} from '../src/mediaTypes.js';
|
|
5
|
+
import {getGlobal} from '../src/prebidGlobal.js';
|
|
6
6
|
|
|
7
|
+
const VIDEO_TARGETING = ['startdelay', 'mimes', 'minduration', 'maxduration', 'delivery',
|
|
8
|
+
'startdelay', 'skip', 'playbackmethod', 'api', 'protocol', 'boxingallowed', 'maxextended',
|
|
9
|
+
'linearity', 'delivery', 'protocols', 'placement', 'minbitrate', 'maxbitrate', 'battr', 'ext'];
|
|
7
10
|
const BIDDER_CODE = 'nexx360';
|
|
8
|
-
const
|
|
9
|
-
|
|
10
|
-
const
|
|
11
|
+
const REQUEST_URL = 'https://fast.nexx360.io/booster';
|
|
12
|
+
|
|
13
|
+
const PAGE_VIEW_ID = utils.generateUUID();
|
|
14
|
+
|
|
15
|
+
const BIDDER_VERSION = '1.0';
|
|
11
16
|
|
|
12
17
|
const GVLID = 965;
|
|
13
18
|
|
|
14
19
|
export const spec = {
|
|
15
20
|
code: BIDDER_CODE,
|
|
16
21
|
gvlid: GVLID,
|
|
17
|
-
aliases: [
|
|
22
|
+
aliases: [
|
|
23
|
+
{ code: 'revenuemaker' },
|
|
24
|
+
{ code: 'firstid-ssp' },
|
|
25
|
+
],
|
|
18
26
|
supportedMediaTypes: [BANNER, VIDEO],
|
|
19
|
-
|
|
27
|
+
isBidRequestValid,
|
|
28
|
+
buildRequests,
|
|
29
|
+
interpretResponse,
|
|
30
|
+
getUserSyncs,
|
|
31
|
+
// onBidWon,
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
registerBidder(spec);
|
|
35
|
+
|
|
36
|
+
/**
|
|
20
37
|
* Determines whether or not the given bid request is valid.
|
|
21
38
|
*
|
|
22
39
|
* @param {BidRequest} bid The bid params to validate.
|
|
23
40
|
* @return boolean True if this is a valid bid, and false otherwise.
|
|
24
41
|
*/
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
},
|
|
31
|
-
/**
|
|
42
|
+
function isBidRequestValid(bid) {
|
|
43
|
+
return !!bid.params.tagId || !!bid.params.videoTagId;
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
/**
|
|
32
47
|
* Make a server request from the list of BidRequests.
|
|
33
48
|
*
|
|
34
49
|
* @param {validBidRequests[]} - an array of bids
|
|
35
50
|
* @return ServerRequest Info describing the request to the server.
|
|
36
51
|
*/
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
52
|
+
|
|
53
|
+
function buildRequests(bids, bidderRequest) {
|
|
54
|
+
const data = getBaseRequest(bids[0], bidderRequest);
|
|
55
|
+
bids.forEach((bid) => {
|
|
56
|
+
const impObject = createImpObject(bid);
|
|
57
|
+
if (isBannerBid(bid)) impObject.banner = getBannerObject(bid);
|
|
58
|
+
if (isVideoBid(bid)) impObject.video = getVideoObject(bid);
|
|
59
|
+
data.imp.push(impObject);
|
|
60
|
+
});
|
|
61
|
+
return {
|
|
62
|
+
method: 'POST',
|
|
63
|
+
url: REQUEST_URL,
|
|
64
|
+
data,
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
function createImpObject(bid) {
|
|
69
|
+
const floor = getFloor(bid, BANNER);
|
|
70
|
+
const imp = {
|
|
71
|
+
id: bid.bidId,
|
|
72
|
+
tagid: bid.adUnitCode,
|
|
73
|
+
ext: {
|
|
74
|
+
divId: bid.adUnitCode,
|
|
75
|
+
nexx360: {
|
|
76
|
+
videoTagId: bid.params.videoTagId,
|
|
77
|
+
tagId: bid.params.tagId,
|
|
78
|
+
allBids: bid.params.allBids === true,
|
|
56
79
|
}
|
|
57
|
-
|
|
58
|
-
|
|
80
|
+
}
|
|
81
|
+
};
|
|
82
|
+
if (bid.params.customParams) {
|
|
83
|
+
utils.deepSetValue(imp, 'ext.customParams', bid.params.customParams);
|
|
84
|
+
}
|
|
85
|
+
enrichImp(imp, bid, floor);
|
|
86
|
+
return imp;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
function getBannerObject(bid) {
|
|
90
|
+
return {
|
|
91
|
+
format: toFormat(bid.mediaTypes.banner.sizes),
|
|
92
|
+
topframe: utils.inIframe() ? 0 : 1
|
|
93
|
+
};
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
function getVideoObject(bid) {
|
|
97
|
+
let width, height;
|
|
98
|
+
const videoParams = utils.deepAccess(bid, `mediaTypes.video`);
|
|
99
|
+
const playerSize = utils.deepAccess(bid, 'mediaTypes.video.playerSize');
|
|
100
|
+
const context = utils.deepAccess(bid, 'mediaTypes.video.context');
|
|
101
|
+
// normalize config for video size
|
|
102
|
+
if (utils.isArray(bid.sizes) && bid.sizes.length === 2 && !utils.isArray(bid.sizes[0])) {
|
|
103
|
+
width = parseInt(bid.sizes[0], 10);
|
|
104
|
+
height = parseInt(bid.sizes[1], 10);
|
|
105
|
+
} else if (utils.isArray(bid.sizes) && utils.isArray(bid.sizes[0]) && bid.sizes[0].length === 2) {
|
|
106
|
+
width = parseInt(bid.sizes[0][0], 10);
|
|
107
|
+
height = parseInt(bid.sizes[0][1], 10);
|
|
108
|
+
} else if (utils.isArray(playerSize) && playerSize.length === 2) {
|
|
109
|
+
width = parseInt(playerSize[0], 10);
|
|
110
|
+
height = parseInt(playerSize[1], 10);
|
|
111
|
+
}
|
|
112
|
+
const video = {
|
|
113
|
+
playerSize: [height, width],
|
|
114
|
+
context,
|
|
115
|
+
};
|
|
116
|
+
|
|
117
|
+
Object.keys(videoParams)
|
|
118
|
+
.filter(param => VIDEO_TARGETING.includes(param))
|
|
119
|
+
.forEach(param => video[param] = videoParams[param]);
|
|
120
|
+
return video;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
function isVideoBid(bid) {
|
|
124
|
+
return utils.deepAccess(bid, 'mediaTypes.video');
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
function isBannerBid(bid) {
|
|
128
|
+
return utils.deepAccess(bid, 'mediaTypes.banner') || !isVideoBid(bid);
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
function toFormat(sizes) {
|
|
132
|
+
return sizes.map((s) => {
|
|
133
|
+
return { w: s[0], h: s[1] };
|
|
134
|
+
});
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
function getFloor(bid, mediaType) {
|
|
138
|
+
let floor = 0;
|
|
139
|
+
if (typeof bid.getFloor === 'function') {
|
|
140
|
+
const floorInfo = bid.getFloor({
|
|
141
|
+
currency: 'USD',
|
|
142
|
+
mediaType: mediaType,
|
|
143
|
+
size: '*'
|
|
59
144
|
});
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
145
|
+
|
|
146
|
+
if (typeof floorInfo === 'object' &&
|
|
147
|
+
floorInfo.currency === 'USD' &&
|
|
148
|
+
!isNaN(parseFloat(floorInfo.floor))) {
|
|
149
|
+
floor = Math.max(floor, parseFloat(floorInfo.floor));
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
return floor;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
function enrichImp(imp, bid, floor) {
|
|
157
|
+
if (bid.params.customParams) {
|
|
158
|
+
utils.deepSetValue(imp, 'ext.customParams', bid.params.customParams);
|
|
159
|
+
}
|
|
160
|
+
if (floor > 0) {
|
|
161
|
+
imp.bidfloor = floor;
|
|
162
|
+
imp.bidfloorcur = 'USD';
|
|
163
|
+
} else if (bid.params.customFloor) {
|
|
164
|
+
imp.bidfloor = bid.params.customFloor;
|
|
165
|
+
}
|
|
166
|
+
if (bid.ortb2Imp && bid.ortb2Imp.ext && bid.ortb2Imp.ext.data) {
|
|
167
|
+
imp.ext.data = bid.ortb2Imp.ext.data;
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
function getBaseRequest(bid, bidderRequest) {
|
|
172
|
+
let req = {
|
|
173
|
+
id: bidderRequest.auctionId,
|
|
174
|
+
imp: [],
|
|
175
|
+
cur: [config.getConfig('currency.adServerCurrency') || 'USD'],
|
|
176
|
+
at: 1,
|
|
177
|
+
tmax: config.getConfig('bidderTimeout'),
|
|
178
|
+
site: {
|
|
179
|
+
page: bidderRequest.refererInfo.topmostLocation || bidderRequest.refererInfo.page,
|
|
180
|
+
domain: bidderRequest.refererInfo.domain,
|
|
181
|
+
},
|
|
182
|
+
regs: {
|
|
183
|
+
coppa: (config.getConfig('coppa') === true || bid.params.coppa) ? 1 : 0,
|
|
184
|
+
},
|
|
185
|
+
device: {
|
|
186
|
+
dnt: (utils.getDNT() || bid.params.doNotTrack) ? 1 : 0,
|
|
187
|
+
h: screen.height,
|
|
188
|
+
w: screen.width,
|
|
189
|
+
ua: window.navigator.userAgent,
|
|
190
|
+
language: window.navigator.language.split('-').shift()
|
|
191
|
+
},
|
|
192
|
+
user: {},
|
|
193
|
+
ext: {
|
|
194
|
+
source: 'prebid.js',
|
|
195
|
+
version: '$prebid.version$',
|
|
196
|
+
pageViewId: PAGE_VIEW_ID,
|
|
197
|
+
bidderVersion: BIDDER_VERSION,
|
|
198
|
+
}
|
|
199
|
+
};
|
|
200
|
+
|
|
201
|
+
if (bid.params.platform) {
|
|
202
|
+
utils.deepSetValue(req, 'ext.platform', bid.params.platform);
|
|
203
|
+
}
|
|
204
|
+
if (bid.params.response_template_name) {
|
|
205
|
+
utils.deepSetValue(req, 'ext.response_template_name', bid.params.response_template_name);
|
|
206
|
+
}
|
|
207
|
+
req.test = config.getConfig('debug') ? 1 : 0;
|
|
208
|
+
if (bidderRequest.gdprConsent) {
|
|
209
|
+
if (bidderRequest.gdprConsent.gdprApplies !== undefined) {
|
|
210
|
+
utils.deepSetValue(req, 'regs.ext.gdpr', bidderRequest.gdprConsent.gdprApplies === true ? 1 : 0);
|
|
211
|
+
}
|
|
212
|
+
if (bidderRequest.gdprConsent.consentString !== undefined) {
|
|
213
|
+
utils.deepSetValue(req, 'user.ext.consent', bidderRequest.gdprConsent.consentString);
|
|
214
|
+
}
|
|
215
|
+
if (bidderRequest.gdprConsent.addtlConsent !== undefined) {
|
|
216
|
+
utils.deepSetValue(req, 'user.ext.ConsentedProvidersSettings.consented_providers', bidderRequest.gdprConsent.addtlConsent);
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
if (bidderRequest.uspConsent) {
|
|
220
|
+
utils.deepSetValue(req, 'regs.ext.us_privacy', bidderRequest.uspConsent);
|
|
221
|
+
}
|
|
222
|
+
if (bid.schain) {
|
|
223
|
+
utils.deepSetValue(req, 'source.ext.schain', bid.schain);
|
|
224
|
+
}
|
|
225
|
+
if (bid.userIdAsEids) {
|
|
226
|
+
utils.deepSetValue(req, 'user.ext.eids', bid.userIdAsEids);
|
|
227
|
+
}
|
|
228
|
+
const commonFpd = bidderRequest.ortb2 || {};
|
|
229
|
+
if (commonFpd.site) {
|
|
230
|
+
utils.mergeDeep(req, {site: commonFpd.site});
|
|
231
|
+
}
|
|
232
|
+
if (commonFpd.user) {
|
|
233
|
+
utils.mergeDeep(req, {user: commonFpd.user});
|
|
234
|
+
}
|
|
235
|
+
return req;
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
/**
|
|
86
239
|
* Unpack the response from the server into a list of bids.
|
|
87
240
|
*
|
|
88
241
|
* @param {ServerResponse} serverResponse A successful response from the server.
|
|
89
242
|
* @return {Bid[]} An array of bids which were nested inside the server.
|
|
90
243
|
*/
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
}
|
|
118
|
-
*/
|
|
119
|
-
};
|
|
120
|
-
if (value.type === 'banner') bidResponse.adUrl = url;
|
|
121
|
-
if (value.type === 'video') {
|
|
122
|
-
const params = {
|
|
123
|
-
type: 'prebid',
|
|
124
|
-
mediatype: 'video',
|
|
125
|
-
ssp: value.bidder,
|
|
126
|
-
tag_id: value.tagId,
|
|
127
|
-
consent: value.consent,
|
|
128
|
-
price: value.cpm,
|
|
129
|
-
};
|
|
130
|
-
bidResponse.cpm = value.cpm;
|
|
131
|
-
bidResponse.mediaType = 'video';
|
|
132
|
-
bidResponse.vastUrl = url;
|
|
133
|
-
bidResponse.vastImpUrl = `${METRICS_TRACKER_URL}?${new URLSearchParams(params).toString()}`;
|
|
134
|
-
}
|
|
135
|
-
bidResponses.push(bidResponse);
|
|
136
|
-
});
|
|
137
|
-
}
|
|
138
|
-
return bidResponses;
|
|
139
|
-
},
|
|
244
|
+
function interpretResponse(response, req) {
|
|
245
|
+
const { bidderSettings } = getGlobal();
|
|
246
|
+
const allowAlternateBidderCodes = bidderSettings && bidderSettings.standard ? bidderSettings.standard.allowAlternateBidderCodes : false;
|
|
247
|
+
const respBody = response.body;
|
|
248
|
+
if (!respBody || !Array.isArray(respBody.seatbid)) {
|
|
249
|
+
return [];
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
let bids = [];
|
|
253
|
+
respBody.seatbid.forEach(seatbid => {
|
|
254
|
+
bids = [...bids, ...seatbid.bid.map(bid => {
|
|
255
|
+
const response = {
|
|
256
|
+
requestId: bid.impid,
|
|
257
|
+
cpm: bid.price,
|
|
258
|
+
width: bid.w,
|
|
259
|
+
height: bid.h,
|
|
260
|
+
creativeId: bid.crid,
|
|
261
|
+
dealId: bid.dealid,
|
|
262
|
+
currency: respBody.cur || 'USD',
|
|
263
|
+
netRevenue: true,
|
|
264
|
+
ttl: 120,
|
|
265
|
+
bidderCode: allowAlternateBidderCodes ? `n360-${bid.ssp}` : 'nexx360',
|
|
266
|
+
mediaType: bid.type === 'banner' ? 'banner' : 'video',
|
|
267
|
+
meta: { advertiserDomains: bid.adomain },
|
|
268
|
+
};
|
|
269
|
+
// if (bid.dealid) response.dealid = bid.dealid;
|
|
140
270
|
|
|
141
|
-
|
|
271
|
+
if (response.mediaType === 'banner') {
|
|
272
|
+
response.adUrl = bid.adUrl;
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
if (['instream', 'outstream'].includes(bid.type)) response.vastXml = bid.vastXml;
|
|
276
|
+
|
|
277
|
+
if (bid.ext) {
|
|
278
|
+
response.meta.networkId = bid.ext.dsp_id;
|
|
279
|
+
response.meta.advertiserId = bid.ext.buyer_id;
|
|
280
|
+
response.meta.brandId = bid.ext.brand_id;
|
|
281
|
+
}
|
|
282
|
+
return response;
|
|
283
|
+
})];
|
|
284
|
+
});
|
|
285
|
+
return bids;
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
/**
|
|
142
289
|
* Register the user sync pixels which should be dropped after the auction.
|
|
143
290
|
*
|
|
144
291
|
* @param {SyncOptions} syncOptions Which user syncs are allowed?
|
|
145
292
|
* @param {ServerResponse[]} serverResponses List of server's responses.
|
|
146
293
|
* @return {UserSync[]} The user syncs which should be dropped.
|
|
147
294
|
*/
|
|
148
|
-
|
|
149
|
-
|
|
295
|
+
function getUserSyncs(syncOptions, serverResponses, gdprConsent, uspConsent) {
|
|
296
|
+
if (typeof serverResponses === 'object' && serverResponses != null && serverResponses.length > 0 && serverResponses[0].hasOwnProperty('body') &&
|
|
150
297
|
serverResponses[0].body.hasOwnProperty('cookies') && typeof serverResponses[0].body.cookies === 'object') {
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
}
|
|
155
|
-
},
|
|
156
|
-
|
|
157
|
-
/**
|
|
158
|
-
* Register bidder specific code, which will execute if a bid from this bidder won the auction
|
|
159
|
-
* @param {Bid} The bid that won the auction
|
|
160
|
-
*/
|
|
161
|
-
onBidWon: function(bid) {
|
|
162
|
-
// fires a pixel to confirm a winning bid
|
|
163
|
-
const params = { type: 'prebid', mediatype: 'banner' };
|
|
164
|
-
if (bid.hasOwnProperty('nexx360')) {
|
|
165
|
-
if (bid.nexx360.hasOwnProperty('ssp')) params.ssp = bid.nexx360.ssp;
|
|
166
|
-
if (bid.nexx360.hasOwnProperty('tagId')) params.tag_id = bid.nexx360.tagId;
|
|
167
|
-
if (bid.nexx360.hasOwnProperty('consent')) params.consent = bid.nexx360.consent;
|
|
168
|
-
};
|
|
169
|
-
params.price = bid.cpm;
|
|
170
|
-
const url = `${METRICS_TRACKER_URL}?${new URLSearchParams(params).toString()}`;
|
|
171
|
-
ajax(url, null, undefined, {method: 'GET', withCredentials: true});
|
|
172
|
-
return true;
|
|
298
|
+
return serverResponses[0].body.cookies.slice(0, 5);
|
|
299
|
+
} else {
|
|
300
|
+
return [];
|
|
173
301
|
}
|
|
174
|
-
|
|
175
|
-
}
|
|
176
|
-
registerBidder(spec);
|
|
302
|
+
};
|