prebid.js 7.35.0 → 7.36.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.devcontainer/Dockerfile +2 -0
- package/dist/33acrossBidAdapter.js +1 -1
- package/dist/33acrossIdSystem.js +1 -1
- package/dist/adagioBidAdapter.js +1 -1
- package/dist/adbookpspBidAdapter.js +1 -1
- package/dist/adgenerationBidAdapter.js +1 -1
- package/dist/admaruBidAdapter.js +1 -1
- package/dist/adrelevantisBidAdapter.js +1 -1
- package/dist/adtrgtmeBidAdapter.js +1 -1
- package/dist/adxcgBidAdapter.js +1 -1
- package/dist/adyoulikeBidAdapter.js +1 -1
- package/dist/aidemBidAdapter.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/audiencerunBidAdapter.js +1 -1
- package/dist/axonixBidAdapter.js +1 -1
- package/dist/bidglassBidAdapter.js +1 -1
- package/dist/big-richmediaBidAdapter.js +1 -1
- package/dist/bluebillywigBidAdapter.js +1 -1
- package/dist/bridgewellBidAdapter.js +1 -1
- package/dist/brightMountainMediaBidAdapter.js +1 -1
- package/dist/brightcomBidAdapter.js +1 -1
- package/dist/brightcomSSPBidAdapter.js +1 -0
- package/dist/carodaBidAdapter.js +1 -1
- package/dist/chtnwBidAdapter.js +1 -1
- package/dist/concertBidAdapter.js +1 -1
- package/dist/connectadBidAdapter.js +1 -1
- package/dist/consumableBidAdapter.js +1 -1
- package/dist/conversantBidAdapter.js +1 -1
- package/dist/craftBidAdapter.js +1 -1
- package/dist/criteoBidAdapter.js +1 -1
- package/dist/cwireBidAdapter.js +1 -1
- package/dist/dependencies.json +3 -0
- package/dist/dspxBidAdapter.js +1 -1
- package/dist/eplanningBidAdapter.js +1 -1
- package/dist/feedadBidAdapter.js +1 -1
- package/dist/finativeBidAdapter.js +1 -1
- package/dist/freewheel-sspBidAdapter.js +1 -1
- package/dist/glimpseBidAdapter.js +1 -1
- package/dist/gmosspBidAdapter.js +1 -1
- package/dist/goldbachBidAdapter.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/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/ixBidAdapter.js +1 -1
- package/dist/jixieBidAdapter.js +1 -1
- package/dist/justpremiumBidAdapter.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/liveIntentIdSystem.js +1 -1
- package/dist/liveyieldAnalyticsAdapter.js +1 -1
- package/dist/logicadBidAdapter.js +1 -1
- package/dist/loglyliftBidAdapter.js +1 -1
- package/dist/magniteAnalyticsAdapter.js +1 -1
- package/dist/malltvAnalyticsAdapter.js +1 -1
- package/dist/marsmediaBidAdapter.js +1 -1
- package/dist/mediafuseBidAdapter.js +1 -1
- package/dist/mediakeysBidAdapter.js +1 -1
- package/dist/mediasquareBidAdapter.js +1 -1
- package/dist/mgidBidAdapter.js +1 -1
- package/dist/minutemediaBidAdapter.js +1 -1
- package/dist/neuwoRtdProvider.js +1 -0
- package/dist/nexx360BidAdapter.js +1 -1
- package/dist/not-for-prod/prebid.js +132 -129
- package/dist/oguryBidAdapter.js +1 -1
- package/dist/onetagBidAdapter.js +1 -1
- package/dist/ooloAnalyticsAdapter.js +1 -1
- package/dist/outbrainBidAdapter.js +1 -1
- package/dist/parrableIdSystem.js +1 -1
- package/dist/pixfutureBidAdapter.js +1 -1
- package/dist/prebid-core.js +1 -1
- package/dist/publinkIdSystem.js +1 -1
- package/dist/pubmaticBidAdapter.js +1 -1
- package/dist/pubwiseAnalyticsAdapter.js +1 -1
- package/dist/pxyzBidAdapter.js +1 -1
- package/dist/quantcastBidAdapter.js +1 -1
- package/dist/readpeakBidAdapter.js +1 -1
- package/dist/relaidoBidAdapter.js +1 -1
- package/dist/rhythmoneBidAdapter.js +1 -1
- package/dist/riseBidAdapter.js +1 -1
- package/dist/rubiconAnalyticsAdapter.js +1 -1
- package/dist/rubiconBidAdapter.js +1 -1
- package/dist/scatteredBidAdapter.js +1 -0
- package/dist/seedingAllianceBidAdapter.js +1 -1
- package/dist/seedtagBidAdapter.js +1 -1
- package/dist/sharethroughAnalyticsAdapter.js +1 -1
- package/dist/sharethroughBidAdapter.js +1 -1
- package/dist/shinezBidAdapter.js +1 -1
- package/dist/sirdataRtdProvider.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/sonobiBidAdapter.js +1 -1
- package/dist/sovrnAnalyticsAdapter.js +1 -1
- package/dist/sovrnBidAdapter.js +1 -1
- package/dist/sspBCBidAdapter.js +1 -1
- package/dist/sublimeBidAdapter.js +1 -1
- package/dist/synacormediaBidAdapter.js +1 -1
- package/dist/targetVideoBidAdapter.js +1 -1
- package/dist/teadsBidAdapter.js +1 -1
- package/dist/trionBidAdapter.js +1 -1
- package/dist/tripleliftBidAdapter.js +1 -1
- package/dist/ttdBidAdapter.js +1 -1
- package/dist/ucfunnelAnalyticsAdapter.js +1 -1
- package/dist/uid2IdSystem.js +1 -1
- package/dist/underdogmediaBidAdapter.js +1 -1
- package/dist/undertoneBidAdapter.js +1 -1
- package/dist/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/widespaceBidAdapter.js +1 -1
- package/dist/winrBidAdapter.js +1 -1
- package/dist/yahoosspBidAdapter.js +1 -1
- package/dist/yieldmoBidAdapter.js +1 -1
- package/dist/yieldoneAnalyticsAdapter.js +1 -1
- package/integrationExamples/gpt/neuwoRtdProvider_example.html +190 -0
- package/modules/33acrossBidAdapter.js +13 -4
- package/modules/admaruBidAdapter.js +19 -1
- package/modules/aidemBidAdapter.js +90 -65
- package/modules/aidemBidAdapter.md +10 -7
- package/modules/ajaBidAdapter.js +6 -1
- package/modules/amxIdSystem.md +2 -10
- package/modules/aolBidAdapter.js +1 -1
- package/modules/appnexusBidAdapter.js +45 -48
- package/modules/brightcomBidAdapter.js +1 -0
- package/modules/brightcomSSPBidAdapter.js +323 -0
- package/modules/brightcomSSPBidAdapter.md +46 -0
- package/modules/feedadBidAdapter.js +35 -15
- package/modules/fpdModule/index.md +5 -2
- package/modules/freewheel-sspBidAdapter.js +5 -1
- package/modules/gridBidAdapter.js +3 -1
- package/modules/ixBidAdapter.js +318 -175
- package/modules/limelightDigitalBidAdapter.js +6 -1
- package/modules/limelightDigitalBidAdapter.md +12 -2
- package/modules/liveIntentIdSystem.js +1 -1
- package/modules/neuwoRtdProvider.js +171 -0
- package/modules/neuwoRtdProvider.md +40 -0
- package/modules/nexx360BidAdapter.js +1 -1
- package/modules/pubmaticBidAdapter.js +4 -0
- package/modules/scatteredBidAdapter.js +72 -0
- package/modules/scatteredBidAdapter.md +36 -0
- package/modules/sirdataRtdProvider.js +262 -284
- package/modules/smartxBidAdapter.js +2 -0
- package/modules/smilewantedBidAdapter.js +5 -0
- package/modules/topicsFpdModule.md +62 -0
- package/modules/userId/eids.js +1 -1
- package/modules/vidazooBidAdapter.js +3 -1
- package/modules/yahoosspBidAdapter.js +1 -1
- package/package.json +2 -2
- package/test/spec/modules/33acrossBidAdapter_spec.js +51 -18
- package/test/spec/modules/admaruBidAdapter_spec.js +48 -0
- package/test/spec/modules/aidemBidAdapter_spec.js +77 -10
- package/test/spec/modules/ajaBidAdapter_spec.js +21 -1
- package/test/spec/modules/aolBidAdapter_spec.js +2 -2
- package/test/spec/modules/appnexusBidAdapter_spec.js +123 -16
- package/test/spec/modules/brightcomSSPBidAdapter_spec.js +411 -0
- package/test/spec/modules/eids_spec.js +1 -1
- package/test/spec/modules/feedadBidAdapter_spec.js +47 -77
- package/test/spec/modules/freewheel-sspBidAdapter_spec.js +1 -1
- package/test/spec/modules/ixBidAdapter_spec.js +24 -54
- package/test/spec/modules/limelightDigitalBidAdapter_spec.js +35 -5
- package/test/spec/modules/neuwoRtdProvider_spec.js +123 -0
- package/test/spec/modules/pubmaticBidAdapter_spec.js +15 -0
- package/test/spec/modules/scatteredBidAdapter_spec.js +210 -0
- package/test/spec/modules/sirdataRtdProvider_spec.js +116 -22
- package/test/spec/modules/smilewantedBidAdapter_spec.js +54 -3
- package/test/spec/modules/tripleliftBidAdapter_spec.js +2 -2
- package/test/spec/modules/userId_spec.js +1 -1
- package/test/spec/modules/vidazooBidAdapter_spec.js +4 -1
- package/test/spec/modules/yahoosspBidAdapter_spec.js +1 -1
|
@@ -63,6 +63,11 @@ export const spec = {
|
|
|
63
63
|
payload.gdpr_consent = bidderRequest.gdprConsent.consentString;
|
|
64
64
|
payload.gdpr = bidderRequest.gdprConsent.gdprApplies; // we're handling the undefined case server side
|
|
65
65
|
}
|
|
66
|
+
|
|
67
|
+
if (bid && bid.userIdAsEids) {
|
|
68
|
+
payload.eids = bid.userIdAsEids;
|
|
69
|
+
}
|
|
70
|
+
|
|
66
71
|
var payloadString = JSON.stringify(payload);
|
|
67
72
|
return {
|
|
68
73
|
method: 'POST',
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
# Overview
|
|
2
|
+
|
|
3
|
+
Module Name: topicsFpdModule
|
|
4
|
+
|
|
5
|
+
# Description
|
|
6
|
+
Purpose of this module is to call the Topics API (document.browsingTopics()) which will fetch the first party domain as well third party domain(Iframe) topics data which will be sent onto user.data in bid stream.
|
|
7
|
+
|
|
8
|
+
The intent of the Topics API is to provide callers (including third-party ad-tech or advertising providers on the page that run script) with coarse-grained advertising topics that the page visitor might currently be interested in.
|
|
9
|
+
|
|
10
|
+
Topics Module(topicsFpdModule) should be included in prebid final package to call topics API.
|
|
11
|
+
Module topicsFpdModule helps to call the Topics API which will send topics data in bid stream (onto user.data)
|
|
12
|
+
|
|
13
|
+
```
|
|
14
|
+
try {
|
|
15
|
+
if ('browsingTopics' in document && document.featurePolicy.allowsFeature('browsing-topics')) {
|
|
16
|
+
topics = document.browsingTopics();
|
|
17
|
+
}
|
|
18
|
+
} catch (e) {
|
|
19
|
+
console.error('Could not call topics API', e);
|
|
20
|
+
}
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
# Topics Iframe Configuration
|
|
24
|
+
|
|
25
|
+
Topics iframe implementation is the enhancements of existing module under topicsFpdModule.js where different bidders will call the topic API under their domain to fetch the topics for respective domain and the segment data will be part of ORTB request under user.data object. Default config is maintained in the module itself.
|
|
26
|
+
|
|
27
|
+
Below are the configuration which can be used to configure and override the default config maintained in the module.
|
|
28
|
+
|
|
29
|
+
```
|
|
30
|
+
pbjs.setConfig({
|
|
31
|
+
userSync: {
|
|
32
|
+
...,
|
|
33
|
+
topics: {
|
|
34
|
+
maxTopicCaller: 3, // SSP rotation
|
|
35
|
+
bidders: [{
|
|
36
|
+
bidder: 'pubmatic',
|
|
37
|
+
iframeURL: 'https://ads.pubmatic.com/AdServer/js/topics/topics_frame.html',
|
|
38
|
+
expiry: 7 // Configurable expiry days
|
|
39
|
+
},{
|
|
40
|
+
bidder: 'rubicon',
|
|
41
|
+
iframeURL: 'https://rubicon.com:8080/topics/fpd/topic.html', // dummy URL
|
|
42
|
+
expiry: 7 // Configurable expiry days
|
|
43
|
+
},{
|
|
44
|
+
bidder: 'appnexus',
|
|
45
|
+
iframeURL: 'https://appnexus.com:8080/topics/fpd/topic.html', // dummy URL
|
|
46
|
+
expiry: 7 // Configurable expiry days
|
|
47
|
+
}]
|
|
48
|
+
}
|
|
49
|
+
....
|
|
50
|
+
}
|
|
51
|
+
})
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
## Topics Config Descriptions
|
|
55
|
+
|
|
56
|
+
| Field | Required? | Type | Description |
|
|
57
|
+
|---|---|---|---|
|
|
58
|
+
| topics.maxTopicCaller | no | integer | Defines the maximum numbers of Bidders Iframe which needs to be loaded on the publisher page. Default is 1 which is hardcoded in Module. Eg: topics.maxTopicCaller is set to 3. If there are 10 bidders configured along with their iframe URLS, random 3 bidders iframe URL is loaded which will call TOPICS API. If topics.maxTopicCaller is set to 0, it will load random 1(default) bidder iframe atleast. |
|
|
59
|
+
| topics.bidders | no | Array of objects | Array of topics callers with the iframe locations and other necessary informations like bidder(Bidder code) and expiry. Default Array of topics in the module itself.|
|
|
60
|
+
| topics.bidders[].bidder | yes | string | Bidder Code of the bidder(SSP). |
|
|
61
|
+
| topics.bidders[].iframeURL | yes | string | URL which is hosted on bidder/SSP/third-party domains which will call Topics API. |
|
|
62
|
+
| topics.bidders[].expiry | no | integer | Max number of days where Topics data will be persist. If Data is stored for more than mentioned expiry day, it will be deleted from storage. Default is 21 days which is hardcoded in Module. |
|
package/modules/userId/eids.js
CHANGED
|
@@ -27,6 +27,7 @@ export const SUPPORTED_ID_SYSTEMS = {
|
|
|
27
27
|
'tdid': 1,
|
|
28
28
|
'pubProvidedId': 1
|
|
29
29
|
};
|
|
30
|
+
export const webSessionId = 'wsid_' + parseInt(Date.now() * Math.random());
|
|
30
31
|
const storage = getStorageManager({gvlid: GVLID, bidderCode: BIDDER_CODE});
|
|
31
32
|
|
|
32
33
|
function getTopWindowQueryParams() {
|
|
@@ -131,7 +132,8 @@ function buildRequest(bid, topWindowUrl, sizes, bidderRequest, bidderTimeout) {
|
|
|
131
132
|
bidRequestsCount: bidRequestsCount,
|
|
132
133
|
bidderRequestsCount: bidderRequestsCount,
|
|
133
134
|
bidderWinsCount: bidderWinsCount,
|
|
134
|
-
bidderTimeout: bidderTimeout
|
|
135
|
+
bidderTimeout: bidderTimeout,
|
|
136
|
+
webSessionId: webSessionId
|
|
135
137
|
};
|
|
136
138
|
|
|
137
139
|
appendUserIdsToRequestPayload(data, userId);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "prebid.js",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.36.0",
|
|
4
4
|
"description": "Header Bidding Management Library",
|
|
5
5
|
"main": "src/prebid.js",
|
|
6
6
|
"scripts": {
|
|
@@ -130,7 +130,7 @@
|
|
|
130
130
|
"express": "^4.15.4",
|
|
131
131
|
"fun-hooks": "^0.9.9",
|
|
132
132
|
"just-clone": "^1.0.2",
|
|
133
|
-
"live-connect-js": "
|
|
133
|
+
"live-connect-js": "^4.0.0"
|
|
134
134
|
},
|
|
135
135
|
"optionalDependencies": {
|
|
136
136
|
"fsevents": "^2.3.2"
|
|
@@ -218,6 +218,14 @@ describe('33acrossBidAdapter:', function () {
|
|
|
218
218
|
return this;
|
|
219
219
|
};
|
|
220
220
|
|
|
221
|
+
this.withReferer = referer => {
|
|
222
|
+
Object.assign(ttxRequest.site, {
|
|
223
|
+
ref: referer
|
|
224
|
+
});
|
|
225
|
+
|
|
226
|
+
return this;
|
|
227
|
+
};
|
|
228
|
+
|
|
221
229
|
this.withSchain = schain => {
|
|
222
230
|
Object.assign(ttxRequest, {
|
|
223
231
|
source: {
|
|
@@ -1187,26 +1195,51 @@ describe('33acrossBidAdapter:', function () {
|
|
|
1187
1195
|
});
|
|
1188
1196
|
});
|
|
1189
1197
|
|
|
1190
|
-
context('when
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1198
|
+
context('when refererInfo values are available', function() {
|
|
1199
|
+
context('when refererInfo.page is defined', function() {
|
|
1200
|
+
it('returns corresponding server requests with site.page set', function() {
|
|
1201
|
+
const bidderRequest = {
|
|
1202
|
+
refererInfo: {
|
|
1203
|
+
page: 'http://foo.com/bar'
|
|
1204
|
+
}
|
|
1205
|
+
};
|
|
1197
1206
|
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1207
|
+
const ttxRequest = new TtxRequestBuilder()
|
|
1208
|
+
.withBanner()
|
|
1209
|
+
.withProduct()
|
|
1210
|
+
.withPageUrl('http://foo.com/bar')
|
|
1211
|
+
.build();
|
|
1212
|
+
const serverRequest = new ServerRequestBuilder()
|
|
1213
|
+
.withData(ttxRequest)
|
|
1214
|
+
.build();
|
|
1206
1215
|
|
|
1207
|
-
|
|
1216
|
+
const [ builtServerRequest ] = spec.buildRequests(bidRequests, bidderRequest);
|
|
1208
1217
|
|
|
1209
|
-
|
|
1218
|
+
validateBuiltServerRequest(builtServerRequest, serverRequest);
|
|
1219
|
+
});
|
|
1220
|
+
});
|
|
1221
|
+
|
|
1222
|
+
context('when refererInfo.ref is defined', function() {
|
|
1223
|
+
it('returns corresponding server requests with site.ref set', function() {
|
|
1224
|
+
const bidderRequest = {
|
|
1225
|
+
refererInfo: {
|
|
1226
|
+
ref: 'google.com'
|
|
1227
|
+
}
|
|
1228
|
+
};
|
|
1229
|
+
|
|
1230
|
+
const ttxRequest = new TtxRequestBuilder()
|
|
1231
|
+
.withBanner()
|
|
1232
|
+
.withProduct()
|
|
1233
|
+
.withReferer('google.com')
|
|
1234
|
+
.build();
|
|
1235
|
+
const serverRequest = new ServerRequestBuilder()
|
|
1236
|
+
.withData(ttxRequest)
|
|
1237
|
+
.build();
|
|
1238
|
+
|
|
1239
|
+
const [ builtServerRequest ] = spec.buildRequests(bidRequests, bidderRequest);
|
|
1240
|
+
|
|
1241
|
+
validateBuiltServerRequest(builtServerRequest, serverRequest);
|
|
1242
|
+
});
|
|
1210
1243
|
});
|
|
1211
1244
|
});
|
|
1212
1245
|
|
|
@@ -1246,7 +1279,7 @@ describe('33acrossBidAdapter:', function () {
|
|
|
1246
1279
|
});
|
|
1247
1280
|
|
|
1248
1281
|
context('when referer value is not available', function() {
|
|
1249
|
-
it('returns corresponding server requests without site.page set', function() {
|
|
1282
|
+
it('returns corresponding server requests without site.page and site.ref set', function() {
|
|
1250
1283
|
const bidderRequest = {
|
|
1251
1284
|
refererInfo: {}
|
|
1252
1285
|
};
|
|
@@ -121,4 +121,52 @@ describe('Admaru Adapter', function () {
|
|
|
121
121
|
expect(result.length).to.equal(0);
|
|
122
122
|
});
|
|
123
123
|
});
|
|
124
|
+
|
|
125
|
+
describe('getUserSyncs()', () => {
|
|
126
|
+
it('should return iframe user sync if iframe sync is enabled', () => {
|
|
127
|
+
const syncs = spec.getUserSyncs(
|
|
128
|
+
{
|
|
129
|
+
pixelEnabled: true,
|
|
130
|
+
iframeEnabled: true,
|
|
131
|
+
},
|
|
132
|
+
null
|
|
133
|
+
);
|
|
134
|
+
|
|
135
|
+
expect(syncs).to.deep.equal([
|
|
136
|
+
{
|
|
137
|
+
type: 'iframe',
|
|
138
|
+
url: 'https://p2.admaru.net/UserSync/sync',
|
|
139
|
+
},
|
|
140
|
+
]);
|
|
141
|
+
});
|
|
142
|
+
|
|
143
|
+
it('should return image syncs if they are enabled and iframe is disabled', () => {
|
|
144
|
+
const syncs = spec.getUserSyncs(
|
|
145
|
+
{
|
|
146
|
+
pixelEnabled: true,
|
|
147
|
+
iframeEnabled: false,
|
|
148
|
+
},
|
|
149
|
+
null
|
|
150
|
+
);
|
|
151
|
+
|
|
152
|
+
expect(syncs).to.deep.equal([
|
|
153
|
+
{
|
|
154
|
+
type: 'image',
|
|
155
|
+
url: 'https://p2.admaru.net/UserSync/sync',
|
|
156
|
+
},
|
|
157
|
+
]);
|
|
158
|
+
});
|
|
159
|
+
|
|
160
|
+
it('should not return user syncs if syncs are disabled', () => {
|
|
161
|
+
const syncs = spec.getUserSyncs(
|
|
162
|
+
{
|
|
163
|
+
pixelEnabled: false,
|
|
164
|
+
iframeEnabled: false,
|
|
165
|
+
},
|
|
166
|
+
null
|
|
167
|
+
);
|
|
168
|
+
|
|
169
|
+
expect(syncs).to.deep.equal([]);
|
|
170
|
+
});
|
|
171
|
+
});
|
|
124
172
|
});
|
|
@@ -13,7 +13,7 @@ const VALID_BIDS = [
|
|
|
13
13
|
params: {
|
|
14
14
|
siteId: '301491',
|
|
15
15
|
publisherId: '3021491',
|
|
16
|
-
placementId: 13144370,
|
|
16
|
+
placementId: '13144370',
|
|
17
17
|
},
|
|
18
18
|
mediaTypes: {
|
|
19
19
|
banner: {
|
|
@@ -26,7 +26,7 @@ const VALID_BIDS = [
|
|
|
26
26
|
params: {
|
|
27
27
|
siteId: '301491',
|
|
28
28
|
publisherId: '3021491',
|
|
29
|
-
placementId: 13144370,
|
|
29
|
+
placementId: '13144370',
|
|
30
30
|
},
|
|
31
31
|
mediaTypes: {
|
|
32
32
|
video: {
|
|
@@ -110,7 +110,7 @@ const INVALID_BIDS = [
|
|
|
110
110
|
},
|
|
111
111
|
params: {
|
|
112
112
|
siteId: '301491',
|
|
113
|
-
placementId: 13144370,
|
|
113
|
+
placementId: '13144370',
|
|
114
114
|
},
|
|
115
115
|
},
|
|
116
116
|
{
|
|
@@ -126,7 +126,7 @@ const INVALID_BIDS = [
|
|
|
126
126
|
},
|
|
127
127
|
params: {
|
|
128
128
|
siteId: '301491',
|
|
129
|
-
placementId: 13144370,
|
|
129
|
+
placementId: '13144370',
|
|
130
130
|
},
|
|
131
131
|
},
|
|
132
132
|
{
|
|
@@ -143,7 +143,7 @@ const INVALID_BIDS = [
|
|
|
143
143
|
},
|
|
144
144
|
params: {
|
|
145
145
|
siteId: '301491',
|
|
146
|
-
placementId: 13144370,
|
|
146
|
+
placementId: '13144370',
|
|
147
147
|
video: {
|
|
148
148
|
size: [480, 40]
|
|
149
149
|
}
|
|
@@ -167,8 +167,8 @@ const DEFAULT_VALID_BANNER_REQUESTS = [
|
|
|
167
167
|
}
|
|
168
168
|
},
|
|
169
169
|
params: {
|
|
170
|
-
siteId: 1,
|
|
171
|
-
placementId: 13144370
|
|
170
|
+
siteId: '1',
|
|
171
|
+
placementId: '13144370'
|
|
172
172
|
},
|
|
173
173
|
src: 'client',
|
|
174
174
|
transactionId: '54a58774-7a41-494e-9aaf-fa7b79164f0c'
|
|
@@ -192,8 +192,8 @@ const DEFAULT_VALID_VIDEO_REQUESTS = [
|
|
|
192
192
|
}
|
|
193
193
|
},
|
|
194
194
|
params: {
|
|
195
|
-
siteId: 1,
|
|
196
|
-
placementId: 13144370
|
|
195
|
+
siteId: '1',
|
|
196
|
+
placementId: '13144370'
|
|
197
197
|
},
|
|
198
198
|
src: 'client',
|
|
199
199
|
transactionId: '54a58774-7a41-494e-9aaf-fa7b79164f0c'
|
|
@@ -289,14 +289,25 @@ const WIN_NOTICE = {
|
|
|
289
289
|
'hb_size': '300x250',
|
|
290
290
|
'hb_source': 'client',
|
|
291
291
|
'hb_format': 'banner',
|
|
292
|
-
'hb_adomain': '
|
|
292
|
+
'hb_adomain': 'example.com'
|
|
293
293
|
},
|
|
294
|
+
|
|
294
295
|
'auctionId': '85864730-6cbc-4e56-bc3c-a4a6596dca5b',
|
|
295
296
|
'currency': [
|
|
296
297
|
'USD'
|
|
297
298
|
],
|
|
298
299
|
'mediaType': 'banner',
|
|
300
|
+
'advertiserDomains': [
|
|
301
|
+
'abc.com'
|
|
302
|
+
],
|
|
299
303
|
'size': '300x250',
|
|
304
|
+
'params': [
|
|
305
|
+
{
|
|
306
|
+
'placementId': '13144370',
|
|
307
|
+
'siteId': '23434',
|
|
308
|
+
'publisherId': '7689670753'
|
|
309
|
+
}
|
|
310
|
+
],
|
|
300
311
|
'width': 300,
|
|
301
312
|
'height': 250,
|
|
302
313
|
'status': 'rendered',
|
|
@@ -365,6 +376,62 @@ describe('Aidem adapter', () => {
|
|
|
365
376
|
deepSetValue(validVideoRequest.params, 'video.size', [640, 480])
|
|
366
377
|
expect(spec.isBidRequestValid(validVideoRequest)).to.be.true
|
|
367
378
|
});
|
|
379
|
+
|
|
380
|
+
it('BANNER: should return true if rateLimit is 1', function () {
|
|
381
|
+
// spec.isBidRequestValid()
|
|
382
|
+
const validBannerRequest = utils.deepClone(VALID_BIDS[0])
|
|
383
|
+
deepSetValue(validBannerRequest.params, 'rateLimit', 1)
|
|
384
|
+
expect(spec.isBidRequestValid(validBannerRequest)).to.be.true
|
|
385
|
+
});
|
|
386
|
+
|
|
387
|
+
it('BANNER: should return false if rateLimit is 0', function () {
|
|
388
|
+
// spec.isBidRequestValid()
|
|
389
|
+
const validBannerRequest = utils.deepClone(VALID_BIDS[0])
|
|
390
|
+
deepSetValue(validBannerRequest.params, 'rateLimit', 0)
|
|
391
|
+
expect(spec.isBidRequestValid(validBannerRequest)).to.be.false
|
|
392
|
+
});
|
|
393
|
+
|
|
394
|
+
it('BANNER: should return false if rateLimit is not between 0 and 1', function () {
|
|
395
|
+
// spec.isBidRequestValid()
|
|
396
|
+
const validBannerRequest = utils.deepClone(VALID_BIDS[0])
|
|
397
|
+
deepSetValue(validBannerRequest.params, 'rateLimit', 1.2)
|
|
398
|
+
expect(spec.isBidRequestValid(validBannerRequest)).to.be.false
|
|
399
|
+
});
|
|
400
|
+
|
|
401
|
+
it('BANNER: should return false if rateLimit is not a number', function () {
|
|
402
|
+
// spec.isBidRequestValid()
|
|
403
|
+
const validBannerRequest = utils.deepClone(VALID_BIDS[0])
|
|
404
|
+
deepSetValue(validBannerRequest.params, 'rateLimit', '0.5')
|
|
405
|
+
expect(spec.isBidRequestValid(validBannerRequest)).to.be.false
|
|
406
|
+
});
|
|
407
|
+
|
|
408
|
+
it('VIDEO: should return true if rateLimit is 1', function () {
|
|
409
|
+
// spec.isBidRequestValid()
|
|
410
|
+
const validVideoRequest = utils.deepClone(VALID_BIDS[1])
|
|
411
|
+
deepSetValue(validVideoRequest.params, 'rateLimit', 1)
|
|
412
|
+
expect(spec.isBidRequestValid(validVideoRequest)).to.be.true
|
|
413
|
+
});
|
|
414
|
+
|
|
415
|
+
it('VIDEO: should return false if rateLimit is 0', function () {
|
|
416
|
+
// spec.isBidRequestValid()
|
|
417
|
+
const validVideoRequest = utils.deepClone(VALID_BIDS[1])
|
|
418
|
+
deepSetValue(validVideoRequest.params, 'rateLimit', 0)
|
|
419
|
+
expect(spec.isBidRequestValid(validVideoRequest)).to.be.false
|
|
420
|
+
});
|
|
421
|
+
|
|
422
|
+
it('VIDEO: should return false if rateLimit is not between 0 and 1', function () {
|
|
423
|
+
// spec.isBidRequestValid()
|
|
424
|
+
const validBannerRequest = utils.deepClone(VALID_BIDS[1])
|
|
425
|
+
deepSetValue(validBannerRequest.params, 'rateLimit', 1.2)
|
|
426
|
+
expect(spec.isBidRequestValid(validBannerRequest)).to.be.false
|
|
427
|
+
});
|
|
428
|
+
|
|
429
|
+
it('VIDEO: should return false if rateLimit is not a number', function () {
|
|
430
|
+
// spec.isBidRequestValid()
|
|
431
|
+
const validBannerRequest = utils.deepClone(VALID_BIDS[1])
|
|
432
|
+
deepSetValue(validBannerRequest.params, 'rateLimit', '0.5')
|
|
433
|
+
expect(spec.isBidRequestValid(validBannerRequest)).to.be.false
|
|
434
|
+
});
|
|
368
435
|
});
|
|
369
436
|
|
|
370
437
|
describe('buildRequests', () => {
|
|
@@ -45,6 +45,26 @@ describe('AjaAdapter', function () {
|
|
|
45
45
|
bidId: '30b31c1838de1e',
|
|
46
46
|
bidderRequestId: '22edbae2733bf6',
|
|
47
47
|
auctionId: '1d1a030790a475',
|
|
48
|
+
ortb2: {
|
|
49
|
+
device: {
|
|
50
|
+
sua: {
|
|
51
|
+
source: 2,
|
|
52
|
+
platform: {
|
|
53
|
+
brand: 'Android',
|
|
54
|
+
version: ['8', '0', '0']
|
|
55
|
+
},
|
|
56
|
+
browsers: [
|
|
57
|
+
{brand: 'Not_A Brand', version: ['99', '0', '0', '0']},
|
|
58
|
+
{brand: 'Google Chrome', version: ['109', '0', '5414', '119']},
|
|
59
|
+
{brand: 'Chromium', version: ['109', '0', '5414', '119']}
|
|
60
|
+
],
|
|
61
|
+
mobile: 1,
|
|
62
|
+
model: 'SM-G955U',
|
|
63
|
+
bitness: '64',
|
|
64
|
+
architecture: ''
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
}
|
|
48
68
|
}
|
|
49
69
|
];
|
|
50
70
|
|
|
@@ -58,7 +78,7 @@ describe('AjaAdapter', function () {
|
|
|
58
78
|
const requests = spec.buildRequests(bidRequests, bidderRequest);
|
|
59
79
|
expect(requests[0].url).to.equal(ENDPOINT);
|
|
60
80
|
expect(requests[0].method).to.equal('GET');
|
|
61
|
-
expect(requests[0].data).to.equal('asi=123456&skt=5&prebid_id=30b31c1838de1e&prebid_ver=$prebid.version$&page_url=https%3A%2F%2Fhoge.com&');
|
|
81
|
+
expect(requests[0].data).to.equal('asi=123456&skt=5&prebid_id=30b31c1838de1e&prebid_ver=$prebid.version$&page_url=https%3A%2F%2Fhoge.com&sua=%7B%22source%22%3A2%2C%22platform%22%3A%7B%22brand%22%3A%22Android%22%2C%22version%22%3A%5B%228%22%2C%220%22%2C%220%22%5D%7D%2C%22browsers%22%3A%5B%7B%22brand%22%3A%22Not_A%20Brand%22%2C%22version%22%3A%5B%2299%22%2C%220%22%2C%220%22%2C%220%22%5D%7D%2C%7B%22brand%22%3A%22Google%20Chrome%22%2C%22version%22%3A%5B%22109%22%2C%220%22%2C%225414%22%2C%22119%22%5D%7D%2C%7B%22brand%22%3A%22Chromium%22%2C%22version%22%3A%5B%22109%22%2C%220%22%2C%225414%22%2C%22119%22%5D%7D%5D%2C%22mobile%22%3A1%2C%22model%22%3A%22SM-G955U%22%2C%22bitness%22%3A%2264%22%2C%22architecture%22%3A%22%22%7D&');
|
|
62
82
|
});
|
|
63
83
|
});
|
|
64
84
|
|
|
@@ -84,7 +84,7 @@ describe('AolAdapter', function () {
|
|
|
84
84
|
'admixer.net': '100',
|
|
85
85
|
'adserver.org': '200',
|
|
86
86
|
'adtelligent.com': '300',
|
|
87
|
-
'
|
|
87
|
+
'amxdt.net': '500',
|
|
88
88
|
'audigent.com': '600',
|
|
89
89
|
'britepool.com': '700',
|
|
90
90
|
'criteo.com': '800',
|
|
@@ -110,7 +110,7 @@ describe('AolAdapter', function () {
|
|
|
110
110
|
const USER_ID_DATA = {
|
|
111
111
|
admixerId: SUPPORTED_USER_ID_SOURCES['admixer.net'],
|
|
112
112
|
adtelligentId: SUPPORTED_USER_ID_SOURCES['adtelligent.com'],
|
|
113
|
-
amxId: SUPPORTED_USER_ID_SOURCES['
|
|
113
|
+
amxId: SUPPORTED_USER_ID_SOURCES['amxdt.net'],
|
|
114
114
|
britepoolid: SUPPORTED_USER_ID_SOURCES['britepool.com'],
|
|
115
115
|
criteoId: SUPPORTED_USER_ID_SOURCES['criteo.com'],
|
|
116
116
|
connectid: SUPPORTED_USER_ID_SOURCES['verizonmedia.com'],
|