diff --git a/integrationExamples/gpt/inskin_example.html b/integrationExamples/gpt/inskin_example.html
deleted file mode 100644
index 45fd448cf48..00000000000
--- a/integrationExamples/gpt/inskin_example.html
+++ /dev/null
@@ -1,100 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Prebid.js Test
- Div-1
-
-
-
-
-
diff --git a/modules/adagioBidAdapter.js b/modules/adagioBidAdapter.js
index 57dd80aa9b1..a3369ec3357 100644
--- a/modules/adagioBidAdapter.js
+++ b/modules/adagioBidAdapter.js
@@ -1133,7 +1133,6 @@ export const spec = {
method: 'POST',
url: ENDPOINT,
data: {
- id: generateUUID(),
organizationId: organizationId,
secure: secure,
device: device,
@@ -1152,7 +1151,8 @@ export const spec = {
},
prebidVersion: '$prebid.version$',
featuresVersion: FEATURES_VERSION,
- usIfr: usIfr
+ usIfr: usIfr,
+ adgjs: storage.localStorageIsEnabled()
},
options: {
contentType: 'text/plain'
diff --git a/modules/admanBidAdapter.js b/modules/admanBidAdapter.js
index b49bf6390f5..2ee6ecfcb56 100644
--- a/modules/admanBidAdapter.js
+++ b/modules/admanBidAdapter.js
@@ -66,6 +66,7 @@ export const spec = {
buildRequests: (validBidRequests = [], bidderRequest) => {
// convert Native ORTB definition to old-style prebid native definition
validBidRequests = convertOrtbRequestToProprietaryNative(validBidRequests);
+ const content = deepAccess(bidderRequest, 'ortb2.site.content', config.getAnyConfig('ortb2.site.content'));
let winTop = window;
let location;
@@ -95,6 +96,9 @@ export const spec = {
if (bidderRequest.gdprConsent) {
request.gdpr = bidderRequest.gdprConsent
}
+ if (content) {
+ request.content = content;
+ }
}
const len = validBidRequests.length;
diff --git a/modules/adtelligentBidAdapter.js b/modules/adtelligentBidAdapter.js
index cbba1bb49eb..cab2b8956bc 100644
--- a/modules/adtelligentBidAdapter.js
+++ b/modules/adtelligentBidAdapter.js
@@ -200,6 +200,14 @@ function bidToTag(bidRequests, adapterRequest) {
tag.DMPId = window.adtDmp.getUID();
}
+ if (adapterRequest.gppConsent) {
+ tag.GPP = adapterRequest.gppConsent.gppString;
+ tag.GPPSid = adapterRequest.gppConsent.applicableSections?.toString();
+ } else if (adapterRequest.ortb2?.regs?.gpp) {
+ tag.GPP = adapterRequest.ortb2.regs.gpp;
+ tag.GPPSid = adapterRequest.ortb2.regs.gpp_sid;
+ }
+
// end publisher env
const bids = [];
diff --git a/modules/brandmetricsRtdProvider.js b/modules/brandmetricsRtdProvider.js
index 53868eccc4c..30844c9c483 100644
--- a/modules/brandmetricsRtdProvider.js
+++ b/modules/brandmetricsRtdProvider.js
@@ -6,8 +6,10 @@
* @requires module:modules/realTimeData
*/
import {submodule} from '../src/hook.js';
-import {deepAccess, deepSetValue, logError, mergeDeep} from '../src/utils.js';
+import {deepAccess, deepSetValue, logError, mergeDeep, generateUUID} from '../src/utils.js';
import {loadExternalScript} from '../src/adloader.js';
+import * as events from '../src/events.js';
+import CONSTANTS from '../src/constants.json';
const MODULE_NAME = 'brandmetrics'
const MODULE_CODE = MODULE_NAME
@@ -15,12 +17,15 @@ const RECEIVED_EVENTS = []
const GVL_ID = 422
const TCF_PURPOSES = [1, 7]
+let billableEventsInitialized = false
+
function init (config, userConsent) {
const hasConsent = checkConsent(userConsent)
if (hasConsent) {
const moduleConfig = getMergedConfig(config)
initializeBrandmetrics(moduleConfig.params.scriptId)
+ initializeBillableEvents()
}
return hasConsent
}
@@ -82,7 +87,6 @@ function processBrandmetricsEvents (reqBidsConfigObj, moduleConfig, callback) {
if (RECEIVED_EVENTS.length > 0) {
callBidTargeting(RECEIVED_EVENTS[RECEIVED_EVENTS.length - 1])
} else {
- window._brandmetrics = window._brandmetrics || []
window._brandmetrics.push({
cmd: '_addeventlistener',
val: {
@@ -120,6 +124,8 @@ function setBidderTargeting (reqBidsConfigObj, moduleConfig, key, val) {
* @param {string} scriptId - The script- id provided by brandmetrics or brandmetrics partner
*/
function initializeBrandmetrics(scriptId) {
+ window._brandmetrics = window._brandmetrics || []
+
if (scriptId) {
const path = 'https://cdn.brandmetrics.com/survey/script/'
const file = scriptId + '.js'
@@ -129,6 +135,34 @@ function initializeBrandmetrics(scriptId) {
}
}
+/**
+* Hook in to brandmetrics creative_in_view- event and emit billable- event for creatives measured by brandmetrics.
+*/
+function initializeBillableEvents() {
+ if (!billableEventsInitialized) {
+ window._brandmetrics.push({
+ cmd: '_addeventlistener',
+ val: {
+ event: 'creative_in_view',
+ handler: (ev) => {
+ if (ev.source && ev.source.type === 'pbj') {
+ const bid = ev.source.data;
+ events.emit(CONSTANTS.EVENTS.BILLABLE_EVENT, {
+ vendor: 'brandmetrics',
+ type: 'creative_in_view',
+ measurementId: ev.mid,
+ billingId: generateUUID(),
+ auctionId: bid.auctionId,
+ transactionId: bid.transactionId,
+ });
+ }
+ },
+ }
+ })
+ billableEventsInitialized = true
+ }
+}
+
/**
* Merges a provided config with default values
* @param {Object} customConfig
diff --git a/modules/brandmetricsRtdProvider.md b/modules/brandmetricsRtdProvider.md
index 89ee6bb75cf..d6304f9ae12 100644
--- a/modules/brandmetricsRtdProvider.md
+++ b/modules/brandmetricsRtdProvider.md
@@ -16,10 +16,10 @@ Enable the Brandmetrics RTD in your Prebid configuration, using the below format
pbjs.setConfig({
...,
realTimeData: {
- auctionDelay: 500, // auction delay
+ auctionDelay: 500,
dataProviders: [{
name: 'brandmetrics',
- waitForIt: true // should be true if there's an `auctionDelay`,
+ waitForIt: true,
params: {
scriptId: '00000000-0000-0000-0000-000000000000',
bidders: ['ozone']
@@ -29,6 +29,7 @@ pbjs.setConfig({
...
})
```
+The scriptId- parameter is provided by brandmetrics or a brandmetrics partner.
## Parameters
| Name | Type | Description | Default |
@@ -38,3 +39,17 @@ pbjs.setConfig({
| params | Object | | - |
| params.bidders | String[] | An array of bidders which should receive targeting keys. | `[]` |
| params.scriptId | String | A script- id GUID if the brandmetrics- script should be initialized. | `undefined` |
+
+## Billable events
+The module emits a billable event for creatives that are measured by brandmetrics and are considered in- view.
+
+```javascript
+{
+ vendor: 'brandmetrics',
+ type: 'creative_in_view',
+ measurementId: string, // UUID, brandmetrics measurement id
+ billingId: string, // UUID, unique billing id
+ auctionId: string, // Prebid auction id
+ transactionId: string, //Prebid transaction id
+}
+```
\ No newline at end of file
diff --git a/modules/cadentApertureMXBidAdapter.md b/modules/cadentApertureMXBidAdapter.md
index 11d63134587..d924f904be4 100644
--- a/modules/cadentApertureMXBidAdapter.md
+++ b/modules/cadentApertureMXBidAdapter.md
@@ -3,14 +3,14 @@
```
Module Name: Cadent Aperture MX Adapter
Module Type: Bidder Adapter
-Maintainer: git@emxdigital.com
+Maintainer: contactaperturemx@cadent.tv
```
# Description
The Cadent Aperture MX adapter provides publishers with access to the Cadent Aperture MX SSP. The adapter is GDPR compliant. Please note that the adapter supports Banner and Video (Instream & Outstream) media types.
-Note: The Cadent Aperture MX adapter requires approval and implementation guidelines from the Cadent team, including existing publishers that work with Cadent. Please reach out to your account manager or prebid@emxdigital.com for more information.
+Note: The Cadent Aperture MX adapter requires approval and implementation guidelines from the Cadent team, including existing publishers that work with Cadent. Please reach out to your account manager or contactaperturemx@cadent.tv for more information.
The bidder code should be ```cadent_aperture_mx```
The params used by the bidder are :
diff --git a/modules/discoveryBidAdapter.js b/modules/discoveryBidAdapter.js
index 675ede273a6..7ad75f64215 100644
--- a/modules/discoveryBidAdapter.js
+++ b/modules/discoveryBidAdapter.js
@@ -258,7 +258,7 @@ function getItems(validBidRequests, bidderRequest) {
format: sizes,
},
ext: {},
- tagid: globals['tagid'],
+ tagid: req.params && req.params.tagid
};
}
itemMaps[id] = {
diff --git a/modules/gdprEnforcement.js b/modules/gdprEnforcement.js
index 4bac4b0cf74..fa7418a90ab 100644
--- a/modules/gdprEnforcement.js
+++ b/modules/gdprEnforcement.js
@@ -27,15 +27,16 @@ import {
ACTIVITY_ENRICH_EIDS,
ACTIVITY_FETCH_BIDS,
ACTIVITY_REPORT_ANALYTICS,
- ACTIVITY_SYNC_USER
+ ACTIVITY_SYNC_USER, ACTIVITY_TRANSMIT_UFPD
} from '../src/activities/activities.js';
export const STRICT_STORAGE_ENFORCEMENT = 'strictStorageEnforcement';
const TCF2 = {
- 'purpose1': {id: 1, name: 'storage'},
- 'purpose2': {id: 2, name: 'basicAds'},
- 'purpose7': {id: 7, name: 'measurement'}
+ purpose1: {id: 1, name: 'storage'},
+ purpose2: {id: 2, name: 'basicAds'},
+ purpose4: {id: 4, name: 'personalizedAds'},
+ purpose7: {id: 7, name: 'measurement'},
};
/*
@@ -55,6 +56,7 @@ const DEFAULT_RULES = [{
export let purpose1Rule;
export let purpose2Rule;
+export let purpose4Rule;
export let purpose7Rule;
export let enforcementRules;
@@ -62,6 +64,7 @@ export let enforcementRules;
const storageBlocked = new Set();
const biddersBlocked = new Set();
const analyticsBlocked = new Set();
+const ufpdBlocked = new Set();
let hooksAdded = false;
let strictStorageEnforcement = false;
@@ -232,6 +235,8 @@ export const fetchBidsRule = ((rule) => {
export const reportAnalyticsRule = gdprRule(7, () => purpose7Rule, analyticsBlocked, (params) => getGvlidFromAnalyticsAdapter(params[ACTIVITY_PARAM_COMPONENT_NAME], params[ACTIVITY_PARAM_ANL_CONFIG]));
+export const transmitUfpdRule = gdprRule(4, () => purpose4Rule, ufpdBlocked);
+
/**
* Compiles the TCF2.0 enforcement results into an object, which is emitted as an event payload to "tcf2Enforcement" event.
*/
@@ -243,27 +248,20 @@ function emitTCF2FinalResults() {
const tcf2FinalResults = {
storageBlocked: formatSet(storageBlocked),
biddersBlocked: formatSet(biddersBlocked),
- analyticsBlocked: formatSet(analyticsBlocked)
+ analyticsBlocked: formatSet(analyticsBlocked),
+ ufpdBlocked: formatSet(ufpdBlocked),
};
events.emit(CONSTANTS.EVENTS.TCF2_ENFORCEMENT, tcf2FinalResults);
- [storageBlocked, biddersBlocked, analyticsBlocked].forEach(el => el.clear());
+ [storageBlocked, biddersBlocked, analyticsBlocked, ufpdBlocked].forEach(el => el.clear());
}
events.on(CONSTANTS.EVENTS.AUCTION_END, emitTCF2FinalResults);
-/*
- Set of callback functions used to detect presence of a TCF rule, passed as the second argument to find().
-*/
-const hasPurpose1 = (rule) => {
- return rule.purpose === TCF2.purpose1.name;
-};
-const hasPurpose2 = (rule) => {
- return rule.purpose === TCF2.purpose2.name;
-};
-const hasPurpose7 = (rule) => {
- return rule.purpose === TCF2.purpose7.name;
-};
+function hasPurpose(purposeNo) {
+ const pname = TCF2[`purpose${purposeNo}`].name;
+ return (rule) => rule.purpose === pname;
+}
/**
* A configuration function that initializes some module variables, as well as adds hooks
@@ -279,9 +277,10 @@ export function setEnforcementConfig(config) {
}
strictStorageEnforcement = !!deepAccess(config, STRICT_STORAGE_ENFORCEMENT);
- purpose1Rule = find(enforcementRules, hasPurpose1);
- purpose2Rule = find(enforcementRules, hasPurpose2);
- purpose7Rule = find(enforcementRules, hasPurpose7);
+ purpose1Rule = find(enforcementRules, hasPurpose(1));
+ purpose2Rule = find(enforcementRules, hasPurpose(2));
+ purpose4Rule = find(enforcementRules, hasPurpose(4))
+ purpose7Rule = find(enforcementRules, hasPurpose(7));
if (!purpose1Rule) {
purpose1Rule = DEFAULT_RULES[0];
@@ -301,6 +300,9 @@ export function setEnforcementConfig(config) {
if (purpose2Rule) {
RULE_HANDLES.push(registerActivityControl(ACTIVITY_FETCH_BIDS, RULE_NAME, fetchBidsRule));
}
+ if (purpose4Rule) {
+ RULE_HANDLES.push(registerActivityControl(ACTIVITY_TRANSMIT_UFPD, RULE_NAME, transmitUfpdRule));
+ }
if (purpose7Rule) {
RULE_HANDLES.push(registerActivityControl(ACTIVITY_REPORT_ANALYTICS, RULE_NAME, reportAnalyticsRule));
}
diff --git a/modules/gridBidAdapter.js b/modules/gridBidAdapter.js
index 8285b3308b7..ee8712b1de3 100644
--- a/modules/gridBidAdapter.js
+++ b/modules/gridBidAdapter.js
@@ -9,6 +9,7 @@ import {
isNumber,
isStr
} from '../src/utils.js';
+import { ajax } from '../src/ajax.js';
import { registerBidder } from '../src/adapters/bidderFactory.js';
import { Renderer } from '../src/Renderer.js';
import { VIDEO, BANNER } from '../src/mediaTypes.js';
@@ -17,6 +18,7 @@ import { getStorageManager } from '../src/storageManager.js';
const BIDDER_CODE = 'grid';
const ENDPOINT_URL = 'https://grid.bidswitch.net/hbjson';
+const USP_DELETE_DATA_HANDLER = 'https://media.grid.bidswitch.net/uspapi_delete'
const SYNC_URL = 'https://x.bidswitch.net/sync?ssp=themediagrid';
const TIME_TO_LIVE = 360;
@@ -462,6 +464,23 @@ export const spec = {
url: syncUrl + params
};
}
+ },
+
+ ajaxCall: function(url, cb, data, options) {
+ return ajax(url, cb, data, options);
+ },
+
+ onDataDeletionRequest: function(data) {
+ const uids = [];
+ const aliases = [spec.code, ...spec.aliases.map((alias) => alias.code || alias)];
+ data.forEach(({ bids }) => bids && bids.forEach(({ bidder, params }) => {
+ if (aliases.includes(bidder) && params && params.uid) {
+ uids.push(params.uid);
+ }
+ }));
+ if (uids.length) {
+ spec.ajaxCall(USP_DELETE_DATA_HANDLER, () => {}, JSON.stringify({ uids }), {contentType: 'application/json', method: 'POST'});
+ }
}
};
diff --git a/modules/holidBidAdapter.js b/modules/holidBidAdapter.js
index f41829bd123..2073063168d 100644
--- a/modules/holidBidAdapter.js
+++ b/modules/holidBidAdapter.js
@@ -1,4 +1,11 @@
-import {deepAccess, getBidIdParameter, isStr, logMessage, triggerPixel, } from '../src/utils.js';
+import {
+ deepAccess,
+ deepSetValue,
+ getBidIdParameter,
+ isStr,
+ logMessage,
+ triggerPixel,
+} from '../src/utils.js';
import * as events from '../src/events.js';
import CONSTANTS from '../src/constants.json';
import {BANNER} from '../src/mediaTypes.js';
@@ -10,6 +17,7 @@ const GVLID = 1177
const ENDPOINT = 'https://helloworld.holid.io/openrtb2/auction'
const COOKIE_SYNC_ENDPOINT = 'https://null.holid.io/sync.html'
const TIME_TO_LIVE = 300
+const TMAX = 500
let wurlMap = {}
events.on(CONSTANTS.EVENTS.BID_WON, bidWonHandler)
@@ -23,12 +31,19 @@ export const spec = {
return !!bid.params.adUnitID
},
- buildRequests: function (validBidRequests, _bidderRequest) {
+ buildRequests: function (validBidRequests, bidderRequest) {
return validBidRequests.map((bid) => {
const requestData = {
...bid.ortb2,
- id: _bidderRequest.bidderRequestId,
+ source: {schain: bid.schain},
+ id: bidderRequest.bidderRequestId,
imp: [getImp(bid)],
+ tmax: TMAX,
+ ...buildStoredRequest(bid)
+ }
+
+ if (bid.userIdAsEids) {
+ deepSetValue(requestData, 'user.ext.eids', bid.userIdAsEids)
}
return {
@@ -50,8 +65,6 @@ export const spec = {
serverResponse.body.seatbid.map((response) => {
response.bid.map((bid) => {
const requestId = bidRequest.bidId
- // TODO: fix auctionId leak: https://github.com/prebid/Prebid.js/issues/9781
- const auctionId = bidRequest.auctionId
const wurl = deepAccess(bid, 'ext.prebid.events.win')
const bidResponse = {
requestId,
@@ -65,7 +78,7 @@ export const spec = {
ttl: TIME_TO_LIVE,
}
- addWurl({ auctionId, requestId, wurl })
+ addWurl(requestId, wurl)
bidResponses.push(bidResponse)
})
@@ -75,11 +88,15 @@ export const spec = {
},
getUserSyncs(optionsType, serverResponse, gdprConsent, uspConsent) {
+ const syncs = [{
+ type: 'image',
+ url: 'https://track.adform.net/Serving/TrackPoint/?pm=2992097&lid=132720821'
+ }]
+
if (!serverResponse || serverResponse.length === 0) {
- return []
+ return syncs
}
- const syncs = []
const bidders = getBidders(serverResponse)
if (optionsType.iframeEnabled && bidders) {
@@ -100,24 +117,14 @@ export const spec = {
type: 'iframe',
url: COOKIE_SYNC_ENDPOINT + strQueryParams + '&type=iframe',
})
-
- return syncs
}
- return []
+ return syncs
},
}
function getImp(bid) {
- const imp = {
- ext: {
- prebid: {
- storedrequest: {
- id: getBidIdParameter('adUnitID', bid.params),
- },
- },
- },
- }
+ const imp = buildStoredRequest(bid)
const sizes =
bid.sizes && !Array.isArray(bid.sizes[0]) ? [bid.sizes] : bid.sizes
@@ -132,6 +139,18 @@ function getImp(bid) {
return imp
}
+function buildStoredRequest(bid) {
+ return {
+ ext: {
+ prebid: {
+ storedrequest: {
+ id: getBidIdParameter('adUnitID', bid.params),
+ },
+ },
+ },
+ }
+}
+
function getBidders(serverResponse) {
const bidders = serverResponse
.map((res) => Object.keys(res.body.ext.responsetimemillis || []))
@@ -142,28 +161,28 @@ function getBidders(serverResponse) {
}
}
-function addWurl(auctionId, adId, wurl) {
- if ([auctionId, adId].every(isStr)) {
- wurlMap[`${auctionId}${adId}`] = wurl
+function addWurl(requestId, wurl) {
+ if (isStr(requestId)) {
+ wurlMap[requestId] = wurl
}
}
-function removeWurl(auctionId, adId) {
- delete wurlMap[`${auctionId}${adId}`]
+function removeWurl(requestId) {
+ delete wurlMap[requestId]
}
-function getWurl(auctionId, adId) {
- if ([auctionId, adId].every(isStr)) {
- return wurlMap[`${auctionId}${adId}`]
+function getWurl(requestId) {
+ if (isStr(requestId)) {
+ return wurlMap[requestId]
}
}
function bidWonHandler(bid) {
- const wurl = getWurl(bid.auctionId, bid.adId)
+ const wurl = getWurl(bid.requestId)
if (wurl) {
logMessage(`Invoking image pixel for wurl on BID_WIN: "${wurl}"`)
triggerPixel(wurl)
- removeWurl(bid.auctionId, bid.adId)
+ removeWurl(bid.requestId)
}
}
diff --git a/modules/ixBidAdapter.js b/modules/ixBidAdapter.js
index 3146223f23c..5e39c43367f 100644
--- a/modules/ixBidAdapter.js
+++ b/modules/ixBidAdapter.js
@@ -76,7 +76,9 @@ const SOURCE_RTI_MAPPING = {
'audigent.com': '', // Hadron ID from Audigent, hadronId
'pubcid.org': '', // SharedID, pubcid
'utiq.com': '', // Utiq
- 'intimatemerger.com': ''
+ 'intimatemerger.com': '',
+ '33across.com': '',
+ 'liveintent.indexexchange.com': '',
};
const PROVIDERS = [
'britepoolid',
@@ -179,6 +181,41 @@ function bidToBannerImp(bid) {
return imp;
}
+/**
+ * Sets imp.displaymanager
+ *
+ * @param {object} imp
+ * @param {object} bid
+ */
+function setDisplayManager(imp, bid) {
+ if (deepAccess(bid, 'mediaTypes.video.context') === OUTSTREAM) {
+ let renderer = deepAccess(bid, 'mediaTypes.video.renderer');
+ if (!renderer) {
+ renderer = deepAccess(bid, 'renderer');
+ }
+
+ if (deepAccess(bid, 'schain', false)) {
+ imp.displaymanager = 'pbjs_wrapper';
+ } else if (renderer && typeof (renderer) === 'object') {
+ if (renderer.url !== undefined) {
+ let domain = '';
+ try {
+ domain = new URL(renderer.url).hostname
+ } catch {
+ return;
+ }
+ if (domain.includes('js-sec.indexww')) {
+ imp.displaymanager = 'ix';
+ } else {
+ imp.displaymanager = renderer.url;
+ }
+ }
+ } else {
+ imp.displaymanager = 'ix';
+ }
+ }
+}
+
/**
* Transform valid bid request config object to video impression object that will be sent to ad server.
*
@@ -198,8 +235,10 @@ export function bidToVideoImp(bid) {
// populate imp level transactionId
imp.ext.tid = deepAccess(bid, 'ortb2Imp.ext.tid');
+ setDisplayManager(imp, bid);
+
// AdUnit-Specific First Party Data
- addAdUnitFPD(imp, bid)
+ addAdUnitFPD(imp, bid);
// copy all video properties to imp object
for (const adUnitProperty in videoAdUnitRef) {
diff --git a/modules/kargoBidAdapter.js b/modules/kargoBidAdapter.js
index 5b315ef5791..1dde4453222 100644
--- a/modules/kargoBidAdapter.js
+++ b/modules/kargoBidAdapter.js
@@ -97,6 +97,10 @@ function buildRequests(validBidRequests, bidderRequest) {
user: getUserIds(tdidAdapter, bidderRequest.uspConsent, bidderRequest.gdprConsent, firstBidRequest.userIdAsEids, bidderRequest.gppConsent),
});
+ if (firstBidRequest.schain && firstBidRequest.schain.nodes) {
+ krakenParams.schain = firstBidRequest.schain
+ }
+
const reqCount = getRequestCount()
if (reqCount != null) {
krakenParams.requestCount = reqCount;
diff --git a/modules/livewrappedAnalyticsAdapter.js b/modules/livewrappedAnalyticsAdapter.js
index fe69220e123..f3ee81cae7a 100644
--- a/modules/livewrappedAnalyticsAdapter.js
+++ b/modules/livewrappedAnalyticsAdapter.js
@@ -168,7 +168,7 @@ livewrappedAnalyticsAdapter.sendEvents = function() {
requests: sentRequests.sentRequests,
responses: getResponses(sentRequests.gdpr, sentRequests.auctionIds),
wins: getWins(sentRequests.gdpr, sentRequests.auctionIds),
- timeouts: getTimeouts(sentRequests.auctionIds),
+ timeouts: getTimeouts(sentRequests.gdpr, sentRequests.auctionIds),
bidAdUnits: getbidAdUnits(),
rf: getAdRenderFailed(sentRequests.auctionIds),
rcv: getAdblockerRecovered()
@@ -237,27 +237,9 @@ function getResponses(gdpr, auctionIds) {
if (bid.readyToSend && !(bid.sendStatus & RESPONSESENT) && !bid.timeout) {
bid.sendStatus |= RESPONSESENT;
- responses.push({
- timeStamp: auction.timeStamp,
- adUnit: bid.adUnit,
- adUnitId: bid.adUnitId,
- bidder: bid.bidder,
- width: bid.width,
- height: bid.height,
- cpm: bid.cpm,
- orgCpm: bid.originalCpm,
- ttr: bid.ttr,
- IsBid: bid.isBid,
- mediaType: bid.mediaType,
- gdpr: gdprPos,
- floor: bid.lwFloor ? bid.lwFloor : (bid.floorData ? bid.floorData.floorValue : undefined),
- floorCur: bid.floorData ? bid.floorData.floorCurrency : undefined,
- auctionId: auctionIdPos,
- auc: bid.auc,
- buc: bid.buc,
- lw: bid.lw,
- meta: bid.meta
- });
+ let response = getResponseObject(auction, bid, gdprPos, auctionIdPos);
+
+ responses.push(response);
}
});
});
@@ -337,27 +319,45 @@ function getAuctionIdPos(auctionIds, auctionId) {
return auctionIdPos;
}
-function getTimeouts(auctionIds) {
+function getResponseObject(auction, bid, gdprPos, auctionIdPos) {
+ return {
+ timeStamp: auction.timeStamp,
+ adUnit: bid.adUnit,
+ adUnitId: bid.adUnitId,
+ bidder: bid.bidder,
+ width: bid.width,
+ height: bid.height,
+ cpm: bid.cpm,
+ orgCpm: bid.originalCpm,
+ ttr: bid.ttr,
+ IsBid: bid.isBid,
+ mediaType: bid.mediaType,
+ gdpr: gdprPos,
+ floor: bid.lwFloor ? bid.lwFloor : (bid.floorData ? bid.floorData.floorValue : undefined),
+ floorCur: bid.floorData ? bid.floorData.floorCurrency : undefined,
+ auctionId: auctionIdPos,
+ auc: bid.auc,
+ buc: bid.buc,
+ lw: bid.lw,
+ meta: bid.meta
+ };
+}
+
+function getTimeouts(gdpr, auctionIds) {
var timeouts = [];
Object.keys(cache.auctions).forEach(auctionId => {
let auctionIdPos = getAuctionIdPos(auctionIds, auctionId);
Object.keys(cache.auctions[auctionId].bids).forEach(bidId => {
let auction = cache.auctions[auctionId];
+ let gdprPos = getGdprPos(gdpr, auction);
let bid = auction.bids[bidId];
if (!(bid.sendStatus & TIMEOUTSENT) && bid.timeout) {
bid.sendStatus |= TIMEOUTSENT;
- timeouts.push({
- bidder: bid.bidder,
- adUnit: bid.adUnit,
- adUnitId: bid.adUnitId,
- timeStamp: auction.timeStamp,
- auctionId: auctionIdPos,
- auc: bid.auc,
- buc: bid.buc,
- lw: bid.lw
- });
+ let timeout = getResponseObject(auction, bid, gdprPos, auctionIdPos);
+
+ timeouts.push(timeout);
}
});
});
diff --git a/modules/mediagoBidAdapter.js b/modules/mediagoBidAdapter.js
index 055fef3bb39..756e636572d 100644
--- a/modules/mediagoBidAdapter.js
+++ b/modules/mediagoBidAdapter.js
@@ -242,6 +242,7 @@ function getItems(validBidRequests, bidderRequest) {
ext: {
// gpid: gpid, // 加入后无法返回广告
},
+ tagid: req.params && req.params.tagid,
};
itemMaps[id] = {
req,
diff --git a/modules/minutemediaBidAdapter.js b/modules/minutemediaBidAdapter.js
index 85c1386957d..bb0bb76bdbc 100644
--- a/modules/minutemediaBidAdapter.js
+++ b/modules/minutemediaBidAdapter.js
@@ -307,6 +307,15 @@ function generateBidParameters(bid, bidderRequest) {
bidObject.placementId = placementId;
}
+ const mimes = deepAccess(bid, `mediaTypes.${mediaType}.mimes`);
+ if (mimes) {
+ bidObject.mimes = mimes;
+ }
+ const api = deepAccess(bid, `mediaTypes.${mediaType}.api`);
+ if (api) {
+ bidObject.api = api;
+ }
+
const sua = deepAccess(bid, `ortb2.device.sua`);
if (sua) {
bidObject.sua = sua;
@@ -358,6 +367,11 @@ function generateBidParameters(bid, bidderRequest) {
bidObject.linearity = linearity;
}
+ const protocols = deepAccess(bid, `mediaTypes.video.protocols`);
+ if (protocols) {
+ bidObject.protocols = protocols;
+ }
+
const plcmt = deepAccess(bid, `mediaTypes.video.plcmt`);
if (plcmt) {
bidObject.plcmt = plcmt;
@@ -398,7 +412,8 @@ function generateGeneralParams(generalObject, bidderRequest) {
dnt: (navigator.doNotTrack == 'yes' || navigator.doNotTrack == '1' || navigator.msDoNotTrack == '1') ? 1 : 0,
device_type: getDeviceType(navigator.userAgent),
ua: navigator.userAgent,
- session_id: getBidIdParameter('bidderRequestId', generalObject),
+ is_wrapper: !!generalBidParams.isWrapper,
+ session_id: generalBidParams.sessionId || getBidIdParameter('bidderRequestId', generalObject),
tmax: timeout
}
@@ -441,7 +456,7 @@ function generateGeneralParams(generalObject, bidderRequest) {
if (bidderRequest && bidderRequest.refererInfo) {
generalParams.referrer = deepAccess(bidderRequest, 'refererInfo.ref');
- generalParams.page_url = deepAccess(bidderRequest, 'refererInfo.page') || window.location.href
+ generalParams.page_url = deepAccess(bidderRequest, 'refererInfo.page') || deepAccess(window, 'location.href');
}
return generalParams
diff --git a/modules/pubmaticBidAdapter.js b/modules/pubmaticBidAdapter.js
index eb2ad8ccb03..ce0da73f751 100644
--- a/modules/pubmaticBidAdapter.js
+++ b/modules/pubmaticBidAdapter.js
@@ -1194,6 +1194,15 @@ export const spec = {
deepSetValue(payload, 'regs.ext.us_privacy', bidderRequest.uspConsent);
}
+ // Attaching GPP Consent Params
+ if (bidderRequest?.gppConsent?.gppString) {
+ deepSetValue(payload, 'regs.gpp', bidderRequest.gppConsent.gppString);
+ deepSetValue(payload, 'regs.gpp_sid', bidderRequest.gppConsent.applicableSections);
+ } else if (bidderRequest?.ortb2?.regs?.gpp) {
+ deepSetValue(payload, 'regs.gpp', bidderRequest.ortb2.regs.gpp);
+ deepSetValue(payload, 'regs.gpp_sid', bidderRequest.ortb2.regs.gpp_sid);
+ }
+
// coppa compliance
if (config.getConfig('coppa') === true) {
deepSetValue(payload, 'regs.coppa', 1);
@@ -1352,7 +1361,7 @@ export const spec = {
/**
* Register User Sync.
*/
- getUserSyncs: (syncOptions, responses, gdprConsent, uspConsent) => {
+ getUserSyncs: (syncOptions, responses, gdprConsent, uspConsent, gppConsent) => {
let syncurl = '' + publisherId;
// Attaching GDPR Consent Params in UserSync url
@@ -1366,6 +1375,12 @@ export const spec = {
syncurl += '&us_privacy=' + encodeURIComponent(uspConsent);
}
+ // GPP Consent
+ if (gppConsent?.gppString && gppConsent?.applicableSections?.length) {
+ syncurl += '&gpp=' + encodeURIComponent(gppConsent.gppString);
+ syncurl += '&gpp_sid=' + encodeURIComponent(gppConsent?.applicableSections?.join(','));
+ }
+
// coppa compliance
if (config.getConfig('coppa') === true) {
syncurl += '&coppa=1';
diff --git a/modules/pulsepointBidAdapter.js b/modules/pulsepointBidAdapter.js
index 015e80d5692..7297c931326 100644
--- a/modules/pulsepointBidAdapter.js
+++ b/modules/pulsepointBidAdapter.js
@@ -1,21 +1,9 @@
-import { convertOrtbRequestToProprietaryNative } from '../src/native.js';
-/* eslint dot-notation:0, quote-props:0 */
-import {convertTypes, deepAccess, isArray, isFn, logError} from '../src/utils.js';
+import { ortbConverter } from '../libraries/ortbConverter/converter.js';
+import {convertTypes, isArray} from '../src/utils.js';
import {registerBidder} from '../src/adapters/bidderFactory.js';
-import {Renderer} from '../src/Renderer.js';
-const NATIVE_DEFAULTS = {
- TITLE_LEN: 100,
- DESCR_LEN: 200,
- SPONSORED_BY_LEN: 50,
- IMG_MIN: 150,
- ICON_MIN: 50,
-};
-
-const DEFAULT_BID_TTL = 20;
const DEFAULT_CURRENCY = 'USD';
-const DEFAULT_NET_REVENUE = true;
-const KNOWN_PARAMS = ['cp', 'ct', 'cf', 'video', 'battr', 'bcat', 'badv', 'bidfloor'];
+const KNOWN_PARAMS = ['cp', 'ct', 'cf', 'battr', 'deals'];
const DEFAULT_TMAX = 500;
/**
@@ -41,33 +29,21 @@ export const spec = {
),
buildRequests: (bidRequests, bidderRequest) => {
- // convert Native ORTB definition to old-style prebid native definition
- bidRequests = convertOrtbRequestToProprietaryNative(bidRequests);
-
- const request = {
- id: bidRequests[0].bidderRequestId,
- imp: bidRequests.map(slot => impression(slot)),
- site: site(bidRequests, bidderRequest),
- app: app(bidRequests),
- device: device(),
- bcat: deepAccess(bidderRequest.ortb2Imp, 'bcat') || bidRequests[0].params.bcat,
- badv: bidRequests[0].params.badv,
- user: user(bidRequests[0], bidderRequest),
- regs: regs(bidderRequest),
- source: source(bidRequests[0].schain),
- tmax: bidderRequest.timeout || DEFAULT_TMAX,
- };
+ const data = converter.toORTB({bidRequests, bidderRequest});
return {
method: 'POST',
url: 'https://bid.contextweb.com/header/ortb?src=prebid',
- data: request,
+ data,
bidderRequest
};
},
- interpretResponse: (response, request) => (
- bidResponseAvailable(request, response)
- ),
+ interpretResponse: (response, request) => {
+ if (response.body) {
+ return converter.fromORTB({response: response.body, request: request.data}).bids;
+ }
+ return [];
+ },
getUserSyncs: syncOptions => {
if (syncOptions.iframeEnabled) {
@@ -82,7 +58,7 @@ export const spec = {
}];
}
},
- transformBidParams: function(params, isOpenRtb) {
+ transformBidParams: function(params) {
return convertTypes({
'cf': 'string',
'cp': 'number',
@@ -91,124 +67,61 @@ export const spec = {
}
};
-/**
- * Callback for bids, after the call to PulsePoint completes.
- */
-function bidResponseAvailable(request, response) {
- const idToImpMap = {};
- const idToBidMap = {};
- const idToSlotConfig = {};
- const bidResponse = response.body;
- // extract the request bids and the response bids, keyed by impr-id
- const ortbRequest = request.data;
- ortbRequest.imp.forEach(imp => {
- idToImpMap[imp.id] = imp;
- });
- if (bidResponse) {
- bidResponse.seatbid.forEach(seatBid => seatBid.bid.forEach(bid => {
- idToBidMap[bid.impid] = bid;
- }));
- }
- if (request.bidderRequest && request.bidderRequest.bids) {
- request.bidderRequest.bids.forEach(bid => {
- idToSlotConfig[bid.bidId] = bid;
- });
- }
- const bids = [];
- Object.keys(idToImpMap).forEach(id => {
- if (idToBidMap[id]) {
- const bid = {
- requestId: id,
- cpm: idToBidMap[id].price,
- creative_id: idToBidMap[id].crid,
- creativeId: idToBidMap[id].crid,
- adId: id,
- ttl: idToBidMap[id].exp || DEFAULT_BID_TTL,
- netRevenue: DEFAULT_NET_REVENUE,
- currency: bidResponse.cur || DEFAULT_CURRENCY,
- meta: { advertiserDomains: idToBidMap[id].adomain || [] }
- };
- if (idToImpMap[id].video) {
- // for outstream, a renderer is specified
- if (idToSlotConfig[id] && deepAccess(idToSlotConfig[id], 'mediaTypes.video.context') === 'outstream') {
- bid.renderer = outstreamRenderer(deepAccess(idToSlotConfig[id], 'renderer.options'), deepAccess(idToBidMap[id], 'ext.outstream'));
+const converter = ortbConverter({
+ context: {
+ netRevenue: true,
+ ttl: 300,
+ currency: 'USD'
+ },
+
+ imp(buildImp, bidRequest, context) {
+ const imp = buildImp(bidRequest, context);
+ // tagid
+ imp.tagid = bidRequest.params.ct.toString();
+ // unknown params
+ const unknownParams = slotUnknownParams(bidRequest);
+ if (imp.ext || unknownParams) {
+ imp.ext = Object.assign({}, imp.ext, unknownParams);
+ }
+ // battr
+ if (bidRequest.params.battr) {
+ ['banner', 'video', 'audio', 'native'].forEach(k => {
+ if (imp[k]) {
+ imp[k].battr = bidRequest.params.battr;
}
- bid.vastXml = idToBidMap[id].adm;
- bid.mediaType = 'video';
- bid.width = idToBidMap[id].w;
- bid.height = idToBidMap[id].h;
- } else if (idToImpMap[id].banner) {
- bid.ad = idToBidMap[id].adm;
- bid.width = idToBidMap[id].w || idToImpMap[id].banner.w;
- bid.height = idToBidMap[id].h || idToImpMap[id].banner.h;
- } else if (idToImpMap[id]['native']) {
- bid['native'] = nativeResponse(idToImpMap[id], idToBidMap[id]);
- bid.mediaType = 'native';
- }
- bids.push(bid);
+ });
}
- });
- return bids;
-}
-
-/**
- * Produces an OpenRTBImpression from a slot config.
- */
-function impression(slot) {
- var firstPartyData = slot.ortb2Imp?.ext || {};
- var ext = Object.assign({}, firstPartyData, slotUnknownParams(slot));
- return {
- id: slot.bidId,
- banner: banner(slot),
- 'native': nativeImpression(slot),
- tagid: slot.params.ct.toString(),
- video: video(slot),
- bidfloor: bidFloor(slot),
- ext: Object.keys(ext).length > 0 ? ext : null,
- };
-}
-
-/**
- * Produces an OpenRTB Banner object for the slot given.
- */
-function banner(slot) {
- const sizes = parseSizes(slot);
- const size = adSize(slot, sizes);
- return (slot.mediaTypes && slot.mediaTypes.banner) ? {
- w: size[0],
- h: size[1],
- battr: slot.params.battr,
- format: sizes
- } : null;
-}
+ // deals
+ if (bidRequest.params.deals && isArray(bidRequest.params.deals)) {
+ imp.pmp = {
+ private_auction: 0,
+ deals: bidRequest.params.deals
+ };
+ }
+ return imp;
+ },
-/**
- * Produce openrtb format objects based on the sizes configured for the slot.
- */
-function parseSizes(slot) {
- const sizes = deepAccess(slot, 'mediaTypes.banner.sizes');
- if (sizes && isArray(sizes)) {
- return sizes.filter(sz => isArray(sz) && sz.length === 2).map(sz => ({
- w: sz[0],
- h: sz[1]
- }));
- }
- return null;
-}
+ request(buildRequest, imps, bidderRequest, context) {
+ const request = buildRequest(imps, bidderRequest, context);
+ // publisher id
+ const siteOrApp = request.site || request.app;
+ const pubId = context.bidRequests && context.bidRequests.length > 0 ? context.bidRequests[0].params.cp : '0';
+ if (siteOrApp) {
+ siteOrApp.publisher = Object.assign({}, siteOrApp.publisher, {
+ id: pubId.toString()
+ });
+ }
+ // tmax
+ request.tmax = request.tmax || DEFAULT_TMAX;
+ return request;
+ },
-/**
- * Produces an OpenRTB Video object for the slot given
- */
-function video(slot) {
- if (slot.params.video) {
- return Object.assign({},
- slot.params.video, // previously supported as bidder param
- slot.mediaTypes && slot.mediaTypes.video ? slot.mediaTypes.video : {}, // params on mediaTypes.video
- {battr: slot.params.battr}
- );
- }
- return null;
-}
+ bidResponse(buildBidResponse, bid, context) {
+ const bidResponse = buildBidResponse(bid, context);
+ bidResponse.cur = bidResponse.cur || DEFAULT_CURRENCY;
+ return bidResponse;
+ },
+});
/**
* Unknown params are captured and sent on ext
@@ -225,278 +138,4 @@ function slotUnknownParams(slot) {
return Object.keys(ext).length > 0 ? { prebid: ext } : null;
}
-/**
- * Sets up the renderer on the bid, for outstream bid responses.
- */
-function outstreamRenderer(rendererOptions, outstreamExtOptions) {
- const renderer = Renderer.install({
- url: outstreamExtOptions.rendererUrl,
- config: {
- defaultOptions: outstreamExtOptions.config,
- rendererOptions,
- type: outstreamExtOptions.type
- },
- loaded: false,
- });
- renderer.setRender((bid) => {
- bid.renderer.push(() => {
- const config = bid.renderer.getConfig();
- new window.PulsePointOutstreamRenderer().render({
- adUnitCode: bid.adUnitCode,
- vastXml: bid.vastXml,
- type: config.type,
- defaultOptions: config.defaultOptions,
- rendererOptions
- });
- });
- });
- return renderer;
-}
-
-/**
- * Produces an OpenRTB Native object for the slot given.
- */
-function nativeImpression(slot) {
- if (slot.nativeParams) {
- const assets = [];
- addAsset(assets, titleAsset(assets.length + 1, slot.nativeParams.title, NATIVE_DEFAULTS.TITLE_LEN));
- addAsset(assets, dataAsset(assets.length + 1, slot.nativeParams.body, 2, NATIVE_DEFAULTS.DESCR_LEN));
- addAsset(assets, dataAsset(assets.length + 1, slot.nativeParams.sponsoredBy, 1, NATIVE_DEFAULTS.SPONSORED_BY_LEN));
- addAsset(assets, imageAsset(assets.length + 1, slot.nativeParams.icon, 1, NATIVE_DEFAULTS.ICON_MIN, NATIVE_DEFAULTS.ICON_MIN));
- addAsset(assets, imageAsset(assets.length + 1, slot.nativeParams.image, 3, NATIVE_DEFAULTS.IMG_MIN, NATIVE_DEFAULTS.IMG_MIN));
- return {
- request: JSON.stringify({ assets }),
- ver: '1.1',
- battr: slot.params.battr,
- };
- }
- return null;
-}
-
-/**
- * Helper method to add an asset to the assets list.
- */
-function addAsset(assets, asset) {
- if (asset) {
- assets.push(asset);
- }
-}
-
-/**
- * Produces a Native Title asset for the configuration given.
- */
-function titleAsset(id, params, defaultLen) {
- if (params) {
- return {
- id,
- required: params.required ? 1 : 0,
- title: {
- len: params.len || defaultLen,
- },
- };
- }
- return null;
-}
-
-/**
- * Produces a Native Image asset for the configuration given.
- */
-function imageAsset(id, params, type, defaultMinWidth, defaultMinHeight) {
- return params ? {
- id,
- required: params.required ? 1 : 0,
- img: {
- type,
- wmin: params.wmin || defaultMinWidth,
- hmin: params.hmin || defaultMinHeight,
- }
- } : null;
-}
-
-/**
- * Produces a Native Data asset for the configuration given.
- */
-function dataAsset(id, params, type, defaultLen) {
- return params ? {
- id,
- required: params.required ? 1 : 0,
- data: {
- type,
- len: params.len || defaultLen,
- }
- } : null;
-}
-
-/**
- * Produces an OpenRTB site object.
- */
-function site(bidRequests, bidderRequest) {
- const pubId = bidRequests && bidRequests.length > 0 ? bidRequests[0].params.cp : '0';
- const appParams = bidRequests[0].params.app;
- if (!appParams) {
- // use the first party data if available, and override only publisher/ref/page properties
- var firstPartyData = bidderRequest?.ortb2?.site || {};
- return Object.assign({}, firstPartyData, {
- publisher: {
- id: pubId.toString(),
- },
- // TODO: does the fallback make sense here?
- ref: bidderRequest?.refererInfo?.ref || window.document.referrer,
- page: bidderRequest?.refererInfo?.page || ''
- });
- }
- return null;
-}
-
-/**
- * Produces an OpenRTB App object.
- */
-function app(bidderRequest) {
- const pubId = bidderRequest && bidderRequest.length > 0 ? bidderRequest[0].params.cp : '0';
- const appParams = bidderRequest[0].params.app;
- if (appParams) {
- return {
- publisher: {
- id: pubId.toString(),
- },
- bundle: appParams.bundle,
- storeurl: appParams.storeUrl,
- domain: appParams.domain,
- }
- }
- return null;
-}
-
-/**
- * Produces an OpenRTB Device object.
- */
-function device() {
- return {
- ua: navigator.userAgent,
- language: (navigator.language || navigator.browserLanguage || navigator.userLanguage || navigator.systemLanguage),
- };
-}
-
-/**
- * Safely parses the input given. Returns null on
- * parsing failure.
- */
-function parse(rawResponse) {
- try {
- if (rawResponse) {
- return JSON.parse(rawResponse);
- }
- } catch (ex) {
- logError('pulsepointLite.safeParse', 'ERROR', ex);
- }
- return null;
-}
-
-/**
- * Determines the AdSize for the slot.
- */
-function adSize(slot, sizes) {
- if (slot.params.cf) {
- const size = slot.params.cf.toUpperCase().split('X');
- const width = parseInt(slot.params.cw || size[0], 10);
- const height = parseInt(slot.params.ch || size[1], 10);
- return [width, height];
- } else if (sizes && sizes.length > 0) {
- return [sizes[0].w, sizes[0].h];
- }
- return [1, 1];
-}
-
-/**
- * Handles the user level attributes and produces
- * an openrtb User object.
- */
-function user(bidRequest, bidderRequest) {
- var user = bidderRequest?.ortb2?.user || { ext: {} };
- var ext = user.ext;
- if (bidderRequest) {
- if (bidderRequest.gdprConsent) {
- ext.consent = bidderRequest.gdprConsent.consentString;
- }
- }
- if (bidRequest) {
- let eids = bidRequest.userIdAsEids;
- if (eids) {
- ext.eids = eids;
- }
- }
- return user;
-}
-
-/**
- * Produces the regulations ortb object
- */
-function regs(bidderRequest) {
- if (bidderRequest.gdprConsent || bidderRequest.uspConsent) {
- var ext = {};
- // GDPR applies attribute (actual consent value is in user object)
- if (bidderRequest.gdprConsent) {
- ext.gdpr = bidderRequest.gdprConsent.gdprApplies ? 1 : 0;
- }
- // CCPA
- if (bidderRequest.uspConsent) {
- ext.us_privacy = bidderRequest.uspConsent;
- }
- return { ext };
- }
- return null;
-}
-
-/**
- * Creates source object with supply chain
- */
-function source(schain) {
- if (schain) {
- return {
- ext: { schain }
- };
- }
- return null;
-}
-
-/**
- * Parses the native response from the Bid given.
- */
-function nativeResponse(imp, bid) {
- if (imp['native']) {
- const nativeAd = parse(bid.adm);
- const keys = {};
- if (nativeAd && nativeAd['native'] && nativeAd['native'].assets) {
- nativeAd['native'].assets.forEach(asset => {
- keys.title = asset.title ? asset.title.text : keys.title;
- keys.body = asset.data && asset.data.type === 2 ? asset.data.value : keys.body;
- keys.sponsoredBy = asset.data && asset.data.type === 1 ? asset.data.value : keys.sponsoredBy;
- keys.image = asset.img && asset.img.type === 3 ? asset.img.url : keys.image;
- keys.icon = asset.img && asset.img.type === 1 ? asset.img.url : keys.icon;
- });
- if (nativeAd['native'].link) {
- keys.clickUrl = encodeURIComponent(nativeAd['native'].link.url);
- }
- keys.impressionTrackers = nativeAd['native'].imptrackers;
- return keys;
- }
- }
- return null;
-}
-
-function bidFloor(slot) {
- let floor = slot.params.bidfloor;
- if (isFn(slot.getFloor)) {
- const floorData = slot.getFloor({
- mediaType: slot.mediaTypes.banner ? 'banner' : slot.mediaTypes.video ? 'video' : 'Native',
- size: '*',
- currency: DEFAULT_CURRENCY,
- });
- if (floorData && floorData.floor) {
- floor = floorData.floor;
- }
- }
- return floor;
-}
-
registerBidder(spec);
diff --git a/modules/pulsepointBidAdapter.md b/modules/pulsepointBidAdapter.md
index 7f4b7e6b611..899c277f92f 100644
--- a/modules/pulsepointBidAdapter.md
+++ b/modules/pulsepointBidAdapter.md
@@ -2,7 +2,7 @@
**Module Name**: PulsePoint Bidder Adapter
**Module Type**: Bidder Adapter
-**Maintainer**: ExchangeTeam@pulsepoint.com
+**Maintainer**: ExchangeTeam@pulsepoint.com
# Description
@@ -18,55 +18,49 @@ Please use ```pulsepoint``` as the bidder code.
sizes: [[300, 250]],
bids: [{
bidder: 'pulsepoint',
- params: {
- cf: '300X250',
+ params: {
cp: 512379,
ct: 486653
}
}]
},{
- code: 'native-ad-div',
- sizes: [[1, 1]],
- nativeParams: {
- title: { required: true, len: 75 },
- image: { required: true },
- body: { len: 200 },
- sponsoredBy: { len: 20 }
- },
- bids: [{
- bidder: 'pulsepoint',
- params: {
- cp: 512379,
- ct: 505642
- }
- }]
- },{
- code: 'outstream-div',
- mediaTypes: {
- video: {
- playerSize: [640, 480],
- context: 'outstream',
- h: 300,
- w: 400,
- minduration: 1,
- maxduration: 210,
- linearity: 1,
- mimes: ["video/mp4", "video/ogg", "video/webm"],
- pos: 3
- }
- },
- bids: [{
- bidder: 'pulsepoint',
- params: {
- cp: 512379,
- ct: 505642
- }
- }],
- renderer: {
- options: {
- text: "PulsePoint Outstream"
- }
- }
+ code: 'native-1-slot',
+ mediaTypes: {
+ native: {
+ ortb: {
+ assets: [{
+ id: 1,
+ required: 1,
+ img: {
+ type: 3,
+ w: 150,
+ h: 50,
+ }
+ },
+ {
+ id: 2,
+ required: 1,
+ title: {
+ len: 80
+ }
+ },
+ {
+ id: 3,
+ required: 1,
+ data: {
+ type: 1
+ }
+ }]
+ }
+ }
+ },
+ bids: [{
+ bidder: 'pulsepoint',
+ params: {
+ cp: 512379,
+ ct: 694973
+ }
+ }]
},{
code: 'instream',
mediaTypes: {
diff --git a/modules/sharedIdSystem.js b/modules/sharedIdSystem.js
index ef56e10870b..26f6f75b7a0 100644
--- a/modules/sharedIdSystem.js
+++ b/modules/sharedIdSystem.js
@@ -13,7 +13,7 @@ import {VENDORLESS_GVLID} from '../src/consentHandler.js';
import {MODULE_TYPE_UID} from '../src/activities/modules.js';
import {domainOverrideToRootDomain} from '../libraries/domainOverrideToRootDomain/index.js';
-export const storage = getStorageManager({moduleType: MODULE_TYPE_UID, moduleName: 'pubCommonId'});
+export const storage = getStorageManager({moduleType: MODULE_TYPE_UID, moduleName: 'sharedId'});
const COOKIE = 'cookie';
const LOCAL_STORAGE = 'html5';
const OPTOUT_NAME = '_pubcid_optout';
diff --git a/modules/sovrnBidAdapter.js b/modules/sovrnBidAdapter.js
index 0633c3e0cb8..0d077ad2ae3 100644
--- a/modules/sovrnBidAdapter.js
+++ b/modules/sovrnBidAdapter.js
@@ -248,7 +248,7 @@ export const spec = {
}
},
- getUserSyncs: function(syncOptions, serverResponses, gdprConsent, uspConsent) {
+ getUserSyncs: function(syncOptions, serverResponses, gdprConsent, uspConsent, gppConsent) {
try {
const tracks = []
if (serverResponses && serverResponses.length !== 0) {
@@ -262,6 +262,10 @@ export const spec = {
if (uspConsent) {
params.push(['us_privacy', uspConsent]);
}
+ if (gppConsent) {
+ params.push(['gpp', gppConsent.gppString]);
+ params.push(['gpp_sid', gppConsent.applicableSections])
+ }
if (iidArr[0]) {
params.push(['informer', iidArr[0]]);
diff --git a/modules/stroeerCoreBidAdapter.js b/modules/stroeerCoreBidAdapter.js
index 0737bec5a12..307a50c7f78 100644
--- a/modules/stroeerCoreBidAdapter.js
+++ b/modules/stroeerCoreBidAdapter.js
@@ -1,4 +1,4 @@
-import {buildUrl, deepAccess, getWindowSelf, getWindowTop, isEmpty, isStr, logWarn} from '../src/utils.js';
+import { buildUrl, deepAccess, generateUUID, getWindowSelf, getWindowTop, isEmpty, isStr, logWarn } from '../src/utils.js';
import {registerBidder} from '../src/adapters/bidderFactory.js';
import {BANNER, VIDEO} from '../src/mediaTypes.js';
import {find} from '../src/polyfill.js';
@@ -50,8 +50,7 @@ export const spec = {
const refererInfo = bidderRequest.refererInfo;
const basePayload = {
- // TODO: fix auctionId leak: https://github.com/prebid/Prebid.js/issues/9781
- id: bidderRequest.auctionId,
+ id: generateUUID(),
ref: refererInfo.ref,
ssl: isSecureWindow(),
mpa: isMainPageAccessible(),
diff --git a/modules/topicsFpdModule.js b/modules/topicsFpdModule.js
index 4cb11af48fc..97d86d5aff2 100644
--- a/modules/topicsFpdModule.js
+++ b/modules/topicsFpdModule.js
@@ -15,10 +15,13 @@ let LOAD_TOPICS_INITIALISE = false;
const HAS_DEVICE_ACCESS = hasDeviceAccess();
const bidderIframeList = {
- maxTopicCaller: 1,
+ maxTopicCaller: 2,
bidders: [{
bidder: 'pubmatic',
iframeURL: 'https://ads.pubmatic.com/AdServer/js/topics/topics_frame.html'
+ }, {
+ bidder: 'rtbhouse',
+ iframeURL: 'https://topics.authorizedvault.com/topicsapi.html'
}]
}
export const coreStorage = getCoreStorageManager(MODULE_NAME);
diff --git a/modules/topicsFpdModule.md b/modules/topicsFpdModule.md
index b1bc3cb0d5b..6ef0bf241dd 100644
--- a/modules/topicsFpdModule.md
+++ b/modules/topicsFpdModule.md
@@ -36,6 +36,10 @@ pbjs.setConfig({
bidder: 'pubmatic',
iframeURL: 'https://ads.pubmatic.com/AdServer/js/topics/topics_frame.html',
expiry: 7 // Configurable expiry days
+ },{
+ bidder: 'rtbhouse',
+ iframeURL: 'https://topics.authorizedvault.com/topicsapi.html',
+ expiry: 7 // Configurable expiry days
},{
bidder: 'rubicon',
iframeURL: 'https://rubicon.com:8080/topics/fpd/topic.html', // dummy URL
diff --git a/modules/userId/index.js b/modules/userId/index.js
index 6f330274bfb..6d4ddf9aa9e 100644
--- a/modules/userId/index.js
+++ b/modules/userId/index.js
@@ -743,14 +743,14 @@ function registerSignalSources() {
if (!isGptPubadsDefined()) {
return;
}
- window.googletag.encryptedSignalProviders = window.googletag.encryptedSignalProviders || [];
+ window.googletag.secureSignalProviders = window.googletag.secureSignalProviders || [];
const encryptedSignalSources = config.getConfig('userSync.encryptedSignalSources');
if (encryptedSignalSources) {
const registerDelay = encryptedSignalSources.registerDelay || 0;
setTimeout(() => {
encryptedSignalSources['sources'] && encryptedSignalSources['sources'].forEach(({ source, encrypt, customFunc }) => {
source.forEach((src) => {
- window.googletag.encryptedSignalProviders.push({
+ window.googletag.secureSignalProviders.push({
id: src,
collectorFunction: () => getEncryptedEidsForSource(src, encrypt, customFunc)
});
diff --git a/modules/vidazooBidAdapter.js b/modules/vidazooBidAdapter.js
index 42c7031fb2a..71b9eae29a5 100644
--- a/modules/vidazooBidAdapter.js
+++ b/modules/vidazooBidAdapter.js
@@ -56,7 +56,6 @@ function buildRequestData(bid, topWindowUrl, sizes, bidderRequest, bidderTimeout
adUnitCode,
schain,
mediaTypes,
- auctionId,
ortb2Imp,
bidderRequestId,
bidRequestsCount,
@@ -112,8 +111,6 @@ function buildRequestData(bid, topWindowUrl, sizes, bidderRequest, bidderTimeout
gpid: gpid,
cat: cat,
pagecat: pagecat,
- // TODO: fix auctionId leak: https://github.com/prebid/Prebid.js/issues/9781
- auctionId: auctionId,
transactionId: ortb2Imp?.ext?.tid,
bidderRequestId: bidderRequestId,
bidRequestsCount: bidRequestsCount,
@@ -179,9 +176,9 @@ function buildSingleRequest(bidRequests, bidderRequest, topWindowUrl, bidderTime
const sizes = parseSizesInput(bid.sizes);
return buildRequestData(bid, topWindowUrl, sizes, bidderRequest, bidderTimeout)
});
- const CHUNK_SIZE = Math.min(10, config.getConfig('vidazoo.chunkSize') || 10);
+ const chunkSize = Math.min(20, config.getConfig('vidazoo.chunkSize') || 10);
- const chunkedData = chunk(data, CHUNK_SIZE);
+ const chunkedData = chunk(data, chunkSize);
return chunkedData.map(chunk => {
return {
method: 'POST',
@@ -226,14 +223,15 @@ function buildRequests(validBidRequests, bidderRequest) {
const requests = [];
if (singleRequestMode) {
- // We need to split the requests into banner and video requests
+ // banner bids are sent as a single request
const bannerBidRequests = validBidRequests.filter(bid => isArray(bid.mediaTypes) ? bid.mediaTypes.includes(BANNER) : bid.mediaTypes[BANNER] !== undefined);
if (bannerBidRequests.length > 0) {
const singleRequests = buildSingleRequest(bannerBidRequests, bidderRequest, topWindowUrl, bidderTimeout);
requests.push(...singleRequests);
}
- // Video Logic
+ // video bids are sent as a single request for each bid
+
const videoBidRequests = validBidRequests.filter(bid => bid.mediaTypes[VIDEO] !== undefined);
videoBidRequests.forEach(validBidRequest => {
const sizes = parseSizesInput(validBidRequest.sizes);
diff --git a/modules/voxBidAdapter.js b/modules/voxBidAdapter.js
index acf1cc9579c..34bd46ccb98 100644
--- a/modules/voxBidAdapter.js
+++ b/modules/voxBidAdapter.js
@@ -4,6 +4,9 @@ import {BANNER, VIDEO} from '../src/mediaTypes.js';
import {find} from '../src/polyfill.js';
import {auctionManager} from '../src/auctionManager.js';
import {Renderer} from '../src/Renderer.js';
+import {config} from '../src/config.js'
+
+const { getConfig } = config;
const BIDDER_CODE = 'vox';
const SSP_ENDPOINT = 'https://ssp.hybrid.ai/auction/prebid';
@@ -11,13 +14,21 @@ const VIDEO_RENDERER_URL = 'https://acdn.adnxs.com/video/outstream/ANOutstreamVi
const TTL = 60;
function buildBidRequests(validBidRequests) {
- return _map(validBidRequests, function(validBidRequest) {
- const params = validBidRequest.params;
+ return _map(validBidRequests, function(bid) {
+ const currency = getConfig('currency.adServerCurrency');
+ const floorInfo = bid.getFloor ? bid.getFloor({
+ currency: currency || 'USD'
+ }) : {};
+
+ const params = bid.params;
const bidRequest = {
- bidId: validBidRequest.bidId,
+ floorInfo,
+ schain: bid.schain,
+ userId: bid.userId,
+ bidId: bid.bidId,
// TODO: fix transactionId leak: https://github.com/prebid/Prebid.js/issues/9781
- transactionId: validBidRequest.transactionId,
- sizes: validBidRequest.sizes,
+ transactionId: bid.transactionId,
+ sizes: bid.sizes,
placement: params.placement,
placeId: params.placementId,
imageUrl: params.imageUrl
diff --git a/modules/yahoosspBidAdapter.js b/modules/yahoosspBidAdapter.js
index 7a414c0d2ee..a66d76f8689 100644
--- a/modules/yahoosspBidAdapter.js
+++ b/modules/yahoosspBidAdapter.js
@@ -6,9 +6,10 @@ import { Renderer } from '../src/Renderer.js';
import {hasPurpose1Consent} from '../src/utils/gpdr.js';
const INTEGRATION_METHOD = 'prebid.js';
-const BIDDER_CODE = 'yahoossp';
+const BIDDER_CODE = 'yahooAds';
+const BIDDER_ALIASES = ['yahoossp', 'yahooAdvertising']
const GVLID = 25;
-const ADAPTER_VERSION = '1.0.2';
+const ADAPTER_VERSION = '1.1.0';
const PREBID_VERSION = '$prebid.version$';
const DEFAULT_BID_TTL = 300;
const TEST_MODE_DCN = '8a969516017a7a396ec539d97f540011';
@@ -49,13 +50,17 @@ const SUPPORTED_USER_ID_SOURCES = [
'quantcast.com',
'tapad.com',
'uidapi.com',
- 'verizonmedia.com',
'yahoo.com',
'zeotap.com'
];
/* Utility functions */
+function getConfigValue(bid, key) {
+ const bidderCode = bid.bidder || bid.bidderCode;
+ return config.getConfig(`${bidderCode}.${key}`);
+}
+
function getSize(size) {
return {
w: parseInt(size[0]),
@@ -114,11 +119,12 @@ function extractUserSyncUrls(syncOptions, pixels) {
*/
function updateConsentQueryParams(url, consentData) {
const parameterMap = {
- 'gdpr_consent': consentData.gdpr.consentString,
- 'gdpr': consentData.gdpr.gdprApplies ? '1' : '0',
- 'us_privacy': consentData.uspConsent,
- 'gpp': consentData.gpp.gppString,
- 'gpp_sid': consentData.gpp.applicableSections ? consentData.gpp.applicableSections.join(',') : ''
+ 'gdpr_consent': consentData.gdpr ? consentData.gdpr.consentString : '',
+ 'gdpr': consentData.gdpr && consentData.gdpr.gdprApplies ? '1' : '0',
+ 'us_privacy': consentData.uspConsent ? consentData.uspConsent : '',
+ 'gpp': consentData.gpp ? consentData.gpp.gppString : '',
+ 'gpp_sid': consentData.gpp && Array.isArray(consentData.gpp.applicableSections)
+ ? consentData.gpp.applicableSections.join(',') : ''
}
const existingUrl = new URL(url);
@@ -155,8 +161,8 @@ function getPubIdMode(bid) {
return pubIdMode;
};
-function getAdapterMode() {
- let adapterMode = config.getConfig('yahoossp.mode');
+function getAdapterMode(bid) {
+ let adapterMode = getConfigValue(bid, 'mode');
adapterMode = adapterMode ? adapterMode.toLowerCase() : undefined;
if (typeof adapterMode === 'undefined' || adapterMode === BANNER) {
return BANNER;
@@ -177,7 +183,7 @@ function getResponseFormat(bid) {
};
function getFloorModuleData(bid) {
- const adapterMode = getAdapterMode();
+ const adapterMode = getAdapterMode(bid);
const getFloorRequestObject = {
currency: deepAccess(bid, 'params.bidOverride.cur') || DEFAULT_CURRENCY,
mediaType: adapterMode,
@@ -187,7 +193,7 @@ function getFloorModuleData(bid) {
};
function filterBidRequestByMode(validBidRequests) {
- const mediaTypesMode = getAdapterMode();
+ const mediaTypesMode = getAdapterMode(validBidRequests[0]);
let result = [];
if (mediaTypesMode === BANNER) {
result = validBidRequests.filter(bid => {
@@ -244,7 +250,7 @@ function validateAppendObject(validationType, allowedKeys, inputObject, appendTo
};
function getTtl(bidderRequest) {
- const globalTTL = config.getConfig('yahoossp.ttl');
+ const globalTTL = getConfigValue(bidderRequest, 'ttl');
return globalTTL ? validateTTL(globalTTL) : validateTTL(deepAccess(bidderRequest, 'params.ttl'));
};
@@ -276,8 +282,8 @@ function generateOpenRtbObject(bidderRequest, bid) {
ext: {
'us_privacy': bidderRequest.uspConsent ? bidderRequest.uspConsent : '',
gdpr: bidderRequest.gdprConsent && bidderRequest.gdprConsent.gdprApplies ? 1 : 0,
- gpp: bidderRequest.gppConsent.gppString,
- gpp_sid: bidderRequest.gppConsent.applicableSections
+ gpp: bidderRequest.gppConsent ? bidderRequest.gppConsent.gppString : '',
+ gpp_sid: bidderRequest.gppConsent ? bidderRequest.gppConsent.applicableSections : []
}
},
source: {
@@ -332,7 +338,7 @@ function generateOpenRtbObject(bidderRequest, bid) {
};
function appendImpObject(bid, openRtbObject) {
- const mediaTypeMode = getAdapterMode();
+ const mediaTypeMode = getAdapterMode(bid);
if (openRtbObject && bid) {
const impObject = {
@@ -494,20 +500,21 @@ function appendFirstPartyData(outBoundBidRequest, bid) {
function generateServerRequest({payload, requestOptions, bidderRequest}) {
const pubIdMode = getPubIdMode(bidderRequest);
- let sspEndpoint = config.getConfig('yahoossp.endpoint') || SSP_ENDPOINT_DCN_POS;
+ const overrideEndpoint = getConfigValue(bidderRequest, 'endpoint');
+ let sspEndpoint = overrideEndpoint || SSP_ENDPOINT_DCN_POS;
if (pubIdMode === true) {
- sspEndpoint = config.getConfig('yahoossp.endpoint') || SSP_ENDPOINT_PUBID;
+ sspEndpoint = overrideEndpoint || SSP_ENDPOINT_PUBID;
};
if (deepAccess(bidderRequest, 'params.testing.e2etest') === true) {
- logInfo('yahoossp adapter e2etest mode is active');
+ logInfo('Adapter e2etest mode is active');
requestOptions.withCredentials = false;
if (pubIdMode === true) {
payload.site.id = TEST_MODE_PUBID_DCN;
} else {
- const mediaTypeMode = getAdapterMode();
+ const mediaTypeMode = getAdapterMode(bidderRequest);
payload.site.id = TEST_MODE_DCN;
payload.imp.forEach(impObject => {
impObject.ext.e2eTestMode = true;
@@ -516,8 +523,9 @@ function generateServerRequest({payload, requestOptions, bidderRequest}) {
} else if (mediaTypeMode === VIDEO) {
impObject.tagid = TEST_MODE_VIDEO_POS; // video passback
} else {
- logWarn('yahoossp adapter e2etest mode does not support yahoossp.mode="all". \n Please specify either "banner" or "video"');
- logWarn('yahoossp adapter e2etest mode: Please make sure your adUnit matches the yahoossp.mode video or banner');
+ const bidderCode = bidderRequest.bidderCode;
+ logWarn(`e2etest mode does not support ${bidderCode}.mode="all". \n Please specify either "banner" or "video"`);
+ logWarn(`Adapter e2etest mode: Please make sure your adUnit matches the ${bidderCode}.mode video or banner`);
}
});
}
@@ -528,7 +536,7 @@ function generateServerRequest({payload, requestOptions, bidderRequest}) {
method: 'POST',
data: payload,
options: requestOptions,
- bidderRequest: bidderRequest
+ bidderRequest // Additional data for use in interpretResponse()
};
};
@@ -547,7 +555,7 @@ function createRenderer(bidderRequest, bidResponse) {
}, deepAccess(bidderRequest, 'params.testing.renderer.setTimeout') || DEFAULT_RENDERER_TIMEOUT);
});
} catch (error) {
- logWarn('yahoossp renderer error: setRender() failed', error);
+ logWarn('Renderer error: setRender() failed', error);
}
return renderer;
}
@@ -557,7 +565,7 @@ function createRenderer(bidderRequest, bidResponse) {
export const spec = {
code: BIDDER_CODE,
gvlid: GVLID,
- aliases: [],
+ aliases: BIDDER_ALIASES,
supportedMediaTypes: [BANNER, VIDEO],
isBidRequestValid: function(bid) {
@@ -570,14 +578,14 @@ export const spec = {
) {
return true;
} else {
- logWarn('yahoossp bidder params missing or incorrect, please pass object with either: dcn & pos OR pubId');
+ logWarn('Bidder params missing or incorrect, please pass object with either: dcn & pos OR pubId');
return false;
}
},
buildRequests: function(validBidRequests, bidderRequest) {
if (isEmpty(validBidRequests) || isEmpty(bidderRequest)) {
- logWarn('yahoossp Adapter: buildRequests called with either empty "validBidRequests" or "bidderRequest"');
+ logWarn('buildRequests called with either empty "validBidRequests" or "bidderRequest"');
return undefined;
};
@@ -592,13 +600,12 @@ export const spec = {
const filteredBidRequests = filterBidRequestByMode(validBidRequests);
- if (config.getConfig('yahoossp.singleRequestMode') === true) {
+ if (getConfigValue(bidderRequest, 'singleRequestMode') === true) {
const payload = generateOpenRtbObject(bidderRequest, filteredBidRequests[0]);
filteredBidRequests.forEach(bid => {
appendImpObject(bid, payload);
});
-
- return generateServerRequest({payload, requestOptions, bidderRequest});
+ return [generateServerRequest({payload, requestOptions, bidderRequest})];
}
return filteredBidRequests.map(bid => {
@@ -608,12 +615,11 @@ export const spec = {
});
},
- interpretResponse: function(serverResponse, { data, bidderRequest }) {
+ interpretResponse: function(serverResponse, { bidderRequest }) {
const response = [];
if (!serverResponse.body || !Array.isArray(serverResponse.body.seatbid)) {
return response;
}
-
let seatbids = serverResponse.body.seatbid;
seatbids.forEach(seatbid => {
let bid;
@@ -628,7 +634,6 @@ export const spec = {
let bidResponse = {
adId: deepAccess(bid, 'adId') ? bid.adId : bid.impid || bid.crid,
- adUnitCode: bidderRequest.adUnitCode,
requestId: bid.impid,
cpm: cpm,
width: bid.w,
diff --git a/modules/yahoosspBidAdapter.md b/modules/yahoosspBidAdapter.md
index 35a640b92b1..c8c42930e5b 100644
--- a/modules/yahoosspBidAdapter.md
+++ b/modules/yahoosspBidAdapter.md
@@ -1,10 +1,10 @@
# Overview
-**Module Name:** yahoossp Bid Adapter
+**Module Name:** Yahoo Advertising Bid Adapter
**Module Type:** Bidder Adapter
**Maintainer:** hb-fe-tech@yahooinc.com
# Description
-The Yahoo SSP Bid Adapter is an OpenRTB interface that consolidates all previous "Oath.inc" adapters such as: "aol", "oneMobile", "oneDisplay" & "oneVideo" supply-side platforms.
+The Yahoo Advertising Bid Adapter is an OpenRTB interface that consolidates all previous "Oath.inc" adapters such as: "aol", "oneMobile", "oneDisplay" & "oneVideo" supply-side platforms.
# Supported Features:
* Media Types: Banner & Video
@@ -21,49 +21,51 @@ The Yahoo SSP Bid Adapter is an OpenRTB interface that consolidates all previous
# Adapter Request mode
-Since the yahoossp adapter now supports both Banner and Video adUnits a controller was needed to allow you to define when the adapter should generate a bid-requests to our Yahoo SSP.
+Since the Yahoo Advertising bid adapter supports both Banner and Video adUnits, a controller was needed to allow you to define when the adapter should generate a bid-requests to the Yahoo bid endpoint.
**Important!** By default the adapter mode is set to "banner" only.
-This means that you do not need to explicitly declare the yahoossp.mode in the Global config to initiate banner adUnit requests.
+This means that you do not need to explicitly declare the `yahooAds.mode` property in the global config to initiate banner adUnit requests.
## Request modes:
* **undefined** - (Default) Will generate bid-requests for "Banner" formats only.
* **banner** - Will generate bid-requests for "Banner" formats only (Explicit declaration).
* **video** - Will generate bid-requests for "Video" formats only (Explicit declaration).
-* **all** - Will generate bid-requests for both "Banner" & "Video" formats
+* **all** - Will generate bid-requests for both "Banner" & "Video" formats.
-**Important!** When setting yahoossp.mode = 'all' Make sure your Yahoo SSP Placement (pos id) supports both Banner & Video placements.
-If it does not, the Yahoo SSP will respond only in the format it is set too.
+**Important!** When setting `yahooAds.mode` to `'all'`, make sure your Yahoo Placement (pos id) supports both Banner & Video placements.
+If it does not, the Yahoo bid server will respond only in the format it is set too.
+### Example: explicitly setting the request mode
```javascript
pbjs.setConfig({
- yahoossp: {
+ yahooAds: {
mode: 'banner' // 'all', 'video', 'banner' (default)
}
});
```
+
# Integration Options
-The `yahoossp` bid adapter supports 2 types of integration:
+The Yahoo Advertising bid adapter supports 2 types of integration:
1. **dcn & pos** DEFAULT (Site/App & Position targeting) - For Display partners/publishers.
-2. **pubId** (Publisher ID) - For legacy "oneVideo" AND New partners/publishers.
-**Important:** pubId integration (option 2) is only possible when your Seller account is setup for "Inventory Mapping".
+2. **pubId** (Publisher ID) - For legacy "oneVideo" AND new partners/publishers.
+**Important:** pubId integration (option 2) is only possible when your seller account is setup for "Inventory Mapping".
**Please Note:** Most examples in this file are using dcn & pos.
## Who is currently eligible for "pubId" integration
At this time, only the following partners/publishers are eligble for pubId integration:
-1. New partners/publishers that do not have any existing accounts on Yahoo SSP (aka: aol, oneMobile, oneDisplay).
+1. New partners/publishers that do not have an existing account with Yahoo Advertising (aka: aol, oneMobile, oneDisplay).
2. Video SSP (oneVideo) partners/publishers that
A. Do not have any display/banner inventory.
- B. Do not have any existing accounts on Yahoo SSP (aka: aol, oneMobile, oneDisplay).
+ B. Do not have an existing account with Yahoo Advertising (aka: aol, oneMobile, oneDisplay).
# Mandatory Bidder Parameters
## dcn & pos (DEFAULT)
-The minimal requirements for the 'yahoossp' bid adapter to generate an outbound bid-request to our Yahoo SSP are:
+The minimal requirements for the Yahoo Advertising bid adapter to generate an outbound bid-request to Yahoo's bid endpoint are:
1. At least 1 adUnit including mediaTypes: banner or video
2. **bidder.params** object must include:
- A. **dcn:** Yahoo SSP Site/App inventory parameter.
- B. **pos:** Yahoo SSP position inventory parameter.
+ A. **dcn:** Yahoo Advertising Site/App inventory parameter.
+ B. **pos:** Yahoo Advertising position inventory parameter.
### Example: dcn & pos Mandatory Parameters (Single banner adUnit)
```javascript
@@ -76,10 +78,10 @@ const adUnits = [{
},
bids: [
{
- bidder: 'yahoossp',
+ bidder: 'yahooAds',
params: {
- dcn: '8a969516017a7a396ec539d97f540011', // Site/App ID provided from SSP
- pos: '8a969978017a7aaabab4ab0bc01a0009' // Placement ID provided from SSP
+ dcn: '8a969516017a7a396ec539d97f540011', // Site/App ID provided by Yahoo Advertising
+ pos: '8a969978017a7aaabab4ab0bc01a0009' // Placement ID provided by Yahoo Advertising
}
}
]
@@ -87,10 +89,10 @@ const adUnits = [{
```
## pubId
-The minimal requirements for the 'yahoossp' bid adapter to generate an outbound bid-request to our Yahoo SSP are:
+The minimal requirements for the Yahoo Advertising bid adapter to generate an outbound bid-request to Yahoo's bid endpoint are:
1. At least 1 adUnit including mediaTypes: banner or video
2. **bidder.params** object must include:
- A. **pubId:** Yahoo SSP Publisher ID (AKA oneVideo pubId/Exchange name)
+ A. **pubId:** Yahoo Advertising Publisher ID (AKA oneVideo pubId/Exchange name)
### Example: pubId Mandatory Parameters (Single banner adUnit)
```javascript
@@ -103,14 +105,15 @@ const adUnits = [{
},
bids: [
{
- bidder: 'yahoossp',
+ bidder: 'yahooAds',
params: {
- pubId: 'DemoPublisher', // Publisher External ID provided from Yahoo SSP.
+ pubId: 'DemoPublisher', // Publisher defined external ID as configured by Yahoo Advertising.
}
}
]
}];
```
+
# Advanced adUnit Examples:
## Banner
```javascript
@@ -124,21 +127,22 @@ const adUnits = [{
}
},
bids: [{
- bidder: 'yahoossp',
+ bidder: 'yahooAds',
params: {
- dcn: '8a969516017a7a396ec539d97f540011', // Site/App ID provided from Yahoo SSP
- pos: '8a969978017a7aaabab4ab0bc01a0009', // Placement ID provided from Yahoo SSP
+ dcn: '8a969516017a7a396ec539d97f540011', // Site/App ID provided by Yahoo Advertising
+ pos: '8a969978017a7aaabab4ab0bc01a0009', // Placement ID provided by Yahoo Advertising
}
}
}]
}];
```
+
## Video Instream
-**Important!** Make sure that the Yahoo SSP Placement type (in-stream) matches the adUnit video inventory type.
+**Important!** Make sure that the Yahoo Advertising Placement type (in-stream) matches the adUnit video inventory type.
**Note:** Make sure to set the adapter mode to allow video requests by setting it to mode: 'video' OR mode: 'all'.
```javascript
pbjs.setConfig({
- yahoossp: {
+ yahooAds: {
mode: 'video'
}
});
@@ -156,20 +160,21 @@ const adUnits = [{
}
},
bids: [{
- bidder: 'yahoossp',
+ bidder: 'yahooAds',
params: {
- dcn: '8a969516017a7a396ec539d97f540011', // Site/App ID provided from Yahoo SSP
- pos: '8a96958a017a7a57ac375d50c0c700cc', // Placement ID provided from Yahoo SSP
+ dcn: '8a969516017a7a396ec539d97f540011', // Site/App ID provided by Yahoo Advertising
+ pos: '8a96958a017a7a57ac375d50c0c700cc', // Placement ID provided by Yahoo Advertising
}
}]
}];
+
```
## Video Outstream
-**Important!** Make sure that the Yahoo SSP Placement type (in-feed/ in-article) matches the adUnit video inventory type.
+**Important!** Make sure that the Yahoo Advertsing placement type (in-feed/ in-article) matches the adUnit video inventory type.
**Note:** Make sure to set the adapter mode to allow video requests by setting it to mode: 'video' OR mode: 'all'
```javascript
pbjs.setConfig({
- yahoossp: {
+ yahooAds: {
mode: 'video'
}
});
@@ -187,22 +192,22 @@ const adUnits = [{
}
},
bids: [{
- bidder: 'yahoossp',
+ bidder: 'yahooAds',
params: {
- dcn: '8a969516017a7a396ec539d97f540011', // Site/App ID provided from Yahoo SSP
- pos: '8a96958a017a7a57ac375d50c0c700cc', // Placement ID provided from Yahoo SSP
+ dcn: '8a969516017a7a396ec539d97f540011', // Site/App ID provided by Yahoo Advertising
+ pos: '8a96958a017a7a57ac375d50c0c700cc', // Placement ID provided by Yahoo Advertising
}
}]
}];
+
```
## Multi-Format
-**Important!** If you intend to use the yahoossp bidder for both Banner and Video formats please make sure:
-1. Set the adapter as mode: 'all' - to call the Yahoo SSP for both banner & video formats.
-2. Make sure the Yahoo SSP placement (pos id) supports both banner & video format requests.
-
+**Important!** If you intend to use the Yahoo Advertising bidder for both Banner and Video formats please make sure:
+1. Set the adapter as mode: 'all' - to configure the bid adapter to call the bid endpoint for both banner & video formats.
+2. Make sure the Yahoo Advertising placement (pos id) supports both banner & video format requests.
```javascript
pbjs.setConfig({
- yahoossp: {
+ yahooAds: {
mode: 'all'
}
});
@@ -223,19 +228,18 @@ const adUnits = [{
}
},
bids: [{
- bidder: 'yahoossp',
+ bidder: 'yahooAds',
params: {
- dcn: '8a969516017a7a396ec539d97f540011', // Site/App ID provided from Yahoo SSP
- pos: '8a96958a017a7a57ac375d50c0c700cc', // Placement ID provided from Yahoo SSP
+ dcn: '8a969516017a7a396ec539d97f540011', // Site/App ID provided by Yahoo Advertising
+ pos: '8a96958a017a7a57ac375d50c0c700cc', // Placement ID provided by Yahoo Advertising
}
}]
}];
```
# Optional: Schain module support
-The yahoossp adapter supports the Prebid.org Schain module and will pass it through to our Yahoo SSP
+The Yahoo Advertising bid adapter supports the Prebid.org Schain module and will pass it through to our bid endpoint.
For further details please see, https://docs.prebid.org/dev-docs/modules/schain.html
-
## Global Schain Example:
```javascript
pbjs.setConfig({
@@ -256,7 +260,7 @@ For further details please see, https://docs.prebid.org/dev-docs/modules/schain.
## Bidder Specific Schain Example:
```javascript
pbjs.setBidderConfig({
- "bidders": ['yahoossp'], // can list more bidders here if they share the same config
+ "bidders": ['yahooAds'], // can list more bidders here if they share the same config
"config": {
"schain": {
"validation": "strict",
@@ -275,12 +279,10 @@ For further details please see, https://docs.prebid.org/dev-docs/modules/schain.
```
# Optional: Price floors module & bidfloor
-The yahoossp adapter supports the Prebid.org Price Floors module and will use it to define the outbound bidfloor and currency.
-By default the adapter will always check the existance of Module price floor.
-If a module price floor does not exist you can set a custom bid floor for your impression using "params.bidOverride.imp.bidfloor".
+The Yahoo Advertising bid adapter supports the Prebid.org Price Floors module and will use it to define the outbound bidfloor and currency, if the relevant floors have been defined in the configuration.
+A cusom method for defining bid floors is also supported, this can be enabled by setting the `params.bidOverride.imp.bidfloor` bidder parameter.
**Note:** All override params apply to all requests generated using this configuration regardless of format type.
-
```javascript
const adUnits = [{
code: 'override-pricefloor',
@@ -292,10 +294,10 @@ const adUnits = [{
}
},
bids: [{
- bidder: 'yahoossp',
+ bidder: 'yahooAds',
params: {
- dcn: '8a969516017a7a396ec539d97f540011', // Site/App ID provided from Yahoo SSP
- pos: '8a969978017a7aaabab4ab0bc01a0009', // Placement ID provided from Yahoo SSP
+ dcn: '8a969516017a7a396ec539d97f540011', // Site/App ID provided by Yahoo Advertising
+ pos: '8a969978017a7aaabab4ab0bc01a0009', // Placement ID provided by Yahoo Advertising
bidOverride :{
imp: {
bidfloor: 5.00 // bidOverride priceFloor
@@ -310,21 +312,21 @@ const adUnits = [{
For further details please see, https://docs.prebid.org/dev-docs/modules/floors.html
# Optional: Self-served E2E testing mode
-If you want to see how the yahoossp adapter works and loads you are invited to try it out using our testing mode.
+If you want to see how the Yahoo Advertising bid adapter works and loads you are invited to try it out using our testing mode.
This is useful for integration testing and response parsing when checking banner vs video capabilities.
## How to use E2E test mode:
-1. Set the yahoossp global config mode to either 'banner' or 'video' - depending on the adUnit you want to test.
+1. Set the `yahooAds` global config mode to either `'banner'` or `'video'` - depending on the adUnit you want to test.
2. Add params.testing.e2etest: true to your adUnit bidder config - See examples below.
**Note:** When using E2E Test Mode you do not need to pass mandatory bidder params dcn or pos.
-**Important!** E2E Testing Mode only works when the Bidder Request Mode is set explicitly to either 'banner' or 'video'.
+**Important!** E2E Testing Mode only works when the Bidder Request Mode is set explicitly to either `'banner'` or `'video'`.
## Activating E2E Test for "Banner"
```javascript
pbjs.setConfig({
- yahoossp: {
+ yahooAds: {
mode: 'banner' // select 'banner' or 'video' to define what response to load
}
});
@@ -338,7 +340,7 @@ const adUnits = [{
},
bids: [
{
- bidder: 'yahoossp',
+ bidder: 'yahooAds',
params: {
testing: {
e2etest: true // Activate E2E Test mode
@@ -353,7 +355,7 @@ const adUnits = [{
**Note:** We recommend using Video Outstream as it would load the video response using our Outstream Renderer feature
```javascript
pbjs.setConfig({
- yahoossp: {
+ yahooAds: {
mode: 'video'
}
});
@@ -371,7 +373,7 @@ const adUnits = [{
}
},
bids: [{
- bidder: 'yahoossp',
+ bidder: 'yahooAds',
params: {
testing: {
e2etest: true // Activate E2E Test mode
@@ -382,8 +384,8 @@ const adUnits = [{
```
# Optional: First Party Data
-The yahoossp adapter now supports first party data passed via:
-1. Global ortb2 object using pbjs.setConfig()
+The Yahoo Advertising bid adapter supports first party data passed via:
+1. Global ortb2 object using `pbjs.setConfig()`
2. adUnit ortb2Imp object declared within an adUnit.
For further details please see, https://docs.prebid.org/features/firstPartyData.html
## Global First Party Data "ortb2"
@@ -392,15 +394,15 @@ For further details please see, https://docs.prebid.org/features/firstPartyData.
pbjs.setConfig({
ortb2: {
site: {
- name: 'yahooAdTech',
- domain: 'yahooadtech.com',
+ name: 'Yahoo Advertising',
+ domain: 'yahooadvertising.com',
cat: ['IAB2'],
sectioncat: ['IAB2-2'],
pagecat: ['IAB2-2'],
- page: 'https://page.yahooadtech.com/here.html',
- ref: 'https://ref.yahooadtech.com/there.html',
+ page: 'https://page.yahooadvertising.com.com/here.html',
+ ref: 'https://ref.yahooadvertising.com.com/there.html',
keywords:'yahoo, ad, tech',
- search: 'SSP',
+ search: 'header bidding',
content: {
id: '1234',
title: 'Title',
@@ -521,7 +523,7 @@ pbjs.setConfig({
## AdUnit First Party Data "ortb2Imp"
Most DSPs are adopting the Global Placement ID (GPID).
-Please pass your placement specific GPID value to Yahoo SSP using `adUnit.ortb2Imp.ext.data.pbadslot`.
+Please pass your placement specific GPID value by setting `adUnit.ortb2Imp.ext.data.pbadslot`.
```javascript
const adUnits = [{
code: 'placement',
@@ -541,7 +543,7 @@ const adUnits = [{
}
},
bids: [{
- bidder: 'yahoossp',
+ bidder: 'yahooAds',
params: {
pubdId: 'DemoPublisher'
}
@@ -551,7 +553,7 @@ const adUnits = [{
```
# Optional: Bidder bidOverride Parameters
-The yahoossp adapter allows passing override data to the outbound bid-request in that overrides First Party Data.
+The Yahoo Advertising bid adapter allows passing override data to the outbound bid-request that overrides First Party Data.
**Important!** We highly recommend using prebid modules to pass data instead of bidder speicifc overrides.
The use of these parameters are a last resort to force a specific feature or use case in your implementation.
@@ -577,7 +579,6 @@ Currently the bidOverride object only accepts the following:
* device
* ip
-
```javascript
const adUnits = [{
code: 'bidOverride-adUnit',
@@ -590,7 +591,7 @@ const adUnits = [{
}
},
bids: [{
- bidder: 'yahoossp',
+ bidder: 'yahooAds',
params: {
dcn: '8a969516017a7a396ec539d97f540011',
pos: '8a96958a017a7a57ac375d50c0c700cc',
@@ -615,7 +616,7 @@ const adUnits = [{
}
},
site: {
- page: 'https://yahoossp-bid-adapter.com',
+ page: 'https://yahooAdvertising-bid-adapter.com',
},
device: {
ip: "1.2.3.4"
@@ -630,7 +631,7 @@ const adUnits = [{
Custom key-value paris can be used for both inventory targeting and reporting.
You must set up key-value pairs in the Yahoo SSP before sending them via the adapter otherwise the Ad Server will not be listening and picking them up.
-Important! Key-value pairs can only contain values of types: String, Number, Array of strings OR Array of numbers
+Important! Key-value pairs can only contain values of the following data types: String, Number, Array of strings OR Array of numbers
```javascript
const adUnits = [{
@@ -644,7 +645,7 @@ const adUnits = [{
}
},
bids: [{
- bidder: 'yahoossp',
+ bidder: 'yahooAds',
params: {
dcn: '8a969516017a7a396ec539d97f540011',
pos: '8a96958a017a7a57ac375d50c0c700cc',
@@ -660,14 +661,14 @@ const adUnits = [{
```
# Optional: Custom Cache Time To Live (ttl):
-The yahoossp adapter supports passing of "Time To Live" (ttl) that indicates to prebid chache for how long to keep the chaced winning bid alive. Value is Number in seconds and you can enter any number between 1 - 3600 (seconds).
-The setting can be defined globally using setConfig or within the adUnit.params.
-Global level setConfig overrides adUnit.params.
+The Yahoo Advertising bid adapter supports passing of "Time To Live" (ttl) to indicate to prebid how long the bid response from Yahoo Advertising should be retained by Prebid for. This configuration value must be a Number in seconds, with the valid range being 1 - 3600 inclusive.
+The setting can be defined globally using `setConfig` or within the adUnit.params.
+Global level `setConfig` overrides adUnit.params.
If no value is being passed default is 300 seconds.
## Global TTL
```javascript
pbjs.setConfig({
- yahoossp: {
+ yahooAds: {
ttl: 300
}
});
@@ -683,7 +684,7 @@ const adUnits = [{
}
},
bids: [{
- bidder: 'yahoossp',
+ bidder: 'yahooAds',
params: {
dcn: '8a969516017a7a396ec539d97f540011',
pos: '8a96958a017a7a57ac375d50c0c700cc',
@@ -702,7 +703,7 @@ const adUnits = [{
}
},
bids: [{
- bidder: 'yahoossp',
+ bidder: 'yahooAds',
params: {
dcn: '8a969516017a7a396ec539d97f540011',
pos: '8a96958a017a7a57ac375d50c0c700cc',
@@ -710,10 +711,11 @@ const adUnits = [{
}
}]
}]
+
```
# Optional: Video Features
## Rewarded video flag
-To indicate to Yahoo SSP that this adUnit is a rewarded video you can pass the following in the params.bidOverride.imp.video.rewarded: 1
+To indicate to Yahoo Advertising that this adUnit is a rewarded video you can set the `params.bidOverride.imp.video.rewarded` property to `1`
```javascript
const adUnits = [{
@@ -727,7 +729,7 @@ const adUnits = [{
}
},
bids: [{
- bidder: 'yahoossp',
+ bidder: 'yahooAds',
params: {
dcn: '8a969516017a7a396ec539d97f540011',
pos: '8a96958a017a7a57ac375d50c0c700cc',
@@ -744,7 +746,7 @@ const adUnits = [{
```
## Site/App Targeting for "pubId" Inventory Mapping
-To target your adUnit explicitly to a specific Site/App Object in Yahoo SSP, you can pass one of the following:
+To target your adUnit explicitly to a specific Site/App Object in Yahoo Advertising, you can pass one of the following:
1. params.siteId = External Site ID || Video SSP RTBIS Id (in String format).
2. params.bidOverride.site.id = External Site ID || Video SSP RTBIS Id (in String format).
**Important:** Site override is a only supported when using "pubId" mode.
@@ -762,7 +764,7 @@ const adUnits = [{
}
},
bids: [{
- bidder: 'yahoossp',
+ bidder: 'yahooAds',
params: {
pubId: 'DemoPublisher',
siteId: '1234567';
@@ -772,13 +774,13 @@ const adUnits = [{
```
## Placement Targeting for "pubId" Inventory Mapping
-To target your adUnit explicitly to a specific Placement within a Site/App Object in Yahoo SSP, you can pass the following params.placementId = External Placement ID || Placement Alias
+To target your adUnit explicitly to a specific Placement within a Site/App Object in Yahoo Advertising, you can pass the following params.placementId = External Placement ID || Placement Alias
**Important!** Placement override is a only supported when using "pubId" mode.
-**Important!** It is highly recommended that you pass both `siteId` AND `placementId` together to avoid inventory miss matching.
+**Important!** It is highly recommended that you pass both `siteId` AND `placementId` together to avoid inventory mismatching.
### Site & Placement override
-**Important!** If the placement ID does not reside under the defined Site/App object, the request will not resolve and no response will be sent back from the ad-server.
+**Important!** If the placement ID does not reside under the defined Site/App object, the request will not resolve and no response will be sent back from the bid-server.
```javascript
const adUnits = [{
code: 'pubId-site-targeting-adUnit',
@@ -791,7 +793,7 @@ const adUnits = [{
}
},
bids: [{
- bidder: 'yahoossp',
+ bidder: 'yahooAds',
params: {
pubId: 'DemoPublisher',
siteId: '1234567',
@@ -801,7 +803,7 @@ const adUnits = [{
}]
```
### Placement only override
-**Important!** Using this method is not advised if you have multiple Site/Apps that are broken out of a Run Of Network (RON) Site/App. If the placement ID does not reside under a matching Site/App object, the request will not resolve and no response will be sent back from the ad-server.
+**Important!** Using this method is not advised if you have multiple Site/Apps that are broken out of a Run Of Network (RON) Site/App. If the placement ID does not reside under a matching Site/App object, the request will not resolve and no response will be sent back from the bid-server.
```javascript
const adUnits = [{
code: 'pubId-site-targeting-adUnit',
@@ -814,7 +816,7 @@ const adUnits = [{
}
},
bids: [{
- bidder: 'yahoossp',
+ bidder: 'yahooAds',
params: {
pubId: 'DemoPublisher',
placementId: 'header-250x300'
@@ -824,9 +826,8 @@ const adUnits = [{
```
# Optional: Legacy override Parameters
-This adapter does not support passing legacy overrides via 'bidder.params.ext' since most of the data should be passed using prebid modules (First Party Data, Schain, Price Floors etc.).
+This adapter does not support passing legacy overrides via `bidder.params.ext` since most of the data should be passed using prebid modules (First Party Data, Schain, Price Floors etc.).
If you do not know how to pass a custom parameter that you previously used, please contact us using the information provided above.
Thank you,
-Yahoo SSP
-
+Yahoo Advertsing
diff --git a/package-lock.json b/package-lock.json
index fd8acae2182..416bc6b1dd9 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,12 +1,12 @@
{
"name": "prebid.js",
- "version": "8.3.0-pre",
+ "version": "8.4.0-pre",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "prebid.js",
- "version": "7.52.0-pre",
+ "version": "8.4.0-pre",
"license": "Apache-2.0",
"dependencies": {
"@babel/core": "^7.16.7",
@@ -6847,9 +6847,9 @@
}
},
"node_modules/cac/node_modules/semver": {
- "version": "5.7.1",
- "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz",
- "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==",
+ "version": "5.7.2",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz",
+ "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==",
"dev": true,
"bin": {
"semver": "bin/semver"
@@ -9653,9 +9653,9 @@
}
},
"node_modules/eslint/node_modules/semver": {
- "version": "7.3.8",
- "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.8.tgz",
- "integrity": "sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==",
+ "version": "7.5.4",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz",
+ "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==",
"dev": true,
"dependencies": {
"lru-cache": "^6.0.0"
@@ -9903,9 +9903,9 @@
}
},
"node_modules/execa/node_modules/semver": {
- "version": "5.7.1",
- "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz",
- "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==",
+ "version": "5.7.2",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz",
+ "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==",
"dev": true,
"bin": {
"semver": "bin/semver"
@@ -12090,9 +12090,9 @@
}
},
"node_modules/gulp-cli/node_modules/semver": {
- "version": "5.7.1",
- "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz",
- "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==",
+ "version": "5.7.2",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz",
+ "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==",
"dev": true,
"bin": {
"semver": "bin/semver"
@@ -12432,9 +12432,9 @@
}
},
"node_modules/gulp-eslint/node_modules/cross-spawn/node_modules/semver": {
- "version": "5.7.1",
- "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz",
- "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==",
+ "version": "5.7.2",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz",
+ "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==",
"dev": true,
"bin": {
"semver": "bin/semver"
@@ -15796,9 +15796,9 @@
}
},
"node_modules/karma-coverage-istanbul-reporter/node_modules/semver": {
- "version": "5.7.1",
- "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz",
- "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==",
+ "version": "5.7.2",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz",
+ "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==",
"dev": true,
"bin": {
"semver": "bin/semver"
@@ -18739,9 +18739,9 @@
}
},
"node_modules/normalize-package-data/node_modules/semver": {
- "version": "7.3.8",
- "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.8.tgz",
- "integrity": "sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==",
+ "version": "7.5.4",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz",
+ "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==",
"dev": true,
"dependencies": {
"lru-cache": "^6.0.0"
@@ -21034,9 +21034,9 @@
}
},
"node_modules/semver": {
- "version": "6.3.0",
- "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz",
- "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==",
+ "version": "6.3.1",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz",
+ "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==",
"bin": {
"semver": "bin/semver.js"
}
@@ -30515,9 +30515,9 @@
}
},
"semver": {
- "version": "5.7.1",
- "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz",
- "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==",
+ "version": "5.7.2",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz",
+ "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==",
"dev": true
},
"strip-ansi": {
@@ -32530,9 +32530,9 @@
"dev": true
},
"semver": {
- "version": "7.3.8",
- "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.8.tgz",
- "integrity": "sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==",
+ "version": "7.5.4",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz",
+ "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==",
"dev": true,
"requires": {
"lru-cache": "^6.0.0"
@@ -32900,9 +32900,9 @@
"dev": true
},
"semver": {
- "version": "5.7.1",
- "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz",
- "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==",
+ "version": "5.7.2",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz",
+ "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==",
"dev": true
},
"shebang-command": {
@@ -34681,9 +34681,9 @@
}
},
"semver": {
- "version": "5.7.1",
- "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz",
- "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==",
+ "version": "5.7.2",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz",
+ "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==",
"dev": true
},
"string-width": {
@@ -34969,9 +34969,9 @@
},
"dependencies": {
"semver": {
- "version": "5.7.1",
- "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz",
- "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==",
+ "version": "5.7.2",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz",
+ "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==",
"dev": true
}
}
@@ -37585,9 +37585,9 @@
}
},
"semver": {
- "version": "5.7.1",
- "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz",
- "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==",
+ "version": "5.7.2",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz",
+ "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==",
"dev": true
},
"source-map": {
@@ -39761,9 +39761,9 @@
},
"dependencies": {
"semver": {
- "version": "7.3.8",
- "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.8.tgz",
- "integrity": "sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==",
+ "version": "7.5.4",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz",
+ "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==",
"dev": true,
"requires": {
"lru-cache": "^6.0.0"
@@ -41495,9 +41495,9 @@
}
},
"semver": {
- "version": "6.3.0",
- "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz",
- "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw=="
+ "version": "6.3.1",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz",
+ "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA=="
},
"semver-greatest-satisfied-range": {
"version": "1.1.0",
diff --git a/package.json b/package.json
index 491e5d88fb9..0c1cbd4850f 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "prebid.js",
- "version": "8.3.0-pre",
+ "version": "8.4.0-pre",
"description": "Header Bidding Management Library",
"main": "src/prebid.js",
"scripts": {
diff --git a/src/activities/redactor.js b/src/activities/redactor.js
index d50df72648c..5942ee17152 100644
--- a/src/activities/redactor.js
+++ b/src/activities/redactor.js
@@ -8,7 +8,7 @@ import {
ACTIVITY_TRANSMIT_UFPD
} from './activities.js';
-export const ORTB_UFPD_PATHS = ['user.data', 'user.ext.data'];
+export const ORTB_UFPD_PATHS = ['user.data', 'user.ext.data', 'user.yob', 'user.gender', 'user.keywords', 'user.kwarray'];
export const ORTB_EIDS_PATHS = ['user.eids', 'user.ext.eids'];
export const ORTB_GEO_PATHS = ['user.geo.lat', 'user.geo.lon', 'device.geo.lat', 'device.geo.lon'];
diff --git a/test/spec/modules/adagioBidAdapter_spec.js b/test/spec/modules/adagioBidAdapter_spec.js
index 2fb40070184..f9bf62206f5 100644
--- a/test/spec/modules/adagioBidAdapter_spec.js
+++ b/test/spec/modules/adagioBidAdapter_spec.js
@@ -256,7 +256,6 @@ describe('Adagio bid adapter', () => {
describe('buildRequests()', function() {
const expectedDataKeys = [
- 'id',
'organizationId',
'secure',
'device',
@@ -269,7 +268,8 @@ describe('Adagio bid adapter', () => {
'prebidVersion',
'featuresVersion',
'data',
- 'usIfr'
+ 'usIfr',
+ 'adgjs',
];
it('groups requests by organizationId', function() {
diff --git a/test/spec/modules/adtelligentBidAdapter_spec.js b/test/spec/modules/adtelligentBidAdapter_spec.js
index 26284d539d4..e40828e6852 100644
--- a/test/spec/modules/adtelligentBidAdapter_spec.js
+++ b/test/spec/modules/adtelligentBidAdapter_spec.js
@@ -156,6 +156,10 @@ const displayBidderRequestWithConsents = {
gdprApplies: true,
consentString: 'test'
},
+ gppConsent: {
+ gppString: 'abc12345234',
+ applicableSections: [7, 8]
+ },
uspConsent: 'iHaveIt'
};
@@ -364,6 +368,10 @@ describe('adtelligentBidAdapter', () => {
expect(bidRequestWithPubSettingsData.GDPR).to.be.equal(1);
expect(bidRequestWithPubSettingsData.GDPRConsent).to.be.equal(displayBidderRequestWithConsents.gdprConsent.consentString);
});
+ it('sets GPP flags', () => {
+ expect(bidRequestWithPubSettingsData.GPP).to.be.equal(displayBidderRequestWithConsents.gppConsent.gppString);
+ expect(bidRequestWithPubSettingsData.GPPSid).to.be.equal('7,8');
+ });
it('sets USP', () => {
expect(bidRequestWithPubSettingsData.USP).to.be.equal(displayBidderRequestWithConsents.uspConsent);
})
diff --git a/test/spec/modules/brandmetricsRtdProvider_spec.js b/test/spec/modules/brandmetricsRtdProvider_spec.js
index 879ec7e1c7a..907c672208f 100644
--- a/test/spec/modules/brandmetricsRtdProvider_spec.js
+++ b/test/spec/modules/brandmetricsRtdProvider_spec.js
@@ -1,5 +1,7 @@
import * as brandmetricsRTD from '../../../modules/brandmetricsRtdProvider.js';
import {config} from 'src/config.js';
+import * as events from '../../../src/events';
+import * as sinon from 'sinon';
const VALID_CONFIG = {
name: 'brandmetrics',
@@ -77,14 +79,16 @@ function mockSurveyLoaded(surveyConf) {
});
}
-function scriptTagExists(url) {
- const tags = document.getElementsByTagName('script');
- for (let i = 0; i < tags.length; i++) {
- if (tags[i].src === url) {
- return true;
+function mockCreativeInView(creativeInViewConf) {
+ const commands = window._brandmetrics || [];
+ commands.forEach(command => {
+ if (command.cmd === '_addeventlistener') {
+ const conf = command.val;
+ if (conf.event === 'creative_in_view') {
+ conf.handler(creativeInViewConf);
+ }
}
- }
- return false;
+ })
}
describe('BrandmetricsRTD module', () => {
@@ -188,4 +192,62 @@ describe('getBidRequestData', () => {
expect(bidderOrtb2[exp].user.ext.data.brandmetrics_survey).to.equal('mockMeasurementId')
})
});
+
+ describe('billable events', () => {
+ let sandbox;
+ let eventsEmitSpy;
+
+ before(() => {
+ sandbox = sinon.sandbox.create();
+ eventsEmitSpy = sandbox.spy(events, ['emit']);
+ });
+
+ beforeEach(() => {
+ eventsEmitSpy.resetHistory();
+ })
+
+ afterEach(() => {
+ sandbox.restore();
+ });
+
+ it('should emit billable event from prebid events', () => {
+ const expectedEvent = {
+ vendor: 'brandmetrics',
+ type: 'creative_in_view',
+ measurementId: 'mockMeasurementId',
+ auctionId: 'mockAuctionId',
+ transactionId: 'mockTransactionId'
+ };
+
+ mockCreativeInView({
+ mid: expectedEvent.measurementId,
+ source: {
+ type: 'pbj',
+ data: {
+ auctionId: expectedEvent.auctionId,
+ transactionId: expectedEvent.transactionId
+ },
+ }
+ });
+
+ expect(eventsEmitSpy.callCount).to.equal(1);
+
+ const event = eventsEmitSpy.getCalls()[0].args[1];
+ delete event['billingId'];
+
+ expect(event).to.deep.equal(expectedEvent);
+ });
+
+ it('should not emit billable event from non prebid- sources', () => {
+ mockCreativeInView({
+ mid: 'mockMeasurementId',
+ source: {
+ type: 'gpt',
+ data: {},
+ }
+ });
+
+ expect(eventsEmitSpy.callCount).to.equal(0);
+ });
+ });
});
diff --git a/test/spec/modules/cadentApertureMXBidAdapter_spec.js b/test/spec/modules/cadentApertureMXBidAdapter_spec.js
index 091a8105354..eb127cfd9f3 100644
--- a/test/spec/modules/cadentApertureMXBidAdapter_spec.js
+++ b/test/spec/modules/cadentApertureMXBidAdapter_spec.js
@@ -699,7 +699,7 @@ describe('cadent_aperture_mx Adapter', function () {
it('should not throw an error when decoding an improperly encoded adm', function () {
const badAdmServerResponse = utils.deepClone(serverResponse);
- badAdmServerResponse.seatbid[0].bid[0].adm = '');
- expect(response[0].vastUrl).to.be.undefined;
- expect(response[0].vastXml).to.be.undefined;
- expect(response[0].mediaType).to.equal('banner');
- });
+ describe('wrapped in video players for display inventory', () => {
+ beforeEach(() => {
+ config.setConfig({
+ yahooAds: {
+ mode: undefined
+ }
+ });
+ });
- it('should insert video DAP Unified Player into ad', () => {
- const { serverResponse, bidderRequest } = generateResponseMock('dap-up', 'vpaid');
- const response = spec.interpretResponse(serverResponse, {bidderRequest});
- expect(response[0].ad).to.equal('');
- expect(response[0].vastUrl).to.be.undefined;
- expect(response[0].vastXml).to.be.undefined;
- expect(response[0].mediaType).to.equal('banner');
- })
+ it('should insert video DAP O2 Player into ad', () => {
+ const { serverResponse, bidderRequest } = generateResponseMock('dap-o2', 'vpaid');
+ const response = spec.interpretResponse(serverResponse, {bidderRequest});
+ expect(response[0].ad).to.equal('');
+ expect(response[0].vastUrl).to.be.undefined;
+ expect(response[0].vastXml).to.be.undefined;
+ expect(response[0].mediaType).to.equal('banner');
+ });
+
+ it('should insert video DAP Unified Player into ad', () => {
+ const { serverResponse, bidderRequest } = generateResponseMock('dap-up', 'vpaid');
+ const response = spec.interpretResponse(serverResponse, {bidderRequest});
+ expect(response[0].ad).to.equal('');
+ expect(response[0].vastUrl).to.be.undefined;
+ expect(response[0].vastXml).to.be.undefined;
+ expect(response[0].mediaType).to.equal('banner');
+ })
+ });
});
describe('Support Advertiser domains', () => {
it('should append bid-response adomain to meta.advertiserDomains', () => {
- const { serverResponse, bidderRequest } = generateResponseMock('video', 'vpaid');
+ const { serverResponse, bidderRequest } = generateResponseMock('banner');
const response = spec.interpretResponse(serverResponse, {bidderRequest});
expect(response[0].meta.advertiserDomains).to.be.a('array');
expect(response[0].meta.advertiserDomains[0]).to.equal('advertiser-domain.com');
@@ -1490,53 +1576,55 @@ describe('YahooSSP Bid Adapter:', () => {
});
describe('Time To Live (ttl)', () => {
- const UNSUPPORTED_TTL_FORMATS = ['string', [1, 2, 3], true, false, null, undefined];
- UNSUPPORTED_TTL_FORMATS.forEach(param => {
- it('should not allow unsupported global yahoossp.ttl formats and default to 300', () => {
- const { serverResponse, bidderRequest } = generateResponseMock('banner');
- config.setConfig({
- yahoossp: { ttl: param }
+ VALID_BIDDER_CODES.forEach(bidderCode => {
+ const UNSUPPORTED_TTL_FORMATS = ['string', [1, 2, 3], true, false, null, undefined];
+ UNSUPPORTED_TTL_FORMATS.forEach(param => {
+ it(`should not allow unsupported global ${bidderCode}.ttl formats and default to 300`, () => {
+ const { serverResponse, bidderRequest } = generateResponseMock('banner');
+ const cfg = {};
+ cfg['yahooAds'] = { ttl: param };
+ config.setConfig(cfg);
+ const response = spec.interpretResponse(serverResponse, {bidderRequest});
+ expect(response[0].ttl).to.equal(300);
});
- const response = spec.interpretResponse(serverResponse, {bidderRequest});
- expect(response[0].ttl).to.equal(300);
- });
- it('should not allow unsupported params.ttl formats and default to 300', () => {
- const { serverResponse, bidderRequest } = generateResponseMock('banner');
- bidderRequest.bids[0].params.ttl = param;
- const response = spec.interpretResponse(serverResponse, {bidderRequest});
- expect(response[0].ttl).to.equal(300);
+ it('should not allow unsupported params.ttl formats and default to 300', () => {
+ const { serverResponse, bidderRequest } = generateResponseMock('banner');
+ bidderRequest.bids[0].params.ttl = param;
+ const response = spec.interpretResponse(serverResponse, {bidderRequest});
+ expect(response[0].ttl).to.equal(300);
+ });
});
- });
- const UNSUPPORTED_TTL_VALUES = [-1, 3601];
- UNSUPPORTED_TTL_VALUES.forEach(param => {
- it('should not allow invalid global yahoossp.ttl values 3600 < ttl < 0 and default to 300', () => {
- const { serverResponse, bidderRequest } = generateResponseMock('banner');
- config.setConfig({
- yahoossp: { ttl: param }
+ const UNSUPPORTED_TTL_VALUES = [-1, 3601];
+ UNSUPPORTED_TTL_VALUES.forEach(param => {
+ it('should not allow invalid global config ttl values 3600 < ttl < 0 and default to 300', () => {
+ const { serverResponse, bidderRequest } = generateResponseMock('banner');
+ config.setConfig({
+ yahooAds: { ttl: param }
+ });
+ const response = spec.interpretResponse(serverResponse, {bidderRequest});
+ expect(response[0].ttl).to.equal(300);
+ });
+
+ it('should not allow invalid params.ttl values 3600 < ttl < 0 and default to 300', () => {
+ const { serverResponse, bidderRequest } = generateResponseMock('banner');
+ bidderRequest.bids[0].params.ttl = param;
+ const response = spec.interpretResponse(serverResponse, {bidderRequest});
+ expect(response[0].ttl).to.equal(300);
});
- const response = spec.interpretResponse(serverResponse, {bidderRequest});
- expect(response[0].ttl).to.equal(300);
});
- it('should not allow invalid params.ttl values 3600 < ttl < 0 and default to 300', () => {
+ it('should give presedence to Gloabl ttl over params.ttl ', () => {
const { serverResponse, bidderRequest } = generateResponseMock('banner');
- bidderRequest.bids[0].params.ttl = param;
+ config.setConfig({
+ yahooAds: { ttl: 500 }
+ });
+ bidderRequest.bids[0].params.ttl = 400;
const response = spec.interpretResponse(serverResponse, {bidderRequest});
- expect(response[0].ttl).to.equal(300);
+ expect(response[0].ttl).to.equal(500);
});
});
-
- it('should give presedence to Gloabl ttl over params.ttl ', () => {
- const { serverResponse, bidderRequest } = generateResponseMock('banner');
- config.setConfig({
- yahoossp: { ttl: 500 }
- });
- bidderRequest.bids[0].params.ttl = 400;
- const response = spec.interpretResponse(serverResponse, {bidderRequest});
- expect(response[0].ttl).to.equal(500);
- });
});
describe('Aliasing support', () => {