prebid.js 6.7.0 → 6.11.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/.eslintrc.js +8 -1
- package/integrationExamples/gpt/{haloRtdProvider_example.html → hadronRtdProvider_example.html} +9 -9
- package/integrationExamples/gpt/idImportLibrary_example.html +2 -2
- package/integrationExamples/gpt/userId_example.html +2 -2
- package/integrationExamples/gpt/weboramaRtdProvider_example.html +154 -115
- package/integrationExamples/gpt/x-domain/creative.html +63 -29
- package/modules/.submodules.json +3 -0
- package/modules/adagioBidAdapter.js +0 -8
- package/modules/adagioBidAdapter.md +1 -1
- package/modules/adkernelBidAdapter.js +2 -1
- package/modules/adnuntiusRtdProvider.js +96 -0
- package/modules/adnuntiusRtdProvider.md +41 -0
- package/modules/adotBidAdapter.js +516 -567
- package/modules/adotBidAdapter.md +6 -44
- package/modules/adpod.js +12 -14
- package/modules/adyoulikeBidAdapter.js +2 -0
- package/modules/appnexusBidAdapter.js +14 -2
- package/modules/asealBidAdapter.js +58 -0
- package/modules/asealBidAdapter.md +52 -0
- package/modules/brandmetricsRtdProvider.js +168 -0
- package/modules/brandmetricsRtdProvider.md +40 -0
- package/modules/conversantBidAdapter.js +7 -0
- package/modules/criteoBidAdapter.js +9 -0
- package/modules/currency.js +27 -5
- package/modules/displayioBidAdapter.js +157 -0
- package/modules/displayioBidAdapter.md +148 -0
- package/modules/dspxBidAdapter.js +69 -29
- package/modules/dspxBidAdapter.md +2 -1
- package/modules/e_volutionBidAdapter.js +158 -0
- package/modules/gridBidAdapter.js +15 -1
- package/modules/gumgumBidAdapter.js +52 -38
- package/modules/hadronIdSystem.js +96 -0
- package/modules/hadronIdSystem.md +35 -0
- package/modules/hadronRtdProvider.js +254 -0
- package/modules/hadronRtdProvider.md +126 -0
- package/modules/haloIdSystem.md +4 -35
- package/modules/haloRtdProvider.md +3 -126
- package/modules/imRtdProvider.js +10 -0
- package/modules/improvedigitalBidAdapter.js +5 -0
- package/modules/interactiveOffersBidAdapter.js +9 -6
- package/modules/iqzoneBidAdapter.js +10 -3
- package/modules/iqzoneBidAdapter.md +16 -0
- package/modules/ixBidAdapter.js +2 -6
- package/modules/kubientBidAdapter.js +50 -19
- package/modules/lunamediahbBidAdapter.js +32 -4
- package/modules/malltvBidAdapter.js +7 -3
- package/modules/malltvBidAdapter.md +64 -51
- package/modules/mass.js +3 -5
- package/modules/mediakeysBidAdapter.js +0 -5
- package/modules/medianetAnalyticsAdapter.js +1 -1
- package/modules/mediasquareBidAdapter.js +9 -1
- package/modules/nextMillenniumBidAdapter.js +1 -0
- package/modules/oguryBidAdapter.js +7 -14
- package/modules/prebidServerBidAdapter/index.js +61 -39
- package/modules/priceFloors.js +20 -12
- package/modules/pubmaticBidAdapter.js +1 -1
- package/modules/richaudienceBidAdapter.js +8 -3
- package/modules/riseBidAdapter.js +17 -6
- package/modules/rtbhouseBidAdapter.js +2 -0
- package/modules/rubiconAnalyticsAdapter.js +5 -0
- package/modules/rubiconBidAdapter.js +2 -2
- package/modules/sizeMappingV2.js +1 -8
- package/modules/sortableAnalyticsAdapter.js +5 -4
- package/modules/sovrnBidAdapter.js +93 -18
- package/modules/sovrnBidAdapter.md +80 -2
- package/modules/sspBCBidAdapter.js +53 -20
- package/modules/telariaBidAdapter.js +22 -29
- package/modules/trustpidSystem.js +197 -0
- package/modules/trustpidSystem.md +45 -0
- package/modules/undertoneBidAdapter.js +17 -1
- package/modules/userId/eids.js +16 -1
- package/modules/userId/eids.md +10 -2
- package/modules/userId/userId.md +17 -2
- package/modules/vibrantmediaBidAdapter.js +220 -0
- package/modules/vibrantmediaBidAdapter.md +92 -0
- package/modules/vidoomyBidAdapter.js +8 -0
- package/modules/vidoomyBidAdapter.md +4 -2
- package/modules/weboramaRtdProvider.js +264 -34
- package/modules/weboramaRtdProvider.md +110 -40
- package/modules/yahoosspBidAdapter.js +3 -1
- package/modules/yieldoneBidAdapter.js +6 -0
- package/package.json +2 -1
- package/src/adRendering.js +38 -0
- package/src/adapterManager.js +24 -19
- package/src/adapters/bidderFactory.js +14 -11
- package/src/adloader.js +2 -1
- package/src/auction.js +138 -115
- package/src/auctionIndex.js +85 -0
- package/src/auctionManager.js +3 -0
- package/src/bidderSettings.js +69 -0
- package/src/bidfactory.js +18 -6
- package/src/native.js +29 -21
- package/src/prebid.js +3 -19
- package/src/secureCreatives.js +128 -45
- package/src/targeting.js +11 -2
- package/src/utils.js +14 -17
- package/src/video.js +10 -11
- package/src/videoCache.js +10 -9
- package/test/fixtures/fixtures.js +2 -1
- package/test/helpers/indexStub.js +28 -0
- package/test/helpers/syncPromise.js +71 -0
- package/test/spec/auctionmanager_spec.js +268 -89
- package/test/spec/config_spec.js +24 -1
- package/test/spec/modules/adagioBidAdapter_spec.js +0 -10
- package/test/spec/modules/adnuntiusRtdProvider_spec.js +145 -0
- package/test/spec/modules/adotBidAdapter_spec.js +294 -3124
- package/test/spec/modules/adpod_spec.js +91 -156
- package/test/spec/modules/adyoulikeBidAdapter_spec.js +4 -0
- package/test/spec/modules/appnexusBidAdapter_spec.js +27 -0
- package/test/spec/modules/asealBidAdapter_spec.js +144 -0
- package/test/spec/modules/brandmetricsRtdProvider_spec.js +191 -0
- package/test/spec/modules/conversantBidAdapter_spec.js +54 -2
- package/test/spec/modules/criteoBidAdapter_spec.js +21 -0
- package/test/spec/modules/currency_spec.js +36 -15
- package/test/spec/modules/displayioBidAdapter_spec.js +239 -0
- package/test/spec/modules/dspxBidAdapter_spec.js +20 -15
- package/test/spec/modules/e_volutionBidAdapter_spec.js +242 -0
- package/test/spec/modules/eids_spec.js +2 -2
- package/test/spec/modules/gridBidAdapter_spec.js +18 -0
- package/test/spec/modules/gumgumBidAdapter_spec.js +49 -3
- package/test/spec/modules/hadronIdSystem_spec.js +57 -0
- package/test/spec/modules/hadronRtdProvider_spec.js +762 -0
- package/test/spec/modules/imRtdProvider_spec.js +30 -1
- package/test/spec/modules/improvedigitalBidAdapter_spec.js +19 -0
- package/test/spec/modules/iqzoneBidAdapter_spec.js +1 -0
- package/test/spec/modules/ixBidAdapter_spec.js +1 -1
- package/test/spec/modules/kubientBidAdapter_spec.js +182 -84
- package/test/spec/modules/lunamediahbBidAdapter_spec.js +27 -1
- package/test/spec/modules/mass_spec.js +2 -14
- package/test/spec/modules/mediakeysBidAdapter_spec.js +9 -5
- package/test/spec/modules/mediasquareBidAdapter_spec.js +25 -1
- package/test/spec/modules/oguryBidAdapter_spec.js +63 -5
- package/test/spec/modules/prebidServerBidAdapter_spec.js +43 -6
- package/test/spec/modules/priceFloors_spec.js +83 -24
- package/test/spec/modules/pubmaticBidAdapter_spec.js +40 -0
- package/test/spec/modules/riseBidAdapter_spec.js +30 -4
- package/test/spec/modules/rubiconAnalyticsAdapter_spec.js +31 -1
- package/test/spec/modules/rubiconBidAdapter_spec.js +1 -1
- package/test/spec/modules/sortableAnalyticsAdapter_spec.js +2 -3
- package/test/spec/modules/sovrnBidAdapter_spec.js +413 -333
- package/test/spec/modules/sspBCBidAdapter_spec.js +7 -7
- package/test/spec/modules/telariaBidAdapter_spec.js +1 -3
- package/test/spec/modules/trustpidSystem_spec.js +232 -0
- package/test/spec/modules/undertoneBidAdapter_spec.js +55 -2
- package/test/spec/modules/userId_spec.js +39 -39
- package/test/spec/modules/vibrantmediaBidAdapter_spec.js +1237 -0
- package/test/spec/modules/vidoomyBidAdapter_spec.js +7 -1
- package/test/spec/modules/weboramaRtdProvider_spec.js +536 -20
- package/test/spec/modules/yahoosspBidAdapter_spec.js +10 -0
- package/test/spec/modules/yieldoneBidAdapter_spec.js +33 -0
- package/test/spec/native_spec.js +62 -40
- package/test/spec/unit/core/adapterManager_spec.js +22 -0
- package/test/spec/unit/core/auctionIndex_spec.js +129 -0
- package/test/spec/unit/core/bidderFactory_spec.js +65 -12
- package/test/spec/unit/core/bidderSettings_spec.js +123 -0
- package/test/spec/unit/core/targeting_spec.js +93 -0
- package/test/spec/unit/pbjs_api_spec.js +80 -42
- package/test/spec/unit/secureCreatives_spec.js +143 -24
- package/test/spec/videoCache_spec.js +18 -19
- package/test/spec/video_spec.js +51 -61
package/modules/haloIdSystem.md
CHANGED
|
@@ -1,35 +1,4 @@
|
|
|
1
|
-
## Audigent Halo
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
### Prebid Params
|
|
6
|
-
|
|
7
|
-
Individual params may be set for the Audigent Halo ID Submodule. At least one identifier must be set in the params.
|
|
8
|
-
|
|
9
|
-
```
|
|
10
|
-
pbjs.setConfig({
|
|
11
|
-
usersync: {
|
|
12
|
-
userIds: [{
|
|
13
|
-
name: 'haloId',
|
|
14
|
-
storage: {
|
|
15
|
-
name: 'haloId',
|
|
16
|
-
type: 'html5'
|
|
17
|
-
}
|
|
18
|
-
}]
|
|
19
|
-
}
|
|
20
|
-
});
|
|
21
|
-
```
|
|
22
|
-
## Parameter Descriptions for the `usersync` Configuration Section
|
|
23
|
-
The below parameters apply only to the HaloID User ID Module integration.
|
|
24
|
-
|
|
25
|
-
| Param under usersync.userIds[] | Scope | Type | Description | Example |
|
|
26
|
-
| --- | --- | --- | --- | --- |
|
|
27
|
-
| name | Required | String | ID value for the HaloID module - `"haloId"` | `"haloId"` |
|
|
28
|
-
| storage | Required | Object | The publisher must specify the local storage in which to store the results of the call to get the user ID. This can be either cookie or HTML5 storage. | |
|
|
29
|
-
| storage.type | Required | String | This is where the results of the user ID will be stored. The recommended method is `localStorage` by specifying `html5`. | `"html5"` |
|
|
30
|
-
| storage.name | Required | String | The name of the cookie or html5 local storage where the user ID will be stored. | `"haloid"` |
|
|
31
|
-
| storage.expires | Optional | Integer | How long (in days) the user ID information will be stored. | `365` |
|
|
32
|
-
| value | Optional | Object | Used only if the page has a separate mechanism for storing the Halo ID. The value is an object containing the values to be sent to the adapters. In this scenario, no URL is called and nothing is added to local storage | `{"haloId": "eb33b0cb-8d35-4722-b9c0-1a31d4064888"}` |
|
|
33
|
-
| params | Optional | Object | Used to store params for the id system |
|
|
34
|
-
| params.url | Optional | String | Set an alternate GET url for HaloId with this parameter |
|
|
35
|
-
| params.urlArg | Optional | Object | Optional url parameter for params.url |
|
|
1
|
+
## Audigent Halo has been rebranded as Hadron
|
|
2
|
+
## Use the Hadron Id Submodule
|
|
3
|
+
## The Halo modules will be removed from Prebid 7
|
|
4
|
+
## Contact prebid@audigent.com for more info.
|
|
@@ -1,126 +1,3 @@
|
|
|
1
|
-
## Audigent Halo
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
world’s first "data agency", powering the programmatic landscape and DTC
|
|
5
|
-
eCommerce with actionable 1st party audience and contextual data from the
|
|
6
|
-
world’s most influential retailers, lifestyle publishers, content creators,
|
|
7
|
-
athletes and artists.
|
|
8
|
-
|
|
9
|
-
The Halo real-time data module in Prebid has been built so that publishers
|
|
10
|
-
can maximize the power of their first-party audiences and contextual data.
|
|
11
|
-
This module provides both an integrated cookieless Halo identity with real-time
|
|
12
|
-
contextual and audience segmentation solution that seamlessly and easily
|
|
13
|
-
integrates into your existing Prebid deployment.
|
|
14
|
-
|
|
15
|
-
Users, devices, content, cohorts and other features are identified and utilized
|
|
16
|
-
to augment every bid request with targeted, 1st party data-derived segments
|
|
17
|
-
before being submitted to supply-side platforms. Enriching the bid request with
|
|
18
|
-
robust 1st party audience and contextual data, Audigent's Halo RTD module
|
|
19
|
-
optimizes targeting, increases the number of bids, increases bid value,
|
|
20
|
-
and drives additional incremental revenue for publishers.
|
|
21
|
-
|
|
22
|
-
### Publisher Usage
|
|
23
|
-
|
|
24
|
-
Compile the Halo RTD module into your Prebid build:
|
|
25
|
-
|
|
26
|
-
`gulp build --modules=userId,unifiedIdSystem,rtdModule,haloRtdProvider,appnexusBidAdapter`
|
|
27
|
-
|
|
28
|
-
Add the Halo RTD provider to your Prebid config. In this example we will configure
|
|
29
|
-
publisher 1234 to retrieve segments from Audigent. See the
|
|
30
|
-
"Parameter Descriptions" below for more detailed information of the
|
|
31
|
-
configuration parameters. Please work with your Audigent Prebid support team
|
|
32
|
-
(prebid@audigent.com) on which version of Prebid.js supports different bidder
|
|
33
|
-
and segment configurations.
|
|
34
|
-
|
|
35
|
-
```
|
|
36
|
-
pbjs.setConfig(
|
|
37
|
-
...
|
|
38
|
-
realTimeData: {
|
|
39
|
-
auctionDelay: 5000,
|
|
40
|
-
dataProviders: [
|
|
41
|
-
{
|
|
42
|
-
name: "halo",
|
|
43
|
-
waitForIt: true,
|
|
44
|
-
params: {
|
|
45
|
-
segmentCache: false,
|
|
46
|
-
requestParams: {
|
|
47
|
-
publisherId: 1234
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
]
|
|
52
|
-
}
|
|
53
|
-
...
|
|
54
|
-
}
|
|
55
|
-
```
|
|
56
|
-
|
|
57
|
-
### Parameter Descriptions for the Halo Configuration Section
|
|
58
|
-
|
|
59
|
-
| Name |Type | Description | Notes |
|
|
60
|
-
| :------------ | :------------ | :------------ |:------------ |
|
|
61
|
-
| name | String | Real time data module name | Always 'halo' |
|
|
62
|
-
| waitForIt | Boolean | Required to ensure that the auction is delayed until prefetch is complete | Optional. Defaults to false |
|
|
63
|
-
| params | Object | | |
|
|
64
|
-
| params.handleRtd | Function | A passable RTD handler that allows custom adunit and ortb2 logic to be configured. The function signature is (bidConfig, rtd, rtdConfig, pbConfig) => {}. | Optional |
|
|
65
|
-
| params.segmentCache | Boolean | This parameter tells the Halo RTD module to attempt reading segments from a local storage cache instead of always requesting them from the Audigent server. | Optional. Defaults to false. |
|
|
66
|
-
| params.requestParams | Object | Publisher partner specific configuration options, such as optional publisher id and other segment query related metadata to be submitted to Audigent's backend with each request. Contact prebid@audigent.com for more information. | Optional |
|
|
67
|
-
| params.haloIdUrl | String | Parameter to specify alternate haloid endpoint url. | Optional |
|
|
68
|
-
|
|
69
|
-
### Publisher Customized RTD Handling
|
|
70
|
-
As indicated above, it is possible to provide your own bid augmentation
|
|
71
|
-
functions rather than simply merging supplied data. This is useful if you
|
|
72
|
-
want to perform custom bid augmentation and logic with Halo real-time data
|
|
73
|
-
prior to the bid request being sent. Simply add your custom logic to the
|
|
74
|
-
optional handleRtd parameter and provide your custom RTD handling logic there.
|
|
75
|
-
|
|
76
|
-
Please see the following example, which provides a function to modify bids for
|
|
77
|
-
a bid adapter called adBuzz and perform custom logic on bidder parameters.
|
|
78
|
-
|
|
79
|
-
```
|
|
80
|
-
pbjs.setConfig(
|
|
81
|
-
...
|
|
82
|
-
realTimeData: {
|
|
83
|
-
auctionDelay: auctionDelay,
|
|
84
|
-
dataProviders: [
|
|
85
|
-
{
|
|
86
|
-
name: "halo",
|
|
87
|
-
waitForIt: true,
|
|
88
|
-
params: {
|
|
89
|
-
handleRtd: function(bidConfig, rtd, rtdConfig, pbConfig) {
|
|
90
|
-
var adUnits = bidConfig.adUnits;
|
|
91
|
-
for (var i = 0; i < adUnits.length; i++) {
|
|
92
|
-
var adUnit = adUnits[i];
|
|
93
|
-
for (var j = 0; j < adUnit.bids.length; j++) {
|
|
94
|
-
var bid = adUnit.bids[j];
|
|
95
|
-
if (bid.bidder == 'adBuzz' && rtd['adBuzz'][0].value != 'excludeSeg') {
|
|
96
|
-
bid.params.adBuzzCustomSegments.push(rtd['adBuzz'][0].id);
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
},
|
|
101
|
-
segmentCache: false,
|
|
102
|
-
requestParams: {
|
|
103
|
-
publisherId: 1234
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
]
|
|
108
|
-
}
|
|
109
|
-
...
|
|
110
|
-
}
|
|
111
|
-
```
|
|
112
|
-
|
|
113
|
-
The handleRtd function can also be used to configure custom ortb2 data
|
|
114
|
-
processing. Please see the examples available in the haloRtdProvider_spec.js
|
|
115
|
-
tests and work with your Audigent Prebid integration team (prebid@audigent.com)
|
|
116
|
-
on how to best configure your own Halo RTD & Open RTB data handlers.
|
|
117
|
-
|
|
118
|
-
### Testing
|
|
119
|
-
|
|
120
|
-
To view an example of available segments returned by Audigent's backends:
|
|
121
|
-
|
|
122
|
-
`gulp serve --modules=userId,unifiedIdSystem,rtdModule,haloRtdProvider,appnexusBidAdapter`
|
|
123
|
-
|
|
124
|
-
and then point your browser at:
|
|
125
|
-
|
|
126
|
-
`http://localhost:9999/integrationExamples/gpt/haloRtdProvider_example.html`
|
|
1
|
+
## Audigent Halo has been rebranded as Hadron
|
|
2
|
+
## Use the Hadron Rtd Submodule
|
|
3
|
+
## The Halo modules will be removed from Prebid 7
|
package/modules/imRtdProvider.js
CHANGED
|
@@ -60,6 +60,16 @@ export function getBidderFunction(bidderName) {
|
|
|
60
60
|
);
|
|
61
61
|
}
|
|
62
62
|
return bid
|
|
63
|
+
},
|
|
64
|
+
fluct: function (bid, data) {
|
|
65
|
+
if (data.im_segments && data.im_segments.length) {
|
|
66
|
+
deepSetValue(
|
|
67
|
+
bid,
|
|
68
|
+
'params.kv.imsids',
|
|
69
|
+
data.im_segments
|
|
70
|
+
);
|
|
71
|
+
}
|
|
72
|
+
return bid
|
|
63
73
|
}
|
|
64
74
|
}
|
|
65
75
|
return biddersFunction[bidderName] || null;
|
|
@@ -90,6 +90,7 @@ export const spec = {
|
|
|
90
90
|
// End of adding first party data
|
|
91
91
|
|
|
92
92
|
requestParameters.schain = bidRequests[0].schain;
|
|
93
|
+
requestParameters.coppa = config.getConfig('coppa') === true;
|
|
93
94
|
|
|
94
95
|
if (bidRequests[0].userId) {
|
|
95
96
|
const eids = createEidsArray(bidRequests[0].userId);
|
|
@@ -652,6 +653,10 @@ export function ImproveDigitalAdServerJSClient(endPoint) {
|
|
|
652
653
|
}
|
|
653
654
|
}
|
|
654
655
|
|
|
656
|
+
if (requestParameters.coppa) {
|
|
657
|
+
impressionBidRequestObject.coppa = 1;
|
|
658
|
+
}
|
|
659
|
+
|
|
655
660
|
return impressionBidRequestObject;
|
|
656
661
|
};
|
|
657
662
|
|
|
@@ -83,7 +83,8 @@ function parseRequestPrebidjsToOpenRTB(prebidRequest) {
|
|
|
83
83
|
let openRTBRequest = JSON.parse(JSON.stringify(DEFAULT['OpenRTBBidRequest']));
|
|
84
84
|
openRTBRequest.id = prebidRequest.auctionId;
|
|
85
85
|
openRTBRequest.ext = {
|
|
86
|
-
|
|
86
|
+
refererInfo: prebidRequest.refererInfo,
|
|
87
|
+
auctionId: prebidRequest.auctionId
|
|
87
88
|
};
|
|
88
89
|
|
|
89
90
|
openRTBRequest.site = JSON.parse(JSON.stringify(DEFAULT['OpenRTBBidRequestSite']));
|
|
@@ -111,15 +112,17 @@ function parseRequestPrebidjsToOpenRTB(prebidRequest) {
|
|
|
111
112
|
openRTBRequest.user = JSON.parse(JSON.stringify(DEFAULT['OpenRTBBidRequestUser']));
|
|
112
113
|
|
|
113
114
|
openRTBRequest.imp = [];
|
|
114
|
-
prebidRequest.bids.forEach(function(bid
|
|
115
|
-
impId++;
|
|
115
|
+
prebidRequest.bids.forEach(function(bid) {
|
|
116
116
|
if (!ret.partnerId) {
|
|
117
117
|
ret.partnerId = bid.params.partnerId;
|
|
118
118
|
}
|
|
119
119
|
let imp = JSON.parse(JSON.stringify(DEFAULT['OpenRTBBidRequestImp']));
|
|
120
|
-
imp.id =
|
|
120
|
+
imp.id = bid.bidId;
|
|
121
121
|
imp.secure = secure;
|
|
122
|
-
imp.tagid = bid.
|
|
122
|
+
imp.tagid = bid.adUnitCode;
|
|
123
|
+
imp.ext = {
|
|
124
|
+
rawdata: bid
|
|
125
|
+
};
|
|
123
126
|
|
|
124
127
|
openRTBRequest.site.publisher.id = openRTBRequest.site.publisher.id || 0;
|
|
125
128
|
openRTBRequest.tmax = openRTBRequest.tmax || bid.params.tmax || 0;
|
|
@@ -152,7 +155,7 @@ function parseResponseOpenRTBToPrebidjs(openRTBResponse) {
|
|
|
152
155
|
if (seatbid.bid && seatbid.bid.forEach) {
|
|
153
156
|
seatbid.bid.forEach(function(bid) {
|
|
154
157
|
let prebid = JSON.parse(JSON.stringify(DEFAULT['PrebidBid']));
|
|
155
|
-
prebid.requestId = bid.
|
|
158
|
+
prebid.requestId = bid.impid;
|
|
156
159
|
prebid.ad = bid.adm;
|
|
157
160
|
prebid.creativeId = bid.crid;
|
|
158
161
|
prebid.cpm = bid.price;
|
|
@@ -27,16 +27,23 @@ function isBidResponseValid(bid) {
|
|
|
27
27
|
function getPlacementReqData(bid) {
|
|
28
28
|
const { params, bidId, mediaTypes } = bid;
|
|
29
29
|
const schain = bid.schain || {};
|
|
30
|
-
const { placementId } = params;
|
|
30
|
+
const { placementId, endpointId } = params;
|
|
31
31
|
const bidfloor = getBidFloor(bid);
|
|
32
32
|
|
|
33
33
|
const placement = {
|
|
34
|
-
placementId,
|
|
35
34
|
bidId,
|
|
36
35
|
schain,
|
|
37
36
|
bidfloor
|
|
38
37
|
};
|
|
39
38
|
|
|
39
|
+
if (placementId) {
|
|
40
|
+
placement.placementId = placementId;
|
|
41
|
+
placement.type = 'publisher';
|
|
42
|
+
} else if (endpointId) {
|
|
43
|
+
placement.endpointId = endpointId;
|
|
44
|
+
placement.type = 'network';
|
|
45
|
+
}
|
|
46
|
+
|
|
40
47
|
if (mediaTypes && mediaTypes[BANNER]) {
|
|
41
48
|
placement.adFormat = BANNER;
|
|
42
49
|
placement.sizes = mediaTypes[BANNER].sizes;
|
|
@@ -88,7 +95,7 @@ export const spec = {
|
|
|
88
95
|
|
|
89
96
|
isBidRequestValid: (bid = {}) => {
|
|
90
97
|
const { params, bidId, mediaTypes } = bid;
|
|
91
|
-
let valid = Boolean(bidId && params && params.placementId);
|
|
98
|
+
let valid = Boolean(bidId && params && (params.placementId || params.endpointId));
|
|
92
99
|
|
|
93
100
|
if (mediaTypes && mediaTypes[BANNER]) {
|
|
94
101
|
valid = valid && Boolean(mediaTypes[BANNER] && mediaTypes[BANNER].sizes);
|
|
@@ -75,6 +75,22 @@ IQZone bid adapter supports Banner, Video (instream and outstream) and Native.
|
|
|
75
75
|
}
|
|
76
76
|
}
|
|
77
77
|
]
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
code: 'adunit1',
|
|
81
|
+
mediaTypes: {
|
|
82
|
+
banner: {
|
|
83
|
+
sizes: [ [300, 250], [320, 50] ],
|
|
84
|
+
}
|
|
85
|
+
},
|
|
86
|
+
bids: [
|
|
87
|
+
{
|
|
88
|
+
bidder: 'iqzone',
|
|
89
|
+
params: {
|
|
90
|
+
endpointId: 'testBanner',
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
]
|
|
78
94
|
}
|
|
79
95
|
];
|
|
80
96
|
```
|
package/modules/ixBidAdapter.js
CHANGED
|
@@ -58,22 +58,18 @@ const SOURCE_RTI_MAPPING = {
|
|
|
58
58
|
'crwdcntrl.net': '', // Lotame Panorama ID, lotamePanoramaId
|
|
59
59
|
'epsilon.com': '', // Publisher Link, publinkId
|
|
60
60
|
'audigent.com': '', // Halo ID from Audigent, haloId
|
|
61
|
-
'pubcid.org': '' // SharedID, pubcid
|
|
61
|
+
'pubcid.org': '', // SharedID, pubcid
|
|
62
|
+
'trustpid.com': '' // Trustpid
|
|
62
63
|
};
|
|
63
64
|
const PROVIDERS = [
|
|
64
65
|
'britepoolid',
|
|
65
|
-
'id5id',
|
|
66
66
|
'lipbid',
|
|
67
|
-
'haloId',
|
|
68
67
|
'criteoId',
|
|
69
|
-
'lotamePanoramaId',
|
|
70
68
|
'merkleId',
|
|
71
69
|
'parrableId',
|
|
72
70
|
'connectid',
|
|
73
71
|
'tapadId',
|
|
74
72
|
'quantcastId',
|
|
75
|
-
'pubcid',
|
|
76
|
-
'TDID',
|
|
77
73
|
'flocId',
|
|
78
74
|
'pubProvidedId'
|
|
79
75
|
];
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { isArray, deepAccess } from '../src/utils.js';
|
|
2
2
|
import {registerBidder} from '../src/adapters/bidderFactory.js';
|
|
3
3
|
import {BANNER, VIDEO} from '../src/mediaTypes.js';
|
|
4
|
+
import { config } from '../src/config.js';
|
|
4
5
|
|
|
5
6
|
const BIDDER_CODE = 'kubient';
|
|
6
7
|
const END_POINT = 'https://kssp.kbntx.ch/kubprebidjs';
|
|
@@ -59,7 +60,11 @@ export const spec = {
|
|
|
59
60
|
gdpr: (bidderRequest.gdprConsent && bidderRequest.gdprConsent.gdprApplies) ? 1 : 0,
|
|
60
61
|
consentGiven: kubientGetConsentGiven(bidderRequest.gdprConsent),
|
|
61
62
|
uspConsent: bidderRequest.uspConsent
|
|
62
|
-
}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
if (config.getConfig('coppa') === true) {
|
|
66
|
+
data.coppa = 1
|
|
67
|
+
}
|
|
63
68
|
|
|
64
69
|
if (bidderRequest.refererInfo && bidderRequest.refererInfo.referer) {
|
|
65
70
|
data.referer = bidderRequest.refererInfo.referer
|
|
@@ -109,31 +114,39 @@ export const spec = {
|
|
|
109
114
|
return bidResponses;
|
|
110
115
|
},
|
|
111
116
|
getUserSyncs: function (syncOptions, serverResponses, gdprConsent, uspConsent) {
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
if (
|
|
115
|
-
|
|
117
|
+
let kubientSync = kubientGetSyncInclude(config);
|
|
118
|
+
|
|
119
|
+
if (!syncOptions.pixelEnabled || kubientSync.image === 'exclude') {
|
|
120
|
+
return [];
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
let values = {};
|
|
124
|
+
if (gdprConsent) {
|
|
116
125
|
if (typeof gdprConsent.gdprApplies === 'boolean') {
|
|
117
|
-
|
|
126
|
+
values['gdpr'] = Number(gdprConsent.gdprApplies);
|
|
127
|
+
}
|
|
128
|
+
if (typeof gdprConsent.consentString === 'string') {
|
|
129
|
+
values['consent'] = gdprConsent.consentString;
|
|
118
130
|
}
|
|
119
|
-
gdprParams = gdprParams + `&consent_given=` + kubientGetConsentGiven(gdprConsent);
|
|
120
|
-
}
|
|
121
|
-
if (syncOptions.iframeEnabled) {
|
|
122
|
-
syncs.push({
|
|
123
|
-
type: 'iframe',
|
|
124
|
-
url: 'https://kdmp.kbntx.ch/init.html' + gdprParams
|
|
125
|
-
});
|
|
126
131
|
}
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
url: 'https://kdmp.kbntx.ch/init.png' + gdprParams
|
|
131
|
-
});
|
|
132
|
+
|
|
133
|
+
if (uspConsent) {
|
|
134
|
+
values['usp'] = uspConsent;
|
|
132
135
|
}
|
|
133
|
-
|
|
136
|
+
|
|
137
|
+
return [{
|
|
138
|
+
type: 'image',
|
|
139
|
+
url: 'https://matching.kubient.net/match/sp?' + encodeQueryData(values)
|
|
140
|
+
}];
|
|
134
141
|
}
|
|
135
142
|
};
|
|
136
143
|
|
|
144
|
+
function encodeQueryData(data) {
|
|
145
|
+
return Object.keys(data).map(function(key) {
|
|
146
|
+
return [key, data[key]].map(encodeURIComponent).join('=');
|
|
147
|
+
}).join('&');
|
|
148
|
+
}
|
|
149
|
+
|
|
137
150
|
function kubientGetConsentGiven(gdprConsent) {
|
|
138
151
|
let consentGiven = 0;
|
|
139
152
|
if (typeof gdprConsent !== 'undefined') {
|
|
@@ -149,4 +162,22 @@ function kubientGetConsentGiven(gdprConsent) {
|
|
|
149
162
|
}
|
|
150
163
|
return consentGiven;
|
|
151
164
|
}
|
|
165
|
+
|
|
166
|
+
function kubientGetSyncInclude(config) {
|
|
167
|
+
try {
|
|
168
|
+
let kubientSync = {};
|
|
169
|
+
if (config.getConfig('userSync').filterSettings != null && typeof config.getConfig('userSync').filterSettings != 'undefined') {
|
|
170
|
+
let filterSettings = config.getConfig('userSync').filterSettings
|
|
171
|
+
if (filterSettings.iframe !== null && typeof filterSettings.iframe !== 'undefined') {
|
|
172
|
+
kubientSync.iframe = ((isArray(filterSettings.image.bidders) && filterSettings.iframe.bidders.indexOf('kubient') !== -1) || filterSettings.iframe.bidders === '*') ? filterSettings.iframe.filter : 'exclude';
|
|
173
|
+
}
|
|
174
|
+
if (filterSettings.image !== null && typeof filterSettings.image !== 'undefined') {
|
|
175
|
+
kubientSync.image = ((isArray(filterSettings.image.bidders) && filterSettings.image.bidders.indexOf('kubient') !== -1) || filterSettings.image.bidders === '*') ? filterSettings.image.filter : 'exclude';
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
return kubientSync;
|
|
179
|
+
} catch (e) {
|
|
180
|
+
return null;
|
|
181
|
+
}
|
|
182
|
+
}
|
|
152
183
|
registerBidder(spec);
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { logMessage } from '../src/utils.js';
|
|
2
2
|
import { registerBidder } from '../src/adapters/bidderFactory.js';
|
|
3
3
|
import { BANNER, NATIVE, VIDEO } from '../src/mediaTypes.js';
|
|
4
|
+
import { config } from '../src/config.js';
|
|
4
5
|
|
|
5
6
|
const BIDDER_CODE = 'lunamediahb';
|
|
6
7
|
const AD_URL = 'https://balancer.lmgssp.com/?c=o&m=multi';
|
|
8
|
+
const SYNC_URL = 'https://cookie.lmgssp.com';
|
|
7
9
|
|
|
8
10
|
function isBidResponseValid(bid) {
|
|
9
11
|
if (!bid.requestId || !bid.cpm || !bid.creativeId ||
|
|
@@ -14,7 +16,7 @@ function isBidResponseValid(bid) {
|
|
|
14
16
|
case BANNER:
|
|
15
17
|
return Boolean(bid.width && bid.height && bid.ad);
|
|
16
18
|
case VIDEO:
|
|
17
|
-
return Boolean(bid.vastUrl);
|
|
19
|
+
return Boolean(bid.vastUrl) || Boolean(bid.vastXml);
|
|
18
20
|
case NATIVE:
|
|
19
21
|
return Boolean(bid.native && bid.native.impressionTrackers);
|
|
20
22
|
default:
|
|
@@ -74,10 +76,13 @@ export const spec = {
|
|
|
74
76
|
if (mediaType && mediaType[BANNER] && mediaType[BANNER].sizes) {
|
|
75
77
|
placement.sizes = mediaType[BANNER].sizes;
|
|
76
78
|
placement.traffic = BANNER;
|
|
77
|
-
} else if (mediaType && mediaType[VIDEO]
|
|
78
|
-
|
|
79
|
-
|
|
79
|
+
} else if (mediaType && mediaType[VIDEO]) {
|
|
80
|
+
if (mediaType[VIDEO].playerSize) {
|
|
81
|
+
placement.wPlayer = mediaType[VIDEO].playerSize[0];
|
|
82
|
+
placement.hPlayer = mediaType[VIDEO].playerSize[1];
|
|
83
|
+
}
|
|
80
84
|
placement.traffic = VIDEO;
|
|
85
|
+
placement.videoContext = mediaType[VIDEO].context || 'instream'
|
|
81
86
|
} else if (mediaType && mediaType[NATIVE]) {
|
|
82
87
|
placement.native = mediaType[NATIVE];
|
|
83
88
|
placement.traffic = NATIVE;
|
|
@@ -102,6 +107,29 @@ export const spec = {
|
|
|
102
107
|
}
|
|
103
108
|
return response;
|
|
104
109
|
},
|
|
110
|
+
|
|
111
|
+
getUserSyncs: (syncOptions, serverResponses, gdprConsent, uspConsent) => {
|
|
112
|
+
let syncType = syncOptions.iframeEnabled ? 'iframe' : 'image';
|
|
113
|
+
let syncUrl = SYNC_URL + `/${syncType}?pbjs=1`;
|
|
114
|
+
if (gdprConsent && gdprConsent.consentString) {
|
|
115
|
+
if (typeof gdprConsent.gdprApplies === 'boolean') {
|
|
116
|
+
syncUrl += `&gdpr=${Number(gdprConsent.gdprApplies)}&gdpr_consent=${gdprConsent.consentString}`;
|
|
117
|
+
} else {
|
|
118
|
+
syncUrl += `&gdpr=0&gdpr_consent=${gdprConsent.consentString}`;
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
if (uspConsent && uspConsent.consentString) {
|
|
122
|
+
syncUrl += `&ccpa_consent=${uspConsent.consentString}`;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
const coppa = config.getConfig('coppa') ? 1 : 0;
|
|
126
|
+
syncUrl += `&coppa=${coppa}`;
|
|
127
|
+
|
|
128
|
+
return [{
|
|
129
|
+
type: syncType,
|
|
130
|
+
url: syncUrl
|
|
131
|
+
}];
|
|
132
|
+
}
|
|
105
133
|
};
|
|
106
134
|
|
|
107
135
|
registerBidder(spec);
|
|
@@ -41,7 +41,8 @@ export const spec = {
|
|
|
41
41
|
let contents = [];
|
|
42
42
|
let data = {};
|
|
43
43
|
let auctionId = bidderRequest ? bidderRequest.auctionId : '';
|
|
44
|
-
|
|
44
|
+
let gdrpApplies = true;
|
|
45
|
+
let gdprConsent = '';
|
|
45
46
|
let placements = validBidRequests.map(bidRequest => {
|
|
46
47
|
if (!propertyId) { propertyId = bidRequest.params.propertyId; }
|
|
47
48
|
if (!pageViewGuid && bidRequest.params) { pageViewGuid = bidRequest.params.pageViewGuid || ''; }
|
|
@@ -49,7 +50,8 @@ export const spec = {
|
|
|
49
50
|
if (!url && bidderRequest) { url = bidderRequest.refererInfo.referer; }
|
|
50
51
|
if (!contents.length && bidRequest.params.contents && bidRequest.params.contents.length) { contents = bidRequest.params.contents; }
|
|
51
52
|
if (Object.keys(data).length === 0 && bidRequest.params.data && Object.keys(bidRequest.params.data).length !== 0) { data = bidRequest.params.data; }
|
|
52
|
-
|
|
53
|
+
if (bidderRequest && bidRequest.gdprConsent) { gdrpApplies = bidderRequest.gdprConsent && bidderRequest.gdprConsent.gdprApplies ? bidderRequest.gdprConsent.gdprApplies : true; }
|
|
54
|
+
if (bidderRequest && bidRequest.gdprConsent) { gdprConsent = bidderRequest.gdprConsent && bidderRequest.gdprConsent.consentString ? bidderRequest.gdprConsent.consentString : ''; }
|
|
53
55
|
let adUnitId = bidRequest.adUnitCode;
|
|
54
56
|
let placementId = bidRequest.params.placementId;
|
|
55
57
|
let sizes = generateSizeParam(bidRequest.sizes);
|
|
@@ -75,7 +77,9 @@ export const spec = {
|
|
|
75
77
|
requestid: bidderRequestId,
|
|
76
78
|
placements: placements,
|
|
77
79
|
contents: contents,
|
|
78
|
-
data: data
|
|
80
|
+
data: data,
|
|
81
|
+
gdpr_applies: gdrpApplies,
|
|
82
|
+
gdpr_consent: gdprConsent,
|
|
79
83
|
}
|
|
80
84
|
|
|
81
85
|
return [{
|
|
@@ -1,68 +1,81 @@
|
|
|
1
1
|
# Overview
|
|
2
|
+
|
|
2
3
|
Module Name: MallTV Bidder Adapter Module
|
|
3
4
|
|
|
4
5
|
Type: Bidder Adapter
|
|
5
6
|
|
|
6
|
-
Maintainer:
|
|
7
|
+
Maintainer: myhedin@gjirafa.com
|
|
7
8
|
|
|
8
9
|
# Description
|
|
10
|
+
|
|
9
11
|
MallTV Bidder Adapter for Prebid.js.
|
|
10
12
|
|
|
11
13
|
# Test Parameters
|
|
14
|
+
|
|
12
15
|
```js
|
|
13
16
|
var adUnits = [
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
17
|
+
{
|
|
18
|
+
code: "test-div",
|
|
19
|
+
mediaTypes: {
|
|
20
|
+
banner: {
|
|
21
|
+
sizes: [
|
|
22
|
+
[300, 250],
|
|
23
|
+
[300, 300],
|
|
24
|
+
],
|
|
25
|
+
},
|
|
26
|
+
},
|
|
27
|
+
bids: [
|
|
28
|
+
{
|
|
29
|
+
bidder: "malltv",
|
|
30
|
+
params: {
|
|
31
|
+
propertyId: "105134", //Required
|
|
32
|
+
placementId: "846832", //Required
|
|
33
|
+
data: {
|
|
34
|
+
//Optional
|
|
35
|
+
catalogs: [
|
|
36
|
+
{
|
|
37
|
+
catalogId: 9,
|
|
38
|
+
items: ["193", "4", "1"],
|
|
39
|
+
},
|
|
40
|
+
],
|
|
41
|
+
inventory: {
|
|
42
|
+
category: ["tech"],
|
|
43
|
+
query: ["iphone 12"],
|
|
44
|
+
},
|
|
45
|
+
},
|
|
23
46
|
},
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
}],
|
|
34
|
-
inventory: {
|
|
35
|
-
category: ["tech"],
|
|
36
|
-
query: ["iphone 12"]
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
}]
|
|
47
|
+
},
|
|
48
|
+
],
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
code: "test-div",
|
|
52
|
+
mediaTypes: {
|
|
53
|
+
video: {
|
|
54
|
+
context: "instream",
|
|
55
|
+
},
|
|
41
56
|
},
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
57
|
+
bids: [
|
|
58
|
+
{
|
|
59
|
+
bidder: "malltv",
|
|
60
|
+
params: {
|
|
61
|
+
propertyId: "105134", //Required
|
|
62
|
+
placementId: "846832", //Required
|
|
63
|
+
data: {
|
|
64
|
+
//Optional
|
|
65
|
+
catalogs: [
|
|
66
|
+
{
|
|
67
|
+
catalogId: 9,
|
|
68
|
+
items: ["193", "4", "1"],
|
|
69
|
+
},
|
|
70
|
+
],
|
|
71
|
+
inventory: {
|
|
72
|
+
category: ["tech"],
|
|
73
|
+
query: ["iphone 12"],
|
|
74
|
+
},
|
|
75
|
+
},
|
|
48
76
|
},
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
propertyId: '105134', //Required
|
|
53
|
-
placementId: '846832', //Required
|
|
54
|
-
data: { //Optional
|
|
55
|
-
catalogs: [{
|
|
56
|
-
catalogId: 9,
|
|
57
|
-
items: ["193", "4", "1"]
|
|
58
|
-
}],
|
|
59
|
-
inventory: {
|
|
60
|
-
category: ["tech"],
|
|
61
|
-
query: ["iphone 12"]
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
}]
|
|
66
|
-
}
|
|
77
|
+
},
|
|
78
|
+
],
|
|
79
|
+
},
|
|
67
80
|
];
|
|
68
81
|
```
|