Skip to content

Commit fd8f2e1

Browse files
carlosfelixGoncakkdmkomorskiMarcin Komorskikvnsw
authored
33Across ID System: Fix merge conflicts between master & 9.0 (#11715)
* Vis X Bid Adapter : retrieve and send seller defined audiences (#11638) * AF-3647 added device object to request in visxBidAdapter * AF-3647 added user, regs, site and user agent data to request * AF-3647 removed userAgentClientHints because of it is gotten from device object * AF-3647 updated test scenarios with sda signals * AF-3647 fixed to getting ortb2 and spec file * AF-3647 reverted to get user data from cookie/local storage * 33Across User ID Module : support for the recently introduced "multiple storage types" feature (#11563) * Refactoring - break functions that are handling multiple storage types. * user id: introduce the concept of enabled storage types * Apply domain override to 33across ID * First party ID - Support for multiple storage types * 33Across User ID: Recommend both storage types * refactor the way enabled storage types are populated * Default to fetch keepalive (#11682) Co-authored-by: Marcin Komorski <[email protected]> * Dailymotion Bid Adapter: add support for user syncs & new fields (#11603) * Dailymotion Bid Adapter: add support for playbackmethod & plcmt * Dailymotion Bid Adapter: add support for user syncs * Dailymotion Bid Adapter: Add support for ortb2 device, and contextual informations * Dailymotion Bid Adapter: Fix tests * Dailymotion Bid Adapter: add support for content.url & device.ext.atts * Dailymotion Bid Adapter: change markdown header levels * Dailymotion Bid Adapter: collect prebid.version --------- Co-authored-by: Kevin Siow <[email protected]> * ZetaGlobalSsp Analytics Adapter : provide device object (#11607) * ZetaGlobalSpp Analytics adapter: provide device object * ZetaGlobalSpp Analytics adapter: provide ua in adRenderSucceeded event * provide domain and page in timeout event --------- Co-authored-by: Surovenko Alexey <[email protected]> Co-authored-by: Alexey Surovenko <[email protected]> * Core Utils: fix jsdoc warnings (#11694) * Update utils.js * Update perfMetrics.js * Update ttlCollection.js * Update adpod.js * Update consentManagementGpp.js * Update consentManagementGpp.js * Update consentManagement.js * Update consentManagementUsp.js * Update currency.js * Update dfpAdServerVideo.js * Update instreamTracking.js * Update s2sTesting.js * Update sizeMapping.js * Update topicsFpdModule.js * Update uid2IdSystem.js * Update consentManagementUsp.js * Update sizeMapping.js * datablocksBidAdapter.js: fix syncs issue (#11684) fixes #11319 * ColossusSSP Bid Adapter : replace gpid for pbadslot (#11701) * add video&native traffic colossus ssp * Native obj validation * Native obj validation #2 * Added size field in requests * fixed test * fix merge conflicts * move to 3.0 * move to 3.0 * fix IE11 new URL issue * fix IE11 new URL issue * fix IE11 new URL issue * https for 3.0 * add https test * add ccp and schain features * fix test * sync with upstream, fix conflicts * Update colossussspBidAdapter.js remove commented code * Update colossussspBidAdapter.js lint fix * identity extensions * identity extensions * fix * fix * fix * fix * fix * add tests for user ids * fix * fix * fix * fix * fix * fix * fix * add gdpr support * add gdpr support * id5id support * Update colossussspBidAdapter.js add bidfloor parameter * Update colossussspBidAdapter.js check bidfloor * Update colossussspBidAdapter.js * Update colossussspBidAdapter.js * Update colossussspBidAdapter.js * Update colossussspBidAdapter_spec.js * use floor module * Revert "use floor module" This reverts commit f0c5c24. * use floor module * update to 5v * fix * add uid2 and bidFloor support * fix * add pbadslot support * fix conflicts * add onBidWon * refactor * add test for onBidWon() * fix * add group_id * Trigger circleci * fix * update user sync * fix window.location * fix test * updates * fix conflict * fix * updates * remove traffic param * add transactionId to request data for colossusssp adapter * Send tid in placements array * update user sync * updated tests * remove changes package-lock file * fix * add First Party Data * gpp support * accepting eids from request * fixing lint errors * resolving a conflict * fixing a failed test case related to tid * fixing karma version for conflict resolution * reverting package json files to original version * switching placement to plcmt * replacing gpid for pbadslot --------- Co-authored-by: Vladislav Isaiko <[email protected]> Co-authored-by: Aiholkin <[email protected]> Co-authored-by: Bill Newman <[email protected]> Co-authored-by: Mykhailo Yaremchuk <[email protected]> Co-authored-by: kottapally <[email protected]> * Bidmatic Bid Adapter: Initial Release (#11690) * Bidmatic Initial commit * Use getFloor from price module --------- Co-authored-by: Gonca Karadeniz <[email protected]> Co-authored-by: mkomorski <[email protected]> Co-authored-by: Marcin Komorski <[email protected]> Co-authored-by: Kevin Siow <[email protected]> Co-authored-by: Kevin Siow <[email protected]> Co-authored-by: asurovenko-zeta <[email protected]> Co-authored-by: Surovenko Alexey <[email protected]> Co-authored-by: Alexey Surovenko <[email protected]> Co-authored-by: Patrick McCann <[email protected]> Co-authored-by: bhasker-ddh <[email protected]> Co-authored-by: Vladislav Isaiko <[email protected]> Co-authored-by: Aiholkin <[email protected]> Co-authored-by: Bill Newman <[email protected]> Co-authored-by: Mykhailo Yaremchuk <[email protected]> Co-authored-by: kottapally <[email protected]> Co-authored-by: Gena <[email protected]>
1 parent b932759 commit fd8f2e1

32 files changed

+1739
-271
lines changed

modules/33acrossIdSystem.js

+48-23
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import { submodule } from '../src/hook.js';
1111
import { uspDataHandler, coppaDataHandler, gppDataHandler } from '../src/adapterManager.js';
1212
import { getStorageManager, STORAGE_TYPE_COOKIES, STORAGE_TYPE_LOCALSTORAGE } from '../src/storageManager.js';
1313
import { MODULE_TYPE_UID } from '../src/activities/modules.js';
14+
import { domainOverrideToRootDomain } from '../libraries/domainOverrideToRootDomain/index.js';
1415

1516
/**
1617
* @typedef {import('../modules/userId/index.js').Submodule} Submodule
@@ -31,6 +32,10 @@ const DEFAULT_TPID_SUPPORT = true;
3132

3233
export const storage = getStorageManager({ moduleType: MODULE_TYPE_UID, moduleName: MODULE_NAME });
3334

35+
export const domainUtils = {
36+
domainOverride: domainOverrideToRootDomain(storage, MODULE_NAME)
37+
};
38+
3439
function calculateResponseObj(response) {
3540
if (!response.succeeded) {
3641
if (response.error == 'Cookied User') {
@@ -54,7 +59,7 @@ function calculateResponseObj(response) {
5459
};
5560
}
5661

57-
function calculateQueryStringParams(pid, gdprConsentData, storageConfig) {
62+
function calculateQueryStringParams(pid, gdprConsentData, enabledStorageTypes) {
5863
const uspString = uspDataHandler.getConsentData();
5964
const coppaValue = coppaDataHandler.getCoppa();
6065
const gppConsent = gppDataHandler.getConsentData();
@@ -82,12 +87,12 @@ function calculateQueryStringParams(pid, gdprConsentData, storageConfig) {
8287
params.gdpr_consent = gdprConsentData.consentString;
8388
}
8489

85-
const fp = getStoredValue(STORAGE_FPID_KEY, storageConfig);
90+
const fp = getStoredValue(STORAGE_FPID_KEY, enabledStorageTypes);
8691
if (fp) {
8792
params.fp = encodeURIComponent(fp);
8893
}
8994

90-
const tp = getStoredValue(STORAGE_TPID_KEY, storageConfig);
95+
const tp = getStoredValue(STORAGE_TPID_KEY, enabledStorageTypes);
9196
if (tp) {
9297
params.tp = encodeURIComponent(tp);
9398
}
@@ -99,32 +104,42 @@ function deleteFromStorage(key) {
99104
if (storage.cookiesAreEnabled()) {
100105
const expiredDate = new Date(0).toUTCString();
101106

102-
storage.setCookie(key, '', expiredDate, 'Lax');
107+
storage.setCookie(key, '', expiredDate, 'Lax', domainUtils.domainOverride());
103108
}
104109

105110
storage.removeDataFromLocalStorage(key);
106111
}
107112

108-
function storeValue(key, value, storageConfig = {}) {
109-
if (storageConfig.type === STORAGE_TYPE_COOKIES && storage.cookiesAreEnabled()) {
110-
const expirationInMs = 60 * 60 * 24 * 1000 * storageConfig.expires;
111-
const expirationTime = new Date(Date.now() + expirationInMs);
113+
function storeValue(key, value, { enabledStorageTypes, expires }) {
114+
enabledStorageTypes.forEach(storageType => {
115+
if (storageType === STORAGE_TYPE_COOKIES) {
116+
const expirationInMs = 60 * 60 * 24 * 1000 * expires;
117+
const expirationTime = new Date(Date.now() + expirationInMs);
112118

113-
storage.setCookie(key, value, expirationTime.toUTCString(), 'Lax');
114-
} else if (storageConfig.type === STORAGE_TYPE_LOCALSTORAGE) {
115-
storage.setDataInLocalStorage(key, value);
116-
}
119+
storage.setCookie(key, value, expirationTime.toUTCString(), 'Lax', domainUtils.domainOverride());
120+
} else if (storageType === STORAGE_TYPE_LOCALSTORAGE) {
121+
storage.setDataInLocalStorage(key, value);
122+
}
123+
});
117124
}
118125

119-
function getStoredValue(key, storageConfig = {}) {
120-
if (storageConfig.type === STORAGE_TYPE_COOKIES && storage.cookiesAreEnabled()) {
121-
return storage.getCookie(key);
122-
} else if (storageConfig.type === STORAGE_TYPE_LOCALSTORAGE) {
123-
return storage.getDataFromLocalStorage(key);
124-
}
126+
function getStoredValue(key, enabledStorageTypes) {
127+
let storedValue;
128+
129+
enabledStorageTypes.find(storageType => {
130+
if (storageType === STORAGE_TYPE_COOKIES) {
131+
storedValue = storage.getCookie(key);
132+
} else if (storageType === STORAGE_TYPE_LOCALSTORAGE) {
133+
storedValue = storage.getDataFromLocalStorage(key);
134+
}
135+
136+
return !!storedValue;
137+
});
138+
139+
return storedValue;
125140
}
126141

127-
function handleSupplementalId(key, id, storageConfig = {}) {
142+
function handleSupplementalId(key, id, storageConfig) {
128143
id
129144
? storeValue(key, id, storageConfig)
130145
: deleteFromStorage(key);
@@ -160,7 +175,7 @@ export const thirthyThreeAcrossIdSubmodule = {
160175
* @param {SubmoduleConfig} [config]
161176
* @returns {IdResponse|undefined}
162177
*/
163-
getId({ params = { }, storage: storageConfig }, gdprConsentData) {
178+
getId({ params = { }, enabledStorageTypes = [], storage: storageConfig = {} }, gdprConsentData) {
164179
if (typeof params.pid !== 'string') {
165180
logError(`${MODULE_NAME}: Submodule requires a partner ID to be defined`);
166181

@@ -192,11 +207,17 @@ export const thirthyThreeAcrossIdSubmodule = {
192207
}
193208

194209
if (storeFpid) {
195-
handleSupplementalId(STORAGE_FPID_KEY, responseObj.fp, storageConfig);
210+
handleSupplementalId(STORAGE_FPID_KEY, responseObj.fp, {
211+
enabledStorageTypes,
212+
expires: storageConfig.expires
213+
});
196214
}
197215

198216
if (storeTpid) {
199-
handleSupplementalId(STORAGE_TPID_KEY, responseObj.tp, storageConfig);
217+
handleSupplementalId(STORAGE_TPID_KEY, responseObj.tp, {
218+
enabledStorageTypes,
219+
expires: storageConfig.expires
220+
});
200221
}
201222

202223
cb(responseObj.envelope);
@@ -206,10 +227,14 @@ export const thirthyThreeAcrossIdSubmodule = {
206227

207228
cb();
208229
}
209-
}, calculateQueryStringParams(pid, gdprConsentData, storageConfig), { method: 'GET', withCredentials: true });
230+
}, calculateQueryStringParams(pid, gdprConsentData, enabledStorageTypes), {
231+
method: 'GET',
232+
withCredentials: true
233+
});
210234
}
211235
};
212236
},
237+
domainOverride: domainUtils.domainOverride,
213238
eids: {
214239
'33acrossId': {
215240
source: '33across.com',

modules/33acrossIdSystem.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ pbjs.setConfig({
1414
name: "33acrossId",
1515
storage: {
1616
name: "33acrossId",
17-
type: "html5",
17+
type: "cookie&html5",
1818
expires: 30,
1919
refreshInSeconds: 8*3600
2020
},
@@ -40,7 +40,7 @@ The following settings are available for the `storage` property in the `userSync
4040
| Param name | Scope | Type | Description | Example |
4141
| --- | --- | --- | --- | --- |
4242
| name | Required | String| Name of the cookie or HTML5 local storage where the user ID will be stored | `"33acrossId"` |
43-
| type | Required | String | `"html5"` (preferred) or `"cookie"` | `"html5"` |
43+
| type | Required | String | `"cookie&html5"` (preferred) or `"cookie"` or `"html5"` | `"cookie&html5"` |
4444
| expires | Strongly Recommended | Number | How long (in days) the user ID information will be stored. 33Across recommends `30`. | `30` |
4545
| refreshInSeconds | Strongly Recommended | Number | The interval (in seconds) for refreshing the user ID. 33Across recommends no more than 8 hours between refreshes. | `8*3600` |
4646

modules/adpod.js

+4-5
Original file line numberDiff line numberDiff line change
@@ -451,7 +451,6 @@ export function callPrebidCacheAfterAuction(bids, callback) {
451451
/**
452452
* Compare function to be used in sorting long-form bids. This will compare bids on price per second.
453453
* @param {Object} bid
454-
* @param {Object} bid
455454
*/
456455
export function sortByPricePerSecond(a, b) {
457456
if (a.adserverTargeting[TARGETING_KEYS.PRICE_BUCKET] / a.video.durationBucket < b.adserverTargeting[TARGETING_KEYS.PRICE_BUCKET] / b.video.durationBucket) {
@@ -465,10 +464,10 @@ export function sortByPricePerSecond(a, b) {
465464

466465
/**
467466
* This function returns targeting keyvalue pairs for long-form adserver modules. Freewheel and GAM are currently supporting Prebid long-form
468-
* @param {Object} options
469-
* @param {Array[string]} codes
470-
* @param {function} callback
471-
* @returns targeting kvs for adUnitCodes
467+
* @param {Object} options - Options for targeting.
468+
* @param {Array<string>} options.codes - Array of ad unit codes.
469+
* @param {function} options.callback - Callback function to handle the targeting key-value pairs.
470+
* @returns {Object} Targeting key-value pairs for ad unit codes.
472471
*/
473472
export function getTargeting({ codes, callback } = {}) {
474473
if (!callback) {

modules/bidmaticBidAdapter.js

+110
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
import { ortbConverter } from '../libraries/ortbConverter/converter.js';
2+
import { registerBidder } from '../src/adapters/bidderFactory.js';
3+
import { BANNER, VIDEO } from '../src/mediaTypes.js';
4+
import { replaceAuctionPrice, isNumber, deepAccess, isFn } from '../src/utils.js';
5+
6+
export const END_POINT = 'https://adapter.bidmatic.io/ortb-client';
7+
const BIDDER_CODE = 'bidmatic';
8+
const DEFAULT_CURRENCY = 'USD';
9+
10+
export const converter = ortbConverter({
11+
context: {
12+
netRevenue: true,
13+
ttl: 290,
14+
},
15+
imp(buildImp, bidRequest, context) {
16+
const imp = buildImp(bidRequest, context);
17+
const floorInfo = isFn(bidRequest.getFloor) ? bidRequest.getFloor({
18+
currency: context.currency || 'USD',
19+
size: '*',
20+
mediaType: '*'
21+
}) : {
22+
floor: imp.bidfloor || deepAccess(bidRequest, 'params.bidfloor') || 0,
23+
currency: DEFAULT_CURRENCY
24+
};
25+
26+
if (floorInfo) {
27+
imp.bidfloor = floorInfo.floor;
28+
imp.bidfloorcur = floorInfo.currency;
29+
}
30+
imp.tagid = deepAccess(bidRequest, 'ortb2Imp.ext.gpid') || bidRequest.adUnitCode;
31+
32+
return imp;
33+
},
34+
request(buildRequest, imps, bidderRequest, context) {
35+
const request = buildRequest(imps, bidderRequest, context);
36+
if (!request.cur) {
37+
request.cur = [DEFAULT_CURRENCY];
38+
}
39+
return request;
40+
},
41+
bidResponse(buildBidResponse, bid, context) {
42+
const { bidRequest } = context;
43+
44+
let resMediaType;
45+
const reqMediaTypes = Object.keys(bidRequest.mediaTypes);
46+
if (reqMediaTypes.length === 1) {
47+
resMediaType = reqMediaTypes[0];
48+
} else {
49+
if (bid.adm.search(/^(<\?xml|<vast)/i) !== -1) {
50+
resMediaType = VIDEO;
51+
} else {
52+
resMediaType = BANNER;
53+
}
54+
}
55+
56+
context.mediaType = resMediaType;
57+
58+
return buildBidResponse(bid, context);
59+
}
60+
});
61+
62+
export const spec = {
63+
code: BIDDER_CODE,
64+
supportedMediaTypes: [BANNER, VIDEO],
65+
gvlid: 1134,
66+
isBidRequestValid: function (bid) {
67+
return isNumber(deepAccess(bid, 'params.source'))
68+
},
69+
70+
buildRequests: function (validBidRequests, bidderRequest) {
71+
const requestsBySource = validBidRequests.reduce((acc, bidRequest) => {
72+
acc[bidRequest.params.source] = acc[bidRequest.params.source] || [];
73+
acc[bidRequest.params.source].push(bidRequest);
74+
return acc;
75+
}, {});
76+
77+
return Object.entries(requestsBySource).map(([source, bidRequests]) => {
78+
const data = converter.toORTB({ bidRequests, bidderRequest });
79+
const url = new URL(END_POINT);
80+
url.searchParams.append('source', source);
81+
return {
82+
method: 'POST',
83+
url: url.toString(),
84+
data: data,
85+
options: {
86+
withCredentials: true,
87+
}
88+
};
89+
});
90+
},
91+
92+
interpretResponse: function (serverResponse, bidRequest) {
93+
if (!serverResponse || !serverResponse.body) return [];
94+
const parsedSeatbid = serverResponse.body.seatbid.map(seatbidItem => {
95+
const parsedBid = seatbidItem.bid.map((bidItem) => ({
96+
...bidItem,
97+
adm: replaceAuctionPrice(bidItem.adm, bidItem.price),
98+
nurl: replaceAuctionPrice(bidItem.nurl, bidItem.price)
99+
}));
100+
return { ...seatbidItem, bid: parsedBid };
101+
});
102+
const responseBody = { ...serverResponse.body, seatbid: parsedSeatbid };
103+
return converter.fromORTB({
104+
response: responseBody,
105+
request: bidRequest.data,
106+
}).bids;
107+
},
108+
109+
};
110+
registerBidder(spec);

modules/bidmaticBidAdapter.md

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Overview
2+
3+
```
4+
Module Name: Bidmatic Bid Adapter
5+
Module Type: Bidder Adapter
6+
Maintainer: [email protected]
7+
```
8+
9+
# Description
10+
11+
Adds access to Bidmatic SSP oRTB service.
12+
13+
# Sample Ad Unit: For Publishers
14+
```
15+
var adUnits = [{
16+
code: 'bg-test-rectangle',
17+
sizes: [[300, 250]],
18+
bids: [{
19+
bidder: 'bidmatic',
20+
params: {
21+
source: 886409,
22+
bidfloor: 0.1
23+
}
24+
}]
25+
}]
26+
```

modules/consentManagementGpp.js

+4-3
Original file line numberDiff line numberDiff line change
@@ -161,8 +161,10 @@ export class GPPClient {
161161
* This function handles interacting with an IAB compliant CMP to obtain the consent information of the user.
162162
* Given the async nature of the CMP's API, we pass in acting success/error callback functions to exit this function
163163
* based on the appropriate result.
164-
* @param {function({})} onSuccess acts as a success callback when CMP returns a value; pass along consentObjectfrom CMP
165-
* @param {function(string, ...{}?)} cmpError acts as an error callback while interacting with CMP; pass along an error message (string) and any extra error arguments (purely for logging)
164+
* @param {Object} options - An object containing the callbacks.
165+
* @param {function(Object): void} options.onSuccess - Acts as a success callback when CMP returns a value; pass along consentObject from CMP.
166+
* @param {function(string, ...Object?): void} options.onError - Acts as an error callback while interacting with CMP; pass along an error message (string) and any extra error arguments (purely for logging).
167+
* @param {function(): Object} [mkCmp=cmpClient] - A function to create the CMP client. Defaults to `cmpClient`.
166168
*/
167169
export function lookupIabConsent({onSuccess, onError}, mkCmp = cmpClient) {
168170
pipeCallbacks(() => GPPClient.get(mkCmp).refresh(), {onSuccess, onError});
@@ -291,7 +293,6 @@ function processCmpData(consentData) {
291293
/**
292294
* Stores CMP data locally in module to make information available in adaptermanager.js for later in the auction
293295
* @param {{}} gppData the result of calling a CMP's `getGPPData` (or equivalent)
294-
* @param {{}} sectionData map from GPP section name to the result of calling a CMP's `getSection` (or equivalent)
295296
*/
296297
export function storeConsentData(gppData = {}) {
297298
consentData = {

modules/consentManagementTcf.js

+7-3
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,9 @@ const cmpCallMap = {
3535

3636
/**
3737
* This function reads the consent string from the config to obtain the consent information of the user.
38-
* @param {function({})} onSuccess acts as a success callback when the value is read from config; pass along consentObject from CMP
38+
* @param {Object} options - An object containing the callbacks.
39+
* @param {function(Object): void} options.onSuccess - Acts as a success callback when the value is read from config; pass along consentObject from CMP.
40+
* @param {function(string, ...Object?): void} [options.onError] - Acts as an error callback while interacting with CMP; pass along an error message (string) and any extra error arguments (purely for logging). Optional.
3941
*/
4042
function lookupStaticConsentData({onSuccess, onError}) {
4143
processCmpData(staticConsentData, {onSuccess, onError})
@@ -45,8 +47,10 @@ function lookupStaticConsentData({onSuccess, onError}) {
4547
* This function handles interacting with an IAB compliant CMP to obtain the consent information of the user.
4648
* Given the async nature of the CMP's API, we pass in acting success/error callback functions to exit this function
4749
* based on the appropriate result.
48-
* @param {function({})} onSuccess acts as a success callback when CMP returns a value; pass along consentObjectfrom CMP
49-
* @param {function(string, ...{}?)} cmpError acts as an error callback while interacting with CMP; pass along an error message (string) and any extra error arguments (purely for logging)
50+
* @param {Object} options - An object containing the callbacks.
51+
* @param {function(Object): void} options.onSuccess - Acts as a success callback when CMP returns a value; pass along consentObject from CMP.
52+
* @param {function(string, ...Object?): void} options.onError - Acts as an error callback while interacting with CMP; pass along an error message (string) and any extra error arguments (purely for logging).
53+
* @param {function(Object): void} options.onEvent - Acts as an event callback for processing TCF data events from CMP.
5054
*/
5155
function lookupIabConsent({onSuccess, onError, onEvent}) {
5256
function cmpResponseCallback(tcfData, success) {

modules/consentManagementUsp.js

+6-4
Original file line numberDiff line numberDiff line change
@@ -163,10 +163,12 @@ export const requestBidsHook = timedAuctionHook('usp', function requestBidsHook(
163163
/**
164164
* This function checks the consent data provided by USPAPI to ensure it's in an expected state.
165165
* If it's bad, we exit the module depending on config settings.
166-
* If it's good, then we store the value and exits the module.
167-
* @param {object} consentObject required; object returned by USPAPI that contains user's consent choices
168-
* @param {function(string)} onSuccess callback accepting the resolved consent USP consent string
169-
* @param {function(string, ...{}?)} onError callback accepting error message and any extra error arguments (used purely for logging)
166+
* If it's good, then we store the value and exit the module.
167+
*
168+
* @param {Object} consentObject - The object returned by USPAPI that contains the user's consent choices.
169+
* @param {Object} callbacks - An object containing the callback functions.
170+
* @param {function(string): void} callbacks.onSuccess - Callback accepting the resolved USP consent string.
171+
* @param {function(string, ...Object?): void} callbacks.onError - Callback accepting an error message and any extra error arguments (used purely for logging).
170172
*/
171173
function processUspData(consentObject, {onSuccess, onError}) {
172174
const valid = !!(consentObject && consentObject.usPrivacy);

modules/currency.js

+1
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ export let responseReady = defer();
2828

2929
/**
3030
* Configuration function for currency
31+
* @param {object} config
3132
* @param {string} [config.adServerCurrency = 'USD']
3233
* ISO 4217 3-letter currency code that represents the target currency. (e.g. 'EUR'). If this value is present,
3334
* the currency conversion feature is activated.

0 commit comments

Comments
 (0)