prebid.js 8.2.0 → 8.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/33acrossBidAdapter.js +1 -1
- package/dist/33acrossIdSystem.js +1 -1
- package/dist/adagioBidAdapter.js +1 -1
- package/dist/adbookpspBidAdapter.js +1 -1
- package/dist/adgenerationBidAdapter.js +1 -1
- package/dist/admanBidAdapter.js +1 -1
- package/dist/adqueryBidAdapter.js +1 -1
- package/dist/adrelevantisBidAdapter.js +1 -1
- package/dist/adtelligentBidAdapter.js +1 -1
- package/dist/adtrgtmeBidAdapter.js +1 -1
- package/dist/adxcgBidAdapter.js +1 -1
- package/dist/adyoulikeBidAdapter.js +1 -1
- package/dist/ajaBidAdapter.js +1 -1
- package/dist/amxBidAdapter.js +1 -1
- package/dist/amxIdSystem.js +1 -1
- package/dist/appierAnalyticsAdapter.js +1 -1
- package/dist/appnexusBidAdapter.js +1 -1
- package/dist/asoBidAdapter.js +1 -1
- package/dist/axonixBidAdapter.js +1 -1
- package/dist/beopBidAdapter.js +1 -1
- package/dist/bidglassBidAdapter.js +1 -1
- package/dist/big-richmediaBidAdapter.js +1 -1
- package/dist/brandmetricsRtdProvider.js +1 -1
- package/dist/bridBidAdapter.js +1 -1
- package/dist/bridgewellBidAdapter.js +1 -1
- package/dist/brightMountainMediaBidAdapter.js +1 -1
- 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/conversantAnalyticsAdapter.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 +6 -0
- package/dist/discoveryBidAdapter.js +1 -1
- package/dist/dspxBidAdapter.js +1 -1
- package/dist/eplanningBidAdapter.js +1 -1
- package/dist/euidIdSystem.js +1 -1
- package/dist/feedadBidAdapter.js +1 -1
- package/dist/finativeBidAdapter.js +1 -1
- package/dist/freewheel-sspBidAdapter.js +1 -1
- package/dist/gdprEnforcement.js +1 -1
- package/dist/gmosspBidAdapter.js +1 -1
- package/dist/goldbachBidAdapter.js +1 -1
- package/dist/greenbidsAnalyticsAdapter.js +1 -1
- package/dist/greenbidsRtdProvider.js +1 -1
- package/dist/gridBidAdapter.js +1 -1
- package/dist/gumgumBidAdapter.js +1 -1
- package/dist/h12mediaBidAdapter.js +1 -1
- package/dist/holidBidAdapter.js +1 -1
- package/dist/hypelabBidAdapter.js +1 -1
- package/dist/id5IdSystem.js +1 -1
- package/dist/imdsBidAdapter.js +1 -1
- package/dist/improvedigitalBidAdapter.js +1 -1
- package/dist/insticatorBidAdapter.js +1 -1
- package/dist/ixBidAdapter.js +1 -1
- package/dist/justpremiumBidAdapter.js +1 -1
- package/dist/kargoBidAdapter.js +1 -1
- package/dist/konduitAnalyticsAdapter.js +1 -1
- package/dist/kueezBidAdapter.js +1 -1
- package/dist/kueezRtbBidAdapter.js +1 -1
- package/dist/kulturemediaBidAdapter.js +1 -1
- package/dist/lassoBidAdapter.js +1 -1
- package/dist/lifestreetBidAdapter.js +1 -1
- package/dist/livewrappedAnalyticsAdapter.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/mediagoBidAdapter.js +1 -1
- package/dist/mediasquareBidAdapter.js +1 -1
- package/dist/mgidBidAdapter.js +1 -1
- package/dist/minutemediaBidAdapter.js +1 -1
- package/dist/minutemediaplusBidAdapter.js +1 -1
- package/dist/nexx360BidAdapter.js +1 -1
- package/dist/not-for-prod/prebid.js +143 -143
- package/dist/oguryBidAdapter.js +1 -1
- package/dist/onetagBidAdapter.js +1 -1
- package/dist/ooloAnalyticsAdapter.js +1 -1
- package/dist/optidigitalBidAdapter.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 +2 -2
- package/dist/publinkIdSystem.js +1 -1
- package/dist/pubmaticBidAdapter.js +1 -1
- package/dist/pubwiseAnalyticsAdapter.js +1 -1
- package/dist/pulsepointBidAdapter.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/retailspotBidAdapter.js +1 -1
- package/dist/rhythmoneBidAdapter.js +1 -1
- package/dist/riseBidAdapter.js +1 -1
- package/dist/rubiconBidAdapter.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/smaatoBidAdapter.js +1 -1
- package/dist/smartadserverBidAdapter.js +1 -1
- package/dist/smartxBidAdapter.js +1 -1
- package/dist/smartyadsBidAdapter.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/stroeerCoreBidAdapter.js +1 -1
- package/dist/stvBidAdapter.js +1 -1
- package/dist/sublimeBidAdapter.js +1 -1
- package/dist/targetVideoBidAdapter.js +1 -1
- package/dist/teadsBidAdapter.js +1 -1
- package/dist/topicsFpdModule.js +1 -1
- package/dist/trafficgateBidAdapter.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/voxBidAdapter.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/yandexBidAdapter.js +1 -1
- package/dist/yieldmoBidAdapter.js +1 -1
- package/dist/yieldoneAnalyticsAdapter.js +1 -1
- package/integrationExamples/videoModule/jwplayer/bidMarkedAsUsed.html +1 -1
- package/integrationExamples/videoModule/jwplayer/eventListeners.html +2 -2
- package/integrationExamples/videoModule/jwplayer/eventsUI.html +1 -1
- package/integrationExamples/videoModule/jwplayer/gamAdServerMediation.html +1 -1
- package/integrationExamples/videoModule/jwplayer/mediaMetadata.html +1 -1
- package/integrationExamples/videoModule/jwplayer/playlist.html +1 -1
- package/integrationExamples/videoModule/videojs/bidMarkedAsUsed.html +1 -1
- package/integrationExamples/videoModule/videojs/bidRequestScheduling.html +1 -1
- package/integrationExamples/videoModule/videojs/eventListeners.html +1 -1
- package/integrationExamples/videoModule/videojs/eventsUI.html +1 -1
- package/integrationExamples/videoModule/videojs/gamAdServerMediation.html +1 -1
- package/integrationExamples/videoModule/videojs/mediaMetadata.html +1 -1
- package/integrationExamples/videoModule/videojs/playlist.html +1 -1
- package/modules/33acrossBidAdapter.js +24 -14
- package/modules/33acrossIdSystem.js +15 -4
- package/modules/adagioBidAdapter.js +2 -2
- package/modules/admanBidAdapter.js +4 -0
- package/modules/adtelligentBidAdapter.js +8 -0
- package/modules/beopBidAdapter.js +6 -6
- package/modules/beopBidAdapter.md +35 -1
- package/modules/brandmetricsRtdProvider.js +36 -2
- package/modules/brandmetricsRtdProvider.md +17 -2
- package/modules/cadentApertureMXBidAdapter.md +2 -2
- package/modules/discoveryBidAdapter.js +1 -1
- package/modules/gdprEnforcement.js +27 -22
- package/modules/gridBidAdapter.js +19 -0
- package/modules/holidBidAdapter.js +49 -30
- package/modules/ixBidAdapter.js +41 -2
- package/modules/kargoBidAdapter.js +4 -0
- package/modules/livewrappedAnalyticsAdapter.js +33 -33
- package/modules/mediagoBidAdapter.js +1 -0
- package/modules/minutemediaBidAdapter.js +17 -2
- package/modules/oguryBidAdapter.js +29 -16
- package/modules/pubmaticBidAdapter.js +16 -1
- package/modules/pulsepointBidAdapter.js +63 -424
- package/modules/pulsepointBidAdapter.md +39 -45
- package/modules/sharedIdSystem.js +1 -1
- package/modules/smartyadsBidAdapter.js +6 -3
- package/modules/sovrnBidAdapter.js +10 -1
- package/modules/stroeerCoreBidAdapter.js +2 -3
- package/modules/teadsBidAdapter.js +2 -0
- package/modules/topicsFpdModule.js +4 -1
- package/modules/topicsFpdModule.md +4 -0
- package/modules/trafficgateBidAdapter.js +126 -72
- package/modules/userId/index.js +2 -2
- package/modules/vidazooBidAdapter.js +69 -19
- package/modules/voxBidAdapter.js +16 -5
- package/modules/yahoosspBidAdapter.js +38 -33
- package/modules/yahoosspBidAdapter.md +96 -95
- package/modules/yandexBidAdapter.js +12 -15
- package/package.json +1 -1
- package/src/activities/redactor.js +1 -1
- package/src/auction.js +24 -2
- package/src/constants.json +3 -1
- package/src/fpd/sua.js +8 -2
- package/test/spec/auctionmanager_spec.js +29 -1
- package/test/spec/fpd/enrichment_spec.js +7 -1
- package/test/spec/fpd/sua_spec.js +12 -0
- package/test/spec/modules/33acrossBidAdapter_spec.js +188 -35
- package/test/spec/modules/33acrossIdSystem_spec.js +122 -27
- package/test/spec/modules/adagioBidAdapter_spec.js +2 -2
- package/test/spec/modules/adtelligentBidAdapter_spec.js +8 -0
- package/test/spec/modules/beopBidAdapter_spec.js +18 -2
- package/test/spec/modules/brandmetricsRtdProvider_spec.js +69 -7
- package/test/spec/modules/cadentApertureMXBidAdapter_spec.js +1 -1
- package/test/spec/modules/gdprEnforcement_spec.js +43 -2
- package/test/spec/modules/gridBidAdapter_spec.js +42 -0
- package/test/spec/modules/holidBidAdapter_spec.js +26 -6
- package/test/spec/modules/ixBidAdapter_spec.js +84 -6
- package/test/spec/modules/kargoBidAdapter_spec.js +121 -106
- package/test/spec/modules/minutemediaBidAdapter_spec.js +36 -5
- package/test/spec/modules/oguryBidAdapter_spec.js +208 -108
- package/test/spec/modules/pubmaticBidAdapter_spec.js +119 -0
- package/test/spec/modules/pulsepointBidAdapter_spec.js +225 -486
- package/test/spec/modules/smartyadsBidAdapter_spec.js +1 -1
- package/test/spec/modules/sovrnBidAdapter_spec.js +58 -4
- package/test/spec/modules/stroeerCoreBidAdapter_spec.js +8 -5
- package/test/spec/modules/teadsBidAdapter_spec.js +70 -21
- package/test/spec/modules/topicsFpdModule_spec.js +10 -4
- package/test/spec/modules/trafficgateBidAdapter_spec.js +1349 -199
- package/test/spec/modules/vidazooBidAdapter_spec.js +130 -4
- package/test/spec/modules/voxBidAdapter_spec.js +93 -0
- package/test/spec/modules/yahoosspBidAdapter_spec.js +402 -314
- package/test/spec/modules/yandexBidAdapter_spec.js +21 -3
- package/integrationExamples/gpt/inskin_example.html +0 -100
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
**Module Name**: PulsePoint Bidder Adapter
|
|
4
4
|
**Module Type**: Bidder Adapter
|
|
5
|
-
**Maintainer**: ExchangeTeam@pulsepoint.com
|
|
5
|
+
**Maintainer**: ExchangeTeam@pulsepoint.com
|
|
6
6
|
|
|
7
7
|
# Description
|
|
8
8
|
|
|
@@ -18,55 +18,49 @@ Please use ```pulsepoint``` as the bidder code.
|
|
|
18
18
|
sizes: [[300, 250]],
|
|
19
19
|
bids: [{
|
|
20
20
|
bidder: 'pulsepoint',
|
|
21
|
-
params: {
|
|
22
|
-
cf: '300X250',
|
|
21
|
+
params: {
|
|
23
22
|
cp: 512379,
|
|
24
23
|
ct: 486653
|
|
25
24
|
}
|
|
26
25
|
}]
|
|
27
26
|
},{
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
renderer: {
|
|
66
|
-
options: {
|
|
67
|
-
text: "PulsePoint Outstream"
|
|
68
|
-
}
|
|
69
|
-
}
|
|
27
|
+
code: 'native-1-slot',
|
|
28
|
+
mediaTypes: {
|
|
29
|
+
native: {
|
|
30
|
+
ortb: {
|
|
31
|
+
assets: [{
|
|
32
|
+
id: 1,
|
|
33
|
+
required: 1,
|
|
34
|
+
img: {
|
|
35
|
+
type: 3,
|
|
36
|
+
w: 150,
|
|
37
|
+
h: 50,
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
id: 2,
|
|
42
|
+
required: 1,
|
|
43
|
+
title: {
|
|
44
|
+
len: 80
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
id: 3,
|
|
49
|
+
required: 1,
|
|
50
|
+
data: {
|
|
51
|
+
type: 1
|
|
52
|
+
}
|
|
53
|
+
}]
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
bids: [{
|
|
58
|
+
bidder: 'pulsepoint',
|
|
59
|
+
params: {
|
|
60
|
+
cp: 512379,
|
|
61
|
+
ct: 694973
|
|
62
|
+
}
|
|
63
|
+
}]
|
|
70
64
|
},{
|
|
71
65
|
code: 'instream',
|
|
72
66
|
mediaTypes: {
|
|
@@ -13,7 +13,7 @@ import {VENDORLESS_GVLID} from '../src/consentHandler.js';
|
|
|
13
13
|
import {MODULE_TYPE_UID} from '../src/activities/modules.js';
|
|
14
14
|
import {domainOverrideToRootDomain} from '../libraries/domainOverrideToRootDomain/index.js';
|
|
15
15
|
|
|
16
|
-
export const storage = getStorageManager({moduleType: MODULE_TYPE_UID, moduleName: '
|
|
16
|
+
export const storage = getStorageManager({moduleType: MODULE_TYPE_UID, moduleName: 'sharedId'});
|
|
17
17
|
const COOKIE = 'cookie';
|
|
18
18
|
const LOCAL_STORAGE = 'html5';
|
|
19
19
|
const OPTOUT_NAME = '_pubcid_optout';
|
|
@@ -66,6 +66,9 @@ export const spec = {
|
|
|
66
66
|
if (bidderRequest.gdprConsent) {
|
|
67
67
|
request.gdpr = bidderRequest.gdprConsent
|
|
68
68
|
}
|
|
69
|
+
if (bidderRequest.gppConsent) {
|
|
70
|
+
request.gpp = bidderRequest.gppConsent;
|
|
71
|
+
}
|
|
69
72
|
}
|
|
70
73
|
const len = validBidRequests.length;
|
|
71
74
|
|
|
@@ -102,19 +105,19 @@ export const spec = {
|
|
|
102
105
|
return response;
|
|
103
106
|
},
|
|
104
107
|
|
|
105
|
-
getUserSyncs: (syncOptions, serverResponses = [], gdprConsent = {}, uspConsent = '') => {
|
|
108
|
+
getUserSyncs: (syncOptions, serverResponses = [], gdprConsent = {}, uspConsent = '', gppConsent = '') => {
|
|
106
109
|
let syncs = [];
|
|
107
110
|
let { gdprApplies, consentString = '' } = gdprConsent;
|
|
108
111
|
|
|
109
112
|
if (syncOptions.iframeEnabled) {
|
|
110
113
|
syncs.push({
|
|
111
114
|
type: 'iframe',
|
|
112
|
-
url: `${URL_SYNC}&gdpr=${gdprApplies ? 1 : 0}&gdpr_consent=${consentString}&type=iframe&us_privacy=${uspConsent}`
|
|
115
|
+
url: `${URL_SYNC}&gdpr=${gdprApplies ? 1 : 0}&gdpr_consent=${consentString}&type=iframe&us_privacy=${uspConsent}&gpp=${gppConsent}`
|
|
113
116
|
});
|
|
114
117
|
} else {
|
|
115
118
|
syncs.push({
|
|
116
119
|
type: 'image',
|
|
117
|
-
url: `${URL_SYNC}&gdpr=${gdprApplies ? 1 : 0}&gdpr_consent=${consentString}&type=image&us_privacy=${uspConsent}`
|
|
120
|
+
url: `${URL_SYNC}&gdpr=${gdprApplies ? 1 : 0}&gdpr_consent=${consentString}&type=image&us_privacy=${uspConsent}&gpp=${gppConsent}`
|
|
118
121
|
});
|
|
119
122
|
}
|
|
120
123
|
|
|
@@ -169,6 +169,11 @@ export const spec = {
|
|
|
169
169
|
};
|
|
170
170
|
}
|
|
171
171
|
|
|
172
|
+
const tid = deepAccess(bidderRequest, 'ortb2.source.tid')
|
|
173
|
+
if (tid) {
|
|
174
|
+
deepSetValue(sovrnBidReq, 'source.tid', tid)
|
|
175
|
+
}
|
|
176
|
+
|
|
172
177
|
if (bidderRequest.gdprConsent) {
|
|
173
178
|
deepSetValue(sovrnBidReq, 'regs.ext.gdpr', +bidderRequest.gdprConsent.gdprApplies);
|
|
174
179
|
deepSetValue(sovrnBidReq, 'user.ext.consent', bidderRequest.gdprConsent.consentString)
|
|
@@ -243,7 +248,7 @@ export const spec = {
|
|
|
243
248
|
}
|
|
244
249
|
},
|
|
245
250
|
|
|
246
|
-
getUserSyncs: function(syncOptions, serverResponses, gdprConsent, uspConsent) {
|
|
251
|
+
getUserSyncs: function(syncOptions, serverResponses, gdprConsent, uspConsent, gppConsent) {
|
|
247
252
|
try {
|
|
248
253
|
const tracks = []
|
|
249
254
|
if (serverResponses && serverResponses.length !== 0) {
|
|
@@ -257,6 +262,10 @@ export const spec = {
|
|
|
257
262
|
if (uspConsent) {
|
|
258
263
|
params.push(['us_privacy', uspConsent]);
|
|
259
264
|
}
|
|
265
|
+
if (gppConsent) {
|
|
266
|
+
params.push(['gpp', gppConsent.gppString]);
|
|
267
|
+
params.push(['gpp_sid', gppConsent.applicableSections])
|
|
268
|
+
}
|
|
260
269
|
|
|
261
270
|
if (iidArr[0]) {
|
|
262
271
|
params.push(['informer', iidArr[0]]);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {buildUrl, deepAccess, getWindowSelf, getWindowTop, isEmpty, isStr, logWarn} from '../src/utils.js';
|
|
1
|
+
import { buildUrl, deepAccess, generateUUID, getWindowSelf, getWindowTop, isEmpty, isStr, logWarn } from '../src/utils.js';
|
|
2
2
|
import {registerBidder} from '../src/adapters/bidderFactory.js';
|
|
3
3
|
import {BANNER, VIDEO} from '../src/mediaTypes.js';
|
|
4
4
|
import {find} from '../src/polyfill.js';
|
|
@@ -50,8 +50,7 @@ export const spec = {
|
|
|
50
50
|
const refererInfo = bidderRequest.refererInfo;
|
|
51
51
|
|
|
52
52
|
const basePayload = {
|
|
53
|
-
|
|
54
|
-
id: bidderRequest.auctionId,
|
|
53
|
+
id: generateUUID(),
|
|
55
54
|
ref: refererInfo.ref,
|
|
56
55
|
ssl: isSecureWindow(),
|
|
57
56
|
mpa: isMainPageAccessible(),
|
|
@@ -220,6 +220,7 @@ function buildRequestObject(bid) {
|
|
|
220
220
|
let placementId = getValue(bid.params, 'placementId');
|
|
221
221
|
let pageId = getValue(bid.params, 'pageId');
|
|
222
222
|
const gpid = deepAccess(bid, 'ortb2Imp.ext.gpid');
|
|
223
|
+
const videoPlcmt = deepAccess(bid, 'mediaTypes.video.plcmt');
|
|
223
224
|
|
|
224
225
|
reqObj.sizes = getSizes(bid);
|
|
225
226
|
reqObj.bidId = getBidIdParameter('bidId', bid);
|
|
@@ -229,6 +230,7 @@ function buildRequestObject(bid) {
|
|
|
229
230
|
reqObj.adUnitCode = getBidIdParameter('adUnitCode', bid);
|
|
230
231
|
reqObj.transactionId = bid.ortb2Imp?.ext?.tid || '';
|
|
231
232
|
if (gpid) { reqObj.gpid = gpid; }
|
|
233
|
+
if (videoPlcmt) { reqObj.videoPlcmt = videoPlcmt; }
|
|
232
234
|
return reqObj;
|
|
233
235
|
}
|
|
234
236
|
|
|
@@ -15,10 +15,13 @@ let LOAD_TOPICS_INITIALISE = false;
|
|
|
15
15
|
const HAS_DEVICE_ACCESS = hasDeviceAccess();
|
|
16
16
|
|
|
17
17
|
const bidderIframeList = {
|
|
18
|
-
maxTopicCaller:
|
|
18
|
+
maxTopicCaller: 2,
|
|
19
19
|
bidders: [{
|
|
20
20
|
bidder: 'pubmatic',
|
|
21
21
|
iframeURL: 'https://ads.pubmatic.com/AdServer/js/topics/topics_frame.html'
|
|
22
|
+
}, {
|
|
23
|
+
bidder: 'rtbhouse',
|
|
24
|
+
iframeURL: 'https://topics.authorizedvault.com/topicsapi.html'
|
|
22
25
|
}]
|
|
23
26
|
}
|
|
24
27
|
export const coreStorage = getCoreStorageManager(MODULE_NAME);
|
|
@@ -36,6 +36,10 @@ pbjs.setConfig({
|
|
|
36
36
|
bidder: 'pubmatic',
|
|
37
37
|
iframeURL: 'https://ads.pubmatic.com/AdServer/js/topics/topics_frame.html',
|
|
38
38
|
expiry: 7 // Configurable expiry days
|
|
39
|
+
},{
|
|
40
|
+
bidder: 'rtbhouse',
|
|
41
|
+
iframeURL: 'https://topics.authorizedvault.com/topicsapi.html',
|
|
42
|
+
expiry: 7 // Configurable expiry days
|
|
39
43
|
},{
|
|
40
44
|
bidder: 'rubicon',
|
|
41
45
|
iframeURL: 'https://rubicon.com:8080/topics/fpd/topic.html', // dummy URL
|
|
@@ -1,95 +1,149 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import {registerBidder} from '../src/adapters/bidderFactory.js';
|
|
2
|
+
import {BANNER, VIDEO} from '../src/mediaTypes.js';
|
|
3
|
+
import {ortbConverter} from '../libraries/ortbConverter/converter.js';
|
|
4
|
+
import {deepAccess, mergeDeep, convertTypes} from '../src/utils.js';
|
|
5
5
|
|
|
6
6
|
const BIDDER_CODE = 'trafficgate';
|
|
7
|
-
const URL = 'https://[HOST].bc-plugin.com
|
|
7
|
+
const URL = 'https://[HOST].bc-plugin.com/prebidjs'
|
|
8
8
|
|
|
9
9
|
export const spec = {
|
|
10
10
|
code: BIDDER_CODE,
|
|
11
|
-
supportedMediaTypes: [BANNER, VIDEO
|
|
11
|
+
supportedMediaTypes: [BANNER, VIDEO],
|
|
12
|
+
isBidRequestValid,
|
|
13
|
+
buildRequests,
|
|
14
|
+
interpretResponse,
|
|
15
|
+
transformBidParams,
|
|
16
|
+
isBannerBid
|
|
17
|
+
};
|
|
12
18
|
|
|
13
|
-
|
|
14
|
-
return !!(bid.bidId && bid.params && parseInt(bid.params.placementId) && bid.params.host)
|
|
15
|
-
},
|
|
16
|
-
/**
|
|
17
|
-
* Make a server request from the list of BidRequests.
|
|
18
|
-
*
|
|
19
|
-
* @param {BidRequest[]} validBidRequests A non-empty list of valid bid requests that should be sent to the Server.
|
|
20
|
-
* @return ServerRequest Info describing the request to the server.
|
|
21
|
-
*/
|
|
22
|
-
buildRequests: function (validBidRequests) {
|
|
23
|
-
// convert Native ORTB definition to old-style prebid native definition
|
|
24
|
-
validBidRequests = convertOrtbRequestToProprietaryNative(validBidRequests);
|
|
25
|
-
if (validBidRequests && validBidRequests.length === 0) return [];
|
|
26
|
-
|
|
27
|
-
const location = getWindowLocation()
|
|
28
|
-
const placements = []
|
|
29
|
-
|
|
30
|
-
validBidRequests.forEach((bidReq) => {
|
|
31
|
-
placements.push({
|
|
32
|
-
placementId: bidReq.params.placementId,
|
|
33
|
-
bidId: bidReq.bidId,
|
|
34
|
-
traffic: getMediatype(bidReq)
|
|
35
|
-
})
|
|
36
|
-
})
|
|
19
|
+
registerBidder(spec)
|
|
37
20
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
21
|
+
const converter = ortbConverter({
|
|
22
|
+
context: {
|
|
23
|
+
netRevenue: true,
|
|
24
|
+
ttl: 300
|
|
25
|
+
},
|
|
26
|
+
imp(buildImp, bidRequest, context) {
|
|
27
|
+
const imp = buildImp(bidRequest, context);
|
|
28
|
+
mergeDeep(imp, {
|
|
29
|
+
ext: {
|
|
30
|
+
bidder: {
|
|
31
|
+
placementId: bidRequest.params.placementId,
|
|
32
|
+
host: bidRequest.params.host
|
|
33
|
+
}
|
|
47
34
|
}
|
|
35
|
+
});
|
|
36
|
+
if (bidRequest.params.customFloor && !imp.bidfloor) {
|
|
37
|
+
imp.bidfloor = bidRequest.params.customFloor;
|
|
48
38
|
}
|
|
39
|
+
return imp;
|
|
49
40
|
},
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
41
|
+
request(buildRequest, imps, bidderRequest, context) {
|
|
42
|
+
const req = buildRequest(imps, bidderRequest, context);
|
|
43
|
+
mergeDeep(req, {
|
|
44
|
+
at: 1,
|
|
45
|
+
})
|
|
46
|
+
const bid = context.bidRequests[0];
|
|
47
|
+
if (bid.params.test) {
|
|
48
|
+
req.test = 1
|
|
49
|
+
}
|
|
50
|
+
return req;
|
|
51
|
+
},
|
|
52
|
+
bidResponse(buildBidResponse, bid, context) {
|
|
53
|
+
const bidResponse = buildBidResponse(bid, context);
|
|
54
|
+
if (bid.ext) {
|
|
55
|
+
bidResponse.meta.networkId = bid.ext.networkId;
|
|
56
|
+
bidResponse.meta.advertiserDomains = bid.ext.advertiserDomains;
|
|
57
|
+
}
|
|
58
|
+
return bidResponse;
|
|
59
|
+
},
|
|
60
|
+
response(buildResponse, bidResponses, ortbResponse, context) {
|
|
61
|
+
const response = buildResponse(bidResponses, ortbResponse, context);
|
|
62
|
+
return response.bids
|
|
63
|
+
},
|
|
64
|
+
overrides: {
|
|
65
|
+
imp: {
|
|
66
|
+
bidfloor(setBidFloor, imp, bidRequest, context) {
|
|
67
|
+
const floor = {};
|
|
68
|
+
setBidFloor(floor, bidRequest, {...context, currency: 'USD'});
|
|
69
|
+
if (floor.bidfloorcur === 'USD') {
|
|
70
|
+
Object.assign(imp, floor);
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
video(orig, imp, bidRequest, context) {
|
|
74
|
+
if (FEATURES.VIDEO) {
|
|
75
|
+
let videoParams = bidRequest.mediaTypes[VIDEO];
|
|
76
|
+
if (videoParams) {
|
|
77
|
+
videoParams = Object.assign({}, videoParams, bidRequest.params.video);
|
|
78
|
+
bidRequest = {...bidRequest, mediaTypes: {[VIDEO]: videoParams}}
|
|
79
|
+
}
|
|
80
|
+
orig(imp, bidRequest, context);
|
|
81
|
+
if (imp.video && videoParams?.context === 'outstream') {
|
|
82
|
+
imp.video.placement = imp.video.placement || 4;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
59
85
|
}
|
|
60
86
|
}
|
|
61
|
-
|
|
62
|
-
return response
|
|
63
87
|
}
|
|
64
|
-
}
|
|
88
|
+
});
|
|
65
89
|
|
|
66
|
-
|
|
90
|
+
function transformBidParams(params, isOpenRtb) {
|
|
91
|
+
return convertTypes({
|
|
92
|
+
'customFloor': 'number',
|
|
93
|
+
'placementId': 'number',
|
|
94
|
+
'host': 'string'
|
|
95
|
+
}, params);
|
|
96
|
+
}
|
|
67
97
|
|
|
68
|
-
function
|
|
69
|
-
|
|
70
|
-
|
|
98
|
+
function isBidRequestValid(bidRequest) {
|
|
99
|
+
const isValid = bidRequest.params.placementId && bidRequest.params.host;
|
|
100
|
+
if (!isValid) {
|
|
71
101
|
return false
|
|
72
102
|
}
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
return Boolean(bid.width && bid.height && bid.ad)
|
|
76
|
-
case VIDEO:
|
|
77
|
-
return Boolean(bid.vastUrl)
|
|
78
|
-
case NATIVE:
|
|
79
|
-
return Boolean(bid.title && bid.image && bid.impressionTrackers)
|
|
80
|
-
default:
|
|
81
|
-
return false
|
|
103
|
+
if (isBannerBid(bidRequest)) {
|
|
104
|
+
return deepAccess(bidRequest, 'mediaTypes.banner.sizes.length') > 0;
|
|
82
105
|
}
|
|
106
|
+
return true
|
|
83
107
|
}
|
|
84
108
|
|
|
85
|
-
function
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
109
|
+
function buildRequests(bids, bidderRequest) {
|
|
110
|
+
let videoBids = bids.filter(bid => isVideoBid(bid));
|
|
111
|
+
let bannerBids = bids.filter(bid => isBannerBid(bid));
|
|
112
|
+
let requests = bannerBids.length ? [createRequest(bannerBids, bidderRequest, BANNER)] : [];
|
|
113
|
+
videoBids.forEach(bid => {
|
|
114
|
+
requests.push(createRequest([bid], bidderRequest, VIDEO));
|
|
115
|
+
});
|
|
116
|
+
return requests;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
function createRequest(bidRequests, bidderRequest, mediaType) {
|
|
120
|
+
return {
|
|
121
|
+
method: 'POST',
|
|
122
|
+
url: URL.replace('[HOST]', bidRequests[0].params.host),
|
|
123
|
+
data: converter.toORTB({bidRequests, bidderRequest, context: {mediaType}})
|
|
91
124
|
}
|
|
92
|
-
|
|
93
|
-
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
function isVideoBid(bid) {
|
|
128
|
+
return !!deepAccess(bid, 'mediaTypes.video');
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
function isBannerBid(bid) {
|
|
132
|
+
return !!deepAccess(bid, 'mediaTypes.banner');
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
function interpretResponse(resp, req) {
|
|
136
|
+
if (!resp.body) {
|
|
137
|
+
resp.body = {nbr: 0};
|
|
94
138
|
}
|
|
139
|
+
return converter.fromORTB({request: req.data, response: resp.body});
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
export const spec2 = {
|
|
143
|
+
code: BIDDER_CODE,
|
|
144
|
+
supportedMediaTypes: [BANNER, VIDEO],
|
|
145
|
+
|
|
146
|
+
isBidRequestValid: function (bid) {
|
|
147
|
+
return !!(bid.bidId && bid.params && parseInt(bid.params.placementId) && bid.params.host)
|
|
148
|
+
},
|
|
95
149
|
}
|
package/modules/userId/index.js
CHANGED
|
@@ -743,14 +743,14 @@ function registerSignalSources() {
|
|
|
743
743
|
if (!isGptPubadsDefined()) {
|
|
744
744
|
return;
|
|
745
745
|
}
|
|
746
|
-
window.googletag.
|
|
746
|
+
window.googletag.secureSignalProviders = window.googletag.secureSignalProviders || [];
|
|
747
747
|
const encryptedSignalSources = config.getConfig('userSync.encryptedSignalSources');
|
|
748
748
|
if (encryptedSignalSources) {
|
|
749
749
|
const registerDelay = encryptedSignalSources.registerDelay || 0;
|
|
750
750
|
setTimeout(() => {
|
|
751
751
|
encryptedSignalSources['sources'] && encryptedSignalSources['sources'].forEach(({ source, encrypt, customFunc }) => {
|
|
752
752
|
source.forEach((src) => {
|
|
753
|
-
window.googletag.
|
|
753
|
+
window.googletag.secureSignalProviders.push({
|
|
754
754
|
id: src,
|
|
755
755
|
collectorFunction: () => getEncryptedEidsForSource(src, encrypt, customFunc)
|
|
756
756
|
});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {_each, deepAccess, parseSizesInput, parseUrl, uniques,
|
|
1
|
+
import {_each, chunk, deepAccess, isFn, parseSizesInput, parseUrl, uniques, isArray} from '../src/utils.js';
|
|
2
2
|
import {registerBidder} from '../src/adapters/bidderFactory.js';
|
|
3
3
|
import {BANNER, VIDEO} from '../src/mediaTypes.js';
|
|
4
4
|
import {getStorageManager} from '../src/storageManager.js';
|
|
@@ -48,7 +48,7 @@ function isBidRequestValid(bid) {
|
|
|
48
48
|
return !!(extractCID(params) && extractPID(params));
|
|
49
49
|
}
|
|
50
50
|
|
|
51
|
-
function
|
|
51
|
+
function buildRequestData(bid, topWindowUrl, sizes, bidderRequest, bidderTimeout) {
|
|
52
52
|
const {
|
|
53
53
|
params,
|
|
54
54
|
bidId,
|
|
@@ -56,7 +56,6 @@ function buildRequest(bid, topWindowUrl, sizes, bidderRequest, bidderTimeout) {
|
|
|
56
56
|
adUnitCode,
|
|
57
57
|
schain,
|
|
58
58
|
mediaTypes,
|
|
59
|
-
auctionId,
|
|
60
59
|
ortb2Imp,
|
|
61
60
|
bidderRequestId,
|
|
62
61
|
bidRequestsCount,
|
|
@@ -69,9 +68,7 @@ function buildRequest(bid, topWindowUrl, sizes, bidderRequest, bidderTimeout) {
|
|
|
69
68
|
const dealId = getNextDealId(hashUrl);
|
|
70
69
|
const uniqueDealId = getUniqueDealId(hashUrl);
|
|
71
70
|
const sId = getVidazooSessionId();
|
|
72
|
-
const cId = extractCID(params);
|
|
73
71
|
const pId = extractPID(params);
|
|
74
|
-
const subDomain = extractSubDomain(params);
|
|
75
72
|
const ptrace = getCacheOpt();
|
|
76
73
|
const isStorageAllowed = bidderSettings.get(BIDDER_CODE, 'storageAllowed');
|
|
77
74
|
|
|
@@ -114,8 +111,6 @@ function buildRequest(bid, topWindowUrl, sizes, bidderRequest, bidderTimeout) {
|
|
|
114
111
|
gpid: gpid,
|
|
115
112
|
cat: cat,
|
|
116
113
|
pagecat: pagecat,
|
|
117
|
-
// TODO: fix auctionId leak: https://github.com/prebid/Prebid.js/issues/9781
|
|
118
|
-
auctionId: auctionId,
|
|
119
114
|
transactionId: ortb2Imp?.ext?.tid,
|
|
120
115
|
bidderRequestId: bidderRequestId,
|
|
121
116
|
bidRequestsCount: bidRequestsCount,
|
|
@@ -153,17 +148,46 @@ function buildRequest(bid, topWindowUrl, sizes, bidderRequest, bidderTimeout) {
|
|
|
153
148
|
data.gppSid = bidderRequest.ortb2.regs.gpp_sid;
|
|
154
149
|
}
|
|
155
150
|
|
|
151
|
+
_each(ext, (value, key) => {
|
|
152
|
+
data['ext.' + key] = value;
|
|
153
|
+
});
|
|
154
|
+
|
|
155
|
+
return data;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
function buildRequest(bid, topWindowUrl, sizes, bidderRequest, bidderTimeout) {
|
|
159
|
+
const {params} = bid;
|
|
160
|
+
const cId = extractCID(params);
|
|
161
|
+
const subDomain = extractSubDomain(params);
|
|
162
|
+
const data = buildRequestData(bid, topWindowUrl, sizes, bidderRequest, bidderTimeout);
|
|
156
163
|
const dto = {
|
|
157
164
|
method: 'POST',
|
|
158
165
|
url: `${createDomain(subDomain)}/prebid/multi/${cId}`,
|
|
159
166
|
data: data
|
|
160
167
|
};
|
|
168
|
+
return dto;
|
|
169
|
+
}
|
|
161
170
|
|
|
162
|
-
|
|
163
|
-
|
|
171
|
+
function buildSingleRequest(bidRequests, bidderRequest, topWindowUrl, bidderTimeout) {
|
|
172
|
+
const {params} = bidRequests[0];
|
|
173
|
+
const cId = extractCID(params);
|
|
174
|
+
const subDomain = extractSubDomain(params);
|
|
175
|
+
const data = bidRequests.map(bid => {
|
|
176
|
+
const sizes = parseSizesInput(bid.sizes);
|
|
177
|
+
return buildRequestData(bid, topWindowUrl, sizes, bidderRequest, bidderTimeout)
|
|
178
|
+
});
|
|
179
|
+
const chunkSize = Math.min(20, config.getConfig('vidazoo.chunkSize') || 10);
|
|
180
|
+
|
|
181
|
+
const chunkedData = chunk(data, chunkSize);
|
|
182
|
+
return chunkedData.map(chunk => {
|
|
183
|
+
return {
|
|
184
|
+
method: 'POST',
|
|
185
|
+
url: `${createDomain(subDomain)}/prebid/multi/${cId}`,
|
|
186
|
+
data: {
|
|
187
|
+
bids: chunk
|
|
188
|
+
}
|
|
189
|
+
};
|
|
164
190
|
});
|
|
165
|
-
|
|
166
|
-
return dto;
|
|
167
191
|
}
|
|
168
192
|
|
|
169
193
|
function appendUserIdsToRequestPayload(payloadRef, userIds) {
|
|
@@ -193,12 +217,34 @@ function buildRequests(validBidRequests, bidderRequest) {
|
|
|
193
217
|
// TODO: does the fallback make sense here?
|
|
194
218
|
const topWindowUrl = bidderRequest.refererInfo.page || bidderRequest.refererInfo.topmostLocation;
|
|
195
219
|
const bidderTimeout = config.getConfig('bidderTimeout');
|
|
220
|
+
|
|
221
|
+
const singleRequestMode = config.getConfig('vidazoo.singleRequest');
|
|
222
|
+
|
|
196
223
|
const requests = [];
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
224
|
+
|
|
225
|
+
if (singleRequestMode) {
|
|
226
|
+
// banner bids are sent as a single request
|
|
227
|
+
const bannerBidRequests = validBidRequests.filter(bid => isArray(bid.mediaTypes) ? bid.mediaTypes.includes(BANNER) : bid.mediaTypes[BANNER] !== undefined);
|
|
228
|
+
if (bannerBidRequests.length > 0) {
|
|
229
|
+
const singleRequests = buildSingleRequest(bannerBidRequests, bidderRequest, topWindowUrl, bidderTimeout);
|
|
230
|
+
requests.push(...singleRequests);
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
// video bids are sent as a single request for each bid
|
|
234
|
+
|
|
235
|
+
const videoBidRequests = validBidRequests.filter(bid => bid.mediaTypes[VIDEO] !== undefined);
|
|
236
|
+
videoBidRequests.forEach(validBidRequest => {
|
|
237
|
+
const sizes = parseSizesInput(validBidRequest.sizes);
|
|
238
|
+
const request = buildRequest(validBidRequest, topWindowUrl, sizes, bidderRequest, bidderTimeout);
|
|
239
|
+
requests.push(request);
|
|
240
|
+
});
|
|
241
|
+
} else {
|
|
242
|
+
validBidRequests.forEach(validBidRequest => {
|
|
243
|
+
const sizes = parseSizesInput(validBidRequest.sizes);
|
|
244
|
+
const request = buildRequest(validBidRequest, topWindowUrl, sizes, bidderRequest, bidderTimeout);
|
|
245
|
+
requests.push(request);
|
|
246
|
+
});
|
|
247
|
+
}
|
|
202
248
|
return requests;
|
|
203
249
|
}
|
|
204
250
|
|
|
@@ -206,13 +252,15 @@ function interpretResponse(serverResponse, request) {
|
|
|
206
252
|
if (!serverResponse || !serverResponse.body) {
|
|
207
253
|
return [];
|
|
208
254
|
}
|
|
209
|
-
|
|
255
|
+
|
|
256
|
+
const singleRequestMode = config.getConfig('vidazoo.singleRequest');
|
|
257
|
+
const reqBidId = deepAccess(request, 'data.bidId');
|
|
210
258
|
const {results} = serverResponse.body;
|
|
211
259
|
|
|
212
260
|
let output = [];
|
|
213
261
|
|
|
214
262
|
try {
|
|
215
|
-
results.forEach(result => {
|
|
263
|
+
results.forEach((result, i) => {
|
|
216
264
|
const {
|
|
217
265
|
creativeId,
|
|
218
266
|
ad,
|
|
@@ -221,6 +269,7 @@ function interpretResponse(serverResponse, request) {
|
|
|
221
269
|
width,
|
|
222
270
|
height,
|
|
223
271
|
currency,
|
|
272
|
+
bidId,
|
|
224
273
|
advertiserDomains,
|
|
225
274
|
metaData,
|
|
226
275
|
mediaType = BANNER
|
|
@@ -230,7 +279,7 @@ function interpretResponse(serverResponse, request) {
|
|
|
230
279
|
}
|
|
231
280
|
|
|
232
281
|
const response = {
|
|
233
|
-
requestId: bidId,
|
|
282
|
+
requestId: (singleRequestMode && bidId) ? bidId : reqBidId,
|
|
234
283
|
cpm: price,
|
|
235
284
|
width: width,
|
|
236
285
|
height: height,
|
|
@@ -264,6 +313,7 @@ function interpretResponse(serverResponse, request) {
|
|
|
264
313
|
}
|
|
265
314
|
output.push(response);
|
|
266
315
|
});
|
|
316
|
+
|
|
267
317
|
return output;
|
|
268
318
|
} catch (e) {
|
|
269
319
|
return [];
|