prebid.js 6.1.0 → 6.2.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/README.md +1 -1
- package/browsers.json +13 -29
- package/karma.conf.maker.js +1 -1
- package/modules/admixerBidAdapter.js +2 -1
- package/modules/adnuntiusBidAdapter.js +2 -1
- package/modules/adplusBidAdapter.js +203 -0
- package/modules/adplusBidAdapter.md +39 -0
- package/modules/adyoulikeBidAdapter.js +7 -2
- package/modules/appnexusBidAdapter.js +19 -2
- package/modules/beachfrontBidAdapter.js +14 -17
- package/modules/craftBidAdapter.js +5 -3
- package/modules/dchain.js +149 -0
- package/modules/dchain.md +45 -0
- package/modules/emx_digitalBidAdapter.js +9 -1
- package/modules/freewheel-sspBidAdapter.js +6 -0
- package/modules/goldbachBidAdapter.js +1176 -0
- package/modules/goldbachBidAdapter.md +151 -0
- package/modules/gumgumBidAdapter.js +5 -1
- package/modules/intersectionRtdProvider.js +114 -0
- package/modules/invibesBidAdapter.js +15 -9
- package/modules/ipromBidAdapter.js +79 -0
- package/modules/limelightDigitalBidAdapter.js +2 -1
- package/modules/luponmediaBidAdapter.js +570 -0
- package/modules/missenaBidAdapter.js +89 -0
- package/modules/pubmaticBidAdapter.js +3 -3
- package/modules/relaidoBidAdapter.js +86 -65
- package/modules/richaudienceBidAdapter.js +1 -1
- package/modules/smaatoBidAdapter.js +4 -1
- package/modules/smartxBidAdapter.js +17 -1
- package/modules/tappxBidAdapter.js +3 -1
- package/modules/undertoneBidAdapter.js +8 -1
- package/modules/userId/index.js +27 -2
- package/modules/ventes.md +71 -0
- package/modules/ventesBidAdapter.js +104 -64
- package/modules/ventesBidAdapter.md +0 -1
- package/modules/visxBidAdapter.js +19 -2
- package/modules/visxBidAdapter.md +4 -6
- package/modules/yahoosspBidAdapter.md +1 -1
- package/modules/yieldoneBidAdapter.js +115 -11
- package/package.json +1 -1
- package/src/auction.js +3 -2
- package/src/targeting.js +2 -2
- package/src/utils.js +7 -0
- package/test/spec/integration/faker/googletag.js +6 -0
- package/test/spec/modules/adnuntiusBidAdapter_spec.js +18 -0
- package/test/spec/modules/adplusBidAdapter_spec.js +213 -0
- package/test/spec/modules/adyoulikeBidAdapter_spec.js +26 -0
- package/test/spec/modules/appnexusBidAdapter_spec.js +49 -1
- package/test/spec/modules/beachfrontBidAdapter_spec.js +65 -1
- package/test/spec/modules/dchain_spec.js +329 -0
- package/test/spec/modules/emx_digitalBidAdapter_spec.js +10 -0
- package/test/spec/modules/freewheel-sspBidAdapter_spec.js +19 -0
- package/test/spec/modules/goldbachBidAdapter_spec.js +1359 -0
- package/test/spec/modules/gumgumBidAdapter_spec.js +6 -0
- package/test/spec/modules/intersectionRtdProvider_spec.js +141 -0
- package/test/spec/modules/invibesBidAdapter_spec.js +29 -4
- package/test/spec/modules/ipromBidAdapter_spec.js +195 -0
- package/test/spec/modules/limelightDigitalBidAdapter_spec.js +10 -7
- package/test/spec/modules/luponmediaBidAdapter_spec.js +412 -0
- package/test/spec/modules/missenaBidAdapter_spec.js +134 -0
- package/test/spec/modules/pubmaticBidAdapter_spec.js +1 -1
- package/test/spec/modules/relaidoBidAdapter_spec.js +71 -63
- package/test/spec/modules/smaatoBidAdapter_spec.js +31 -0
- package/test/spec/modules/smartxBidAdapter_spec.js +9 -0
- package/test/spec/modules/tappxBidAdapter_spec.js +4 -0
- package/test/spec/modules/userId_spec.js +51 -0
- package/test/spec/modules/visxBidAdapter_spec.js +120 -4
- package/test/spec/modules/yieldoneBidAdapter_spec.js +299 -53
- package/test/spec/unit/core/targeting_spec.js +44 -0
|
@@ -6,7 +6,7 @@ import { getStorageManager } from '../src/storageManager.js';
|
|
|
6
6
|
|
|
7
7
|
const BIDDER_CODE = 'relaido';
|
|
8
8
|
const BIDDER_DOMAIN = 'api.relaido.jp';
|
|
9
|
-
const ADAPTER_VERSION = '1.0.
|
|
9
|
+
const ADAPTER_VERSION = '1.0.7';
|
|
10
10
|
const DEFAULT_TTL = 300;
|
|
11
11
|
const UUID_KEY = 'relaido_uuid';
|
|
12
12
|
|
|
@@ -31,14 +31,14 @@ function isBidRequestValid(bid) {
|
|
|
31
31
|
}
|
|
32
32
|
|
|
33
33
|
function buildRequests(validBidRequests, bidderRequest) {
|
|
34
|
-
|
|
34
|
+
const bids = [];
|
|
35
|
+
let imuid = null;
|
|
36
|
+
let bidDomain = null;
|
|
37
|
+
let bidder = null;
|
|
38
|
+
let count = null;
|
|
35
39
|
|
|
36
40
|
for (let i = 0; i < validBidRequests.length; i++) {
|
|
37
41
|
const bidRequest = validBidRequests[i];
|
|
38
|
-
const placementId = getBidIdParameter('placementId', bidRequest.params);
|
|
39
|
-
const bidDomain = bidRequest.params.domain || BIDDER_DOMAIN;
|
|
40
|
-
const bidUrl = `https://${bidDomain}/bid/v1/prebid/${placementId}`;
|
|
41
|
-
const uuid = getUuid();
|
|
42
42
|
let mediaType = '';
|
|
43
43
|
let width = 0;
|
|
44
44
|
let height = 0;
|
|
@@ -55,46 +55,63 @@ function buildRequests(validBidRequests, bidderRequest) {
|
|
|
55
55
|
mediaType = BANNER;
|
|
56
56
|
}
|
|
57
57
|
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
58
|
+
if (!imuid) {
|
|
59
|
+
const pickImuid = deepAccess(bidRequest, 'userId.imuid');
|
|
60
|
+
if (pickImuid) {
|
|
61
|
+
imuid = pickImuid;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
if (!bidDomain) {
|
|
66
|
+
bidDomain = bidRequest.params.domain;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
if (!bidder) {
|
|
70
|
+
bidder = bidRequest.bidder
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
if (!bidder) {
|
|
74
|
+
bidder = bidRequest.bidder
|
|
75
|
+
}
|
|
74
76
|
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
payload.imuid = imuid;
|
|
77
|
+
if (!count) {
|
|
78
|
+
count = bidRequest.bidRequestsCount;
|
|
78
79
|
}
|
|
79
80
|
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
options: {
|
|
88
|
-
withCredentials: true
|
|
89
|
-
},
|
|
90
|
-
bidId: bidRequest.bidId,
|
|
81
|
+
bids.push({
|
|
82
|
+
bid_id: bidRequest.bidId,
|
|
83
|
+
placement_id: getBidIdParameter('placementId', bidRequest.params),
|
|
84
|
+
transaction_id: bidRequest.transactionId,
|
|
85
|
+
bidder_request_id: bidRequest.bidderRequestId,
|
|
86
|
+
ad_unit_code: bidRequest.adUnitCode,
|
|
87
|
+
auction_id: bidRequest.auctionId,
|
|
91
88
|
player: bidRequest.params.player,
|
|
92
|
-
width:
|
|
93
|
-
height:
|
|
94
|
-
|
|
89
|
+
width: width,
|
|
90
|
+
height: height,
|
|
91
|
+
media_type: mediaType
|
|
95
92
|
});
|
|
96
93
|
}
|
|
97
|
-
|
|
94
|
+
|
|
95
|
+
const data = JSON.stringify({
|
|
96
|
+
version: ADAPTER_VERSION,
|
|
97
|
+
bids: bids,
|
|
98
|
+
timeout_ms: bidderRequest.timeout,
|
|
99
|
+
bidder: bidder,
|
|
100
|
+
bid_requests_count: count,
|
|
101
|
+
uuid: getUuid(),
|
|
102
|
+
pv: '$prebid.version$',
|
|
103
|
+
imuid: imuid,
|
|
104
|
+
ref: bidderRequest.refererInfo.referer
|
|
105
|
+
})
|
|
106
|
+
|
|
107
|
+
return {
|
|
108
|
+
method: 'POST',
|
|
109
|
+
url: `https://${bidDomain || BIDDER_DOMAIN}/bid/v1/sprebid`,
|
|
110
|
+
options: {
|
|
111
|
+
withCredentials: true
|
|
112
|
+
},
|
|
113
|
+
data: data
|
|
114
|
+
};
|
|
98
115
|
}
|
|
99
116
|
|
|
100
117
|
function interpretResponse(serverResponse, bidRequest) {
|
|
@@ -105,34 +122,38 @@ function interpretResponse(serverResponse, bidRequest) {
|
|
|
105
122
|
}
|
|
106
123
|
|
|
107
124
|
const playerUrl = bidRequest.player || body.playerUrl;
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
125
|
+
|
|
126
|
+
for (const res of body.ads) {
|
|
127
|
+
let bidResponse = {
|
|
128
|
+
requestId: res.bidId,
|
|
129
|
+
width: res.width,
|
|
130
|
+
height: res.height,
|
|
131
|
+
cpm: res.price,
|
|
132
|
+
currency: res.currency,
|
|
133
|
+
creativeId: res.creativeId,
|
|
134
|
+
dealId: body.dealId || '',
|
|
135
|
+
ttl: body.ttl || DEFAULT_TTL,
|
|
136
|
+
netRevenue: true,
|
|
137
|
+
mediaType: res.mediaType || VIDEO,
|
|
138
|
+
meta: {
|
|
139
|
+
advertiserDomains: res.adomain || [],
|
|
140
|
+
mediaType: VIDEO
|
|
141
|
+
}
|
|
142
|
+
};
|
|
143
|
+
|
|
144
|
+
if (bidResponse.mediaType === VIDEO) {
|
|
145
|
+
bidResponse.vastXml = res.vast;
|
|
146
|
+
bidResponse.renderer = newRenderer(res.bidId, playerUrl);
|
|
147
|
+
} else {
|
|
148
|
+
const playerTag = createPlayerTag(playerUrl);
|
|
149
|
+
const renderTag = createRenderTag(res.width, res.height, res.vast);
|
|
150
|
+
bidResponse.ad = `<div id="rop-prebid">${playerTag}${renderTag}</div>`;
|
|
124
151
|
}
|
|
125
|
-
|
|
126
|
-
if (mediaType === VIDEO) {
|
|
127
|
-
bidResponse.vastXml = body.vast;
|
|
128
|
-
bidResponse.renderer = newRenderer(bidRequest.bidId, playerUrl);
|
|
129
|
-
} else {
|
|
130
|
-
const playerTag = createPlayerTag(playerUrl);
|
|
131
|
-
const renderTag = createRenderTag(bidRequest.width, bidRequest.height, body.vast);
|
|
132
|
-
bidResponse.ad = `<div id="rop-prebid">${playerTag}${renderTag}</div>`;
|
|
152
|
+
bidResponses.push(bidResponse);
|
|
133
153
|
}
|
|
134
|
-
bidResponses.push(bidResponse);
|
|
135
154
|
|
|
155
|
+
// eslint-disable-next-line no-console
|
|
156
|
+
console.log(JSON.stringify(bidResponses));
|
|
136
157
|
return bidResponses;
|
|
137
158
|
}
|
|
138
159
|
|
|
@@ -296,7 +296,7 @@ function raiGetFloor(bid, config) {
|
|
|
296
296
|
} else if (typeof bid.getFloor == 'function') {
|
|
297
297
|
let floorSpec = bid.getFloor({
|
|
298
298
|
currency: config.getConfig('currency.adServerCurrency'),
|
|
299
|
-
mediaType: bid.
|
|
299
|
+
mediaType: typeof bid.mediaTypes['banner'] == 'object' ? 'banner' : 'video',
|
|
300
300
|
size: '*'
|
|
301
301
|
})
|
|
302
302
|
|
|
@@ -5,7 +5,7 @@ import {ADPOD, BANNER, VIDEO} from '../src/mediaTypes.js';
|
|
|
5
5
|
|
|
6
6
|
const BIDDER_CODE = 'smaato';
|
|
7
7
|
const SMAATO_ENDPOINT = 'https://prebid.ad.smaato.net/oapi/prebid';
|
|
8
|
-
const SMAATO_CLIENT = 'prebid_js_$prebid.version$_1.
|
|
8
|
+
const SMAATO_CLIENT = 'prebid_js_$prebid.version$_1.6'
|
|
9
9
|
const CURRENCY = 'USD';
|
|
10
10
|
|
|
11
11
|
const buildOpenRtbBidRequest = (bidRequest, bidderRequest) => {
|
|
@@ -304,6 +304,7 @@ function createBannerImp(bidRequest) {
|
|
|
304
304
|
id: bidRequest.bidId,
|
|
305
305
|
tagid: deepAccess(bidRequest, 'params.adspaceId'),
|
|
306
306
|
bidfloor: getBidFloor(bidRequest, BANNER, adUnitSizes),
|
|
307
|
+
instl: deepAccess(bidRequest.ortb2Imp, 'instl'),
|
|
307
308
|
banner: {
|
|
308
309
|
w: sizes[0].w,
|
|
309
310
|
h: sizes[0].h,
|
|
@@ -319,6 +320,7 @@ function createVideoImp(bidRequest, videoMediaType) {
|
|
|
319
320
|
id: bidRequest.bidId,
|
|
320
321
|
tagid: deepAccess(bidRequest, 'params.adspaceId'),
|
|
321
322
|
bidfloor: getBidFloor(bidRequest, VIDEO, videoMediaType.playerSize),
|
|
323
|
+
instl: deepAccess(bidRequest.ortb2Imp, 'instl'),
|
|
322
324
|
video: {
|
|
323
325
|
mimes: videoMediaType.mimes,
|
|
324
326
|
minduration: videoMediaType.minduration,
|
|
@@ -346,6 +348,7 @@ function createAdPodImp(bidRequest, videoMediaType) {
|
|
|
346
348
|
id: bidRequest.bidId,
|
|
347
349
|
tagid: tagid,
|
|
348
350
|
bidfloor: getBidFloor(bidRequest, VIDEO, videoMediaType.playerSize),
|
|
351
|
+
instl: deepAccess(bidRequest.ortb2Imp, 'instl'),
|
|
349
352
|
video: {
|
|
350
353
|
w: videoMediaType.playerSize[0][0],
|
|
351
354
|
h: videoMediaType.playerSize[0][1],
|
|
@@ -161,11 +161,20 @@ export const spec = {
|
|
|
161
161
|
domain: domain,
|
|
162
162
|
publisher: {
|
|
163
163
|
id: publisherId
|
|
164
|
+
},
|
|
165
|
+
content: {
|
|
166
|
+
ext: {
|
|
167
|
+
prebid: {
|
|
168
|
+
name: 'pbjs',
|
|
169
|
+
version: '$prebid.version$'
|
|
170
|
+
}
|
|
171
|
+
}
|
|
164
172
|
}
|
|
165
173
|
},
|
|
166
174
|
device: device,
|
|
167
175
|
at: at,
|
|
168
|
-
cur: cur
|
|
176
|
+
cur: cur,
|
|
177
|
+
ext: {}
|
|
169
178
|
};
|
|
170
179
|
|
|
171
180
|
const userExt = {};
|
|
@@ -194,6 +203,8 @@ export const spec = {
|
|
|
194
203
|
};
|
|
195
204
|
}
|
|
196
205
|
|
|
206
|
+
// requestPayload.user.ext.ver = pbjs.version;
|
|
207
|
+
|
|
197
208
|
// Targeting
|
|
198
209
|
if (getBidIdParameter('data', bid.params.user)) {
|
|
199
210
|
var targetingarr = [];
|
|
@@ -336,6 +347,7 @@ function createOutstreamConfig(bid) {
|
|
|
336
347
|
let confTitle = getBidIdParameter('title', bid.renderer.config.outstream_options);
|
|
337
348
|
let confSkipOffset = getBidIdParameter('skipOffset', bid.renderer.config.outstream_options);
|
|
338
349
|
let confDesiredBitrate = getBidIdParameter('desiredBitrate', bid.renderer.config.outstream_options);
|
|
350
|
+
let confVisibilityThreshold = getBidIdParameter('visibilityThreshold', bid.renderer.config.outstream_options);
|
|
339
351
|
let elementId = getBidIdParameter('slot', bid.renderer.config.outstream_options) || bid.adUnitCode;
|
|
340
352
|
|
|
341
353
|
logMessage('[SMARTX][renderer] Handle SmartX outstream renderer');
|
|
@@ -384,6 +396,10 @@ function createOutstreamConfig(bid) {
|
|
|
384
396
|
smartPlayObj.desiredBitrate = confDesiredBitrate;
|
|
385
397
|
}
|
|
386
398
|
|
|
399
|
+
if (confVisibilityThreshold) {
|
|
400
|
+
smartPlayObj.visibilityThreshold = confVisibilityThreshold;
|
|
401
|
+
}
|
|
402
|
+
|
|
387
403
|
smartPlayObj.adResponse = bid.vastContent;
|
|
388
404
|
|
|
389
405
|
const divID = '[id="' + elementId + '"]';
|
|
@@ -7,9 +7,10 @@ import { config } from '../src/config.js';
|
|
|
7
7
|
import { Renderer } from '../src/Renderer.js';
|
|
8
8
|
|
|
9
9
|
const BIDDER_CODE = 'tappx';
|
|
10
|
+
const GVLID_CODE = 628;
|
|
10
11
|
const TTL = 360;
|
|
11
12
|
const CUR = 'USD';
|
|
12
|
-
const TAPPX_BIDDER_VERSION = '0.1.
|
|
13
|
+
const TAPPX_BIDDER_VERSION = '0.1.1005';
|
|
13
14
|
const TYPE_CNN = 'prebidjs';
|
|
14
15
|
const LOG_PREFIX = '[TAPPX]: ';
|
|
15
16
|
const VIDEO_SUPPORT = ['instream', 'outstream'];
|
|
@@ -42,6 +43,7 @@ var hostDomain;
|
|
|
42
43
|
|
|
43
44
|
export const spec = {
|
|
44
45
|
code: BIDDER_CODE,
|
|
46
|
+
gvlid: GVLID_CODE,
|
|
45
47
|
supportedMediaTypes: [BANNER, VIDEO],
|
|
46
48
|
|
|
47
49
|
/**
|
|
@@ -98,9 +98,16 @@ export const spec = {
|
|
|
98
98
|
'commons': commons
|
|
99
99
|
};
|
|
100
100
|
const referer = bidderRequest.refererInfo.referer;
|
|
101
|
+
const canonicalUrl = getCanonicalUrl();
|
|
102
|
+
if (referer) {
|
|
103
|
+
commons.referrer = referer;
|
|
104
|
+
}
|
|
105
|
+
if (canonicalUrl) {
|
|
106
|
+
commons.canonicalUrl = canonicalUrl;
|
|
107
|
+
}
|
|
101
108
|
const hostname = parseUrl(referer).hostname;
|
|
102
109
|
let domain = extractDomainFromHost(hostname);
|
|
103
|
-
const pageUrl =
|
|
110
|
+
const pageUrl = canonicalUrl || referer;
|
|
104
111
|
|
|
105
112
|
const pubid = validBidRequests[0].params.publisherId;
|
|
106
113
|
let reqUrl = `${URL}?pid=${pubid}&domain=${domain}`;
|
package/modules/userId/index.js
CHANGED
|
@@ -141,7 +141,7 @@ import { createEidsArray, buildEidPermissions } from './eids.js';
|
|
|
141
141
|
import { getCoreStorageManager } from '../../src/storageManager.js';
|
|
142
142
|
import {
|
|
143
143
|
getPrebidInternal, isPlainObject, logError, isArray, cyrb53Hash, deepAccess, timestamp, delayExecution, logInfo, isFn,
|
|
144
|
-
logWarn, isEmptyStr, isNumber
|
|
144
|
+
logWarn, isEmptyStr, isNumber, isGptPubadsDefined
|
|
145
145
|
} from '../../src/utils.js';
|
|
146
146
|
import includes from 'core-js-pure/features/array/includes.js';
|
|
147
147
|
|
|
@@ -184,6 +184,9 @@ export let syncDelay;
|
|
|
184
184
|
/** @type {(number|undefined)} */
|
|
185
185
|
export let auctionDelay;
|
|
186
186
|
|
|
187
|
+
/** @type {(string|undefined)} */
|
|
188
|
+
let ppidSource;
|
|
189
|
+
|
|
187
190
|
/** @param {Submodule[]} submodules */
|
|
188
191
|
export function setSubmoduleRegistry(submodules) {
|
|
189
192
|
submoduleRegistry = submodules;
|
|
@@ -557,6 +560,26 @@ export function requestBidsHook(fn, reqBidsConfigObj) {
|
|
|
557
560
|
initializeSubmodulesAndExecuteCallbacks(function () {
|
|
558
561
|
// pass available user id data to bid adapters
|
|
559
562
|
addIdDataToAdUnitBids(reqBidsConfigObj.adUnits || getGlobal().adUnits, initializedSubmodules);
|
|
563
|
+
|
|
564
|
+
// userSync.ppid should be one of the 'source' values in getUserIdsAsEids() eg pubcid.org or id5-sync.com
|
|
565
|
+
const matchingUserId = ppidSource && (getUserIdsAsEids() || []).find(userID => userID.source === ppidSource);
|
|
566
|
+
if (matchingUserId && typeof deepAccess(matchingUserId, 'uids.0.id') === 'string') {
|
|
567
|
+
const ppidValue = matchingUserId.uids[0].id.replace(/[\W_]/g, '');
|
|
568
|
+
if (ppidValue.length >= 32 && ppidValue.length <= 150) {
|
|
569
|
+
if (isGptPubadsDefined()) {
|
|
570
|
+
window.googletag.pubads().setPublisherProvidedId(ppidValue);
|
|
571
|
+
} else {
|
|
572
|
+
window.googletag = window.googletag || {};
|
|
573
|
+
window.googletag.cmd = window.googletag.cmd || [];
|
|
574
|
+
window.googletag.cmd.push(function() {
|
|
575
|
+
window.googletag.pubads().setPublisherProvidedId(ppidValue);
|
|
576
|
+
});
|
|
577
|
+
}
|
|
578
|
+
} else {
|
|
579
|
+
logWarn(`User ID - Googletag Publisher Provided ID for ${ppidSource} is not between 32 and 150 characters - ${ppidValue}`);
|
|
580
|
+
}
|
|
581
|
+
}
|
|
582
|
+
|
|
560
583
|
// calling fn allows prebid to continue processing
|
|
561
584
|
fn.call(this, reqBidsConfigObj);
|
|
562
585
|
});
|
|
@@ -817,6 +840,7 @@ export function attachIdSystem(submodule) {
|
|
|
817
840
|
* @param {{getConfig:function}} config
|
|
818
841
|
*/
|
|
819
842
|
export function init(config) {
|
|
843
|
+
ppidSource = undefined;
|
|
820
844
|
submodules = [];
|
|
821
845
|
configRegistry = [];
|
|
822
846
|
addedUserIdHook = false;
|
|
@@ -839,9 +863,10 @@ export function init(config) {
|
|
|
839
863
|
}
|
|
840
864
|
|
|
841
865
|
// listen for config userSyncs to be set
|
|
842
|
-
config.getConfig(conf => {
|
|
866
|
+
config.getConfig('userSync', conf => {
|
|
843
867
|
// Note: support for 'usersync' was dropped as part of Prebid.js 4.0
|
|
844
868
|
const userSync = conf.userSync;
|
|
869
|
+
ppidSource = userSync.ppid;
|
|
845
870
|
if (userSync && userSync.userIds) {
|
|
846
871
|
configRegistry = userSync.userIds;
|
|
847
872
|
syncDelay = isNumber(userSync.syncDelay) ? userSync.syncDelay : DEFAULT_SYNC_DELAY;
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
---
|
|
2
|
+
layout: bidder
|
|
3
|
+
title: ventes
|
|
4
|
+
description: Prebid ventes Bidder Adapter
|
|
5
|
+
pbjs: false
|
|
6
|
+
biddercode: ventes
|
|
7
|
+
gdpr_supported: false
|
|
8
|
+
usp_supported: false
|
|
9
|
+
media_types: banner
|
|
10
|
+
coppa_supported: false
|
|
11
|
+
schain_supported: false
|
|
12
|
+
dchain_supported: false
|
|
13
|
+
prebid_member: false
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
### BidParams
|
|
17
|
+
{: .table .table-bordered .table-striped }
|
|
18
|
+
| Name | Scope | Description | Example | Type |
|
|
19
|
+
|-----------------|----------|-----------------------------------------------------------|----------------------------------------------|---------------|
|
|
20
|
+
| `placementId` | required | Placement ID from Ventes Avenues | `'VA-062-0013-0183'` | `string` |
|
|
21
|
+
| `publisherId` | required | Publisher ID from Ventes Avenues | `'VA-062'` | `string` |
|
|
22
|
+
| `user` | optional | Object that specifies information about an external user. | `user: { age: 25, gender: 0, dnt: true}` | `object` |
|
|
23
|
+
| `app` | optional | Object containing mobile app parameters. | `app : { id: 'app-id'}` | `object` |
|
|
24
|
+
|
|
25
|
+
#### User Object
|
|
26
|
+
|
|
27
|
+
{: .table .table-bordered .table-striped }
|
|
28
|
+
| Name | Description | Example | Type |
|
|
29
|
+
|-------------------|-------------------------------------------------------------------------------------------|-----------------------|-----------------------|
|
|
30
|
+
| `age` | The age of the user. | `35` | `integer` |
|
|
31
|
+
| `externalUid` | Specifies a string that corresponds to an external user ID for this user. | `'1234567890abcdefg'` | `string` |
|
|
32
|
+
| `segments` | Specifies the segments to which the user belongs. | `[1, 2]` | `Array<integer>` |
|
|
33
|
+
| `gender` | Specifies the gender of the user. Allowed values: Unknown: `0`; Male: `1`; Female: `2` | `1` | `integer` |
|
|
34
|
+
| `dnt` | Do not track flag. Indicates if tracking cookies should be disabled for this auction | `true` | `boolean` |
|
|
35
|
+
| `language` | Two-letter ANSI code for this user's language. | `EN` | `string` |
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
### Ad Unit Setup for Banner
|
|
39
|
+
```javascript
|
|
40
|
+
var adUnits = [
|
|
41
|
+
{
|
|
42
|
+
code: 'test-hb-ad-11111-1',
|
|
43
|
+
mediaTypes: {
|
|
44
|
+
banner: {
|
|
45
|
+
sizes: [
|
|
46
|
+
[300, 250]
|
|
47
|
+
]
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
bids: [{
|
|
51
|
+
bidder: 'ventes',
|
|
52
|
+
params: {
|
|
53
|
+
placementId: 'VA-062-0013-0183',
|
|
54
|
+
publisherId: '5cebea3c9eea646c7b623d5e',
|
|
55
|
+
IABCategories: "['IAB1', 'IAB5']",
|
|
56
|
+
device:{
|
|
57
|
+
ip: '123.145.167.189',
|
|
58
|
+
ifa:"AEBE52E7-03EE-455A-B3C4-E57283966239",
|
|
59
|
+
},
|
|
60
|
+
app: {
|
|
61
|
+
id: "agltb3B1Yi1pbmNyDAsSA0FwcBiJkfIUDA",
|
|
62
|
+
name: "Yahoo Weather",
|
|
63
|
+
bundle: 'com.kiloo.subwaysurf',
|
|
64
|
+
storeurl: 'https://play.google.com/store/apps/details?id=com.kiloo.subwaysurf&hl=en',
|
|
65
|
+
domain: 'somoaudience.com',
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
}]
|
|
69
|
+
}
|
|
70
|
+
]
|
|
71
|
+
```
|