Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple Bid/Analytics/ID Adapters: import utils functions as needed and not the whole module #7483

Merged
merged 89 commits into from
Sep 28, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
89 commits
Select commit Hold shift + click to select a range
33762d1
added support for pubcommon, digitrust, id5id
pm-harshad-mane Sep 12, 2019
0722354
added support for IdentityLink
pm-harshad-mane Sep 13, 2019
f2c32c0
changed the source for id5
pm-harshad-mane Sep 13, 2019
37163d1
Merge remote-tracking branch 'upstream/master'
pm-harshad-mane Sep 13, 2019
eaed987
added unit test cases
pm-harshad-mane Sep 13, 2019
602ee7e
changed source param for identityLink
pm-harshad-mane Sep 16, 2019
b6fcd36
Merge remote-tracking branch 'upstream/master'
pm-harshad-mane Sep 23, 2019
58381f3
Merge remote-tracking branch 'upstream/master'
pm-harshad-mane Sep 26, 2019
c9fb11b
Merge remote-tracking branch 'upstream/master'
pm-harshad-mane Oct 10, 2019
8ece7fd
Merge remote-tracking branch 'upstream/master'
pm-harshad-mane Oct 16, 2019
28d12a0
Merge remote-tracking branch 'upstream/master'
pm-harshad-mane Oct 16, 2019
05a55e1
Merge remote-tracking branch 'upstream/master'
pm-harshad-mane Oct 31, 2019
e8b10d5
Merge remote-tracking branch 'upstream/master'
pm-harshad-mane Nov 5, 2019
870085f
Merge remote-tracking branch 'upstream/master'
pm-harshad-mane Nov 12, 2019
844ce4e
Merge remote-tracking branch 'upstream/master'
pm-harshad-mane Nov 12, 2019
704eca3
Merge remote-tracking branch 'upstream/master'
pm-harshad-mane Nov 13, 2019
2565cb9
Merge remote-tracking branch 'upstream/master'
pm-harshad-mane Dec 4, 2019
1d75bd4
Merge remote-tracking branch 'upstream/master'
pm-harshad-mane Dec 4, 2019
6adde1e
Merge remote-tracking branch 'upstream/master'
pm-harshad-mane Dec 6, 2019
477c98a
Merge remote-tracking branch 'upstream/master'
pm-harshad-mane Dec 9, 2019
cef5422
Merge remote-tracking branch 'upstream/master'
pm-harshad-mane Dec 10, 2019
c110a7d
Merge remote-tracking branch 'upstream/master'
pm-harshad-mane Jan 9, 2020
e8fb062
Merge remote-tracking branch 'upstream/master'
pm-harshad-mane Feb 5, 2020
d77cd71
Merge remote-tracking branch 'upstream/master'
pm-harshad-mane Feb 17, 2020
817ce3f
Merge remote-tracking branch 'upstream/master'
pm-harshad-mane Feb 24, 2020
cda825e
Merge remote-tracking branch 'upstream/master'
pm-harshad-mane Feb 26, 2020
f34a3ec
Merge remote-tracking branch 'upstream/master'
pm-harshad-mane Feb 27, 2020
f106dc8
Merge remote-tracking branch 'upstream/master'
pm-harshad-mane Mar 4, 2020
1f6937e
Merge remote-tracking branch 'upstream/master'
pm-harshad-mane Mar 6, 2020
06ffe84
Merge remote-tracking branch 'upstream/master'
pm-harshad-mane Mar 6, 2020
5448ceb
Merge remote-tracking branch 'upstream/master'
pm-harshad-mane Mar 6, 2020
e9b90fe
Merge remote-tracking branch 'upstream/master'
pm-harshad-mane Mar 11, 2020
a7a1d12
Merge remote-tracking branch 'upstream/master'
pm-harshad-mane Mar 11, 2020
30b72df
Merge remote-tracking branch 'upstream/master'
pm-harshad-mane Mar 26, 2020
76adbc9
Merge remote-tracking branch 'upstream/master'
pm-harshad-mane Mar 30, 2020
50e13bc
Merge remote-tracking branch 'upstream/master'
pm-harshad-mane Mar 30, 2020
a1c7ca1
Merge remote-tracking branch 'upstream/master'
pm-harshad-mane Mar 30, 2020
96fbadc
Merge remote-tracking branch 'upstream/master'
pm-harshad-mane Apr 1, 2020
4b026e2
Merge remote-tracking branch 'upstream/master'
pm-harshad-mane Apr 9, 2020
38740bc
Merge remote-tracking branch 'upstream/master'
pm-harshad-mane Apr 10, 2020
9daf778
Merge remote-tracking branch 'upstream/master'
pm-harshad-mane Apr 20, 2020
eff8828
Merge remote-tracking branch 'upstream/master'
pm-harshad-mane Apr 21, 2020
ede95de
Merge remote-tracking branch 'upstream/master'
pm-harshad-mane Apr 21, 2020
c98f1a1
Merge remote-tracking branch 'upstream/master'
pm-harshad-mane Apr 23, 2020
312da6d
Merge remote-tracking branch 'upstream/master'
pm-harshad-mane May 18, 2020
d92972c
Merge remote-tracking branch 'upstream/master'
pm-harshad-mane Jun 1, 2020
fd4fb2e
Merge remote-tracking branch 'upstream/master'
pm-harshad-mane Jun 26, 2020
e551136
Merge remote-tracking branch 'upstream/master'
pm-harshad-mane Jun 30, 2020
cfdca3c
Merge remote-tracking branch 'upstream/master'
pm-harshad-mane Jul 7, 2020
22505ff
Merge remote-tracking branch 'upstream/master'
pm-harshad-mane Jul 28, 2020
795a54a
Merge remote-tracking branch 'upstream/master'
pm-harshad-mane Aug 10, 2020
433c98b
Merge remote-tracking branch 'upstream/master'
pm-harshad-mane Sep 3, 2020
a0521ac
Merge remote-tracking branch 'upstream/master'
pm-harshad-mane Sep 24, 2020
635fe74
Merge remote-tracking branch 'upstream/master'
pm-harshad-mane Sep 25, 2020
2759212
Merge remote-tracking branch 'upstream/master'
pm-harshad-mane Oct 12, 2020
84737d8
Merge remote-tracking branch 'upstream/master'
pm-harshad-mane Dec 2, 2020
df5fada
Merge remote-tracking branch 'upstream/master'
pm-harshad-mane Dec 2, 2020
9ab7840
Merge remote-tracking branch 'upstream/master'
pm-harshad-mane Dec 2, 2020
ed4b566
Merge remote-tracking branch 'upstream/master'
pm-harshad-mane Jan 8, 2021
f57d220
Merge remote-tracking branch 'upstream/master'
pm-harshad-mane Jan 20, 2021
6a6d1f4
Merge remote-tracking branch 'upstream/master'
pm-harshad-mane Feb 9, 2021
3650c9d
Merge remote-tracking branch 'upstream/master'
pm-harshad-mane Feb 10, 2021
85c9d49
Merge remote-tracking branch 'upstream/master'
pm-harshad-mane Feb 18, 2021
ca82340
Merge remote-tracking branch 'upstream/master'
pm-harshad-mane Feb 23, 2021
12e8f47
Merge remote-tracking branch 'upstream/master'
pm-harshad-mane Mar 8, 2021
5d024e7
Merge remote-tracking branch 'upstream/master'
pm-harshad-mane Mar 15, 2021
4c87d00
Merge remote-tracking branch 'upstream/master'
pm-harshad-mane Apr 22, 2021
93ea6ca
Merge remote-tracking branch 'upstream/master'
pm-harshad-mane May 6, 2021
1eaefc8
Merge remote-tracking branch 'upstream/master'
pm-harshad-mane Jun 2, 2021
cd4a279
Merge remote-tracking branch 'upstream/master'
pm-harshad-mane Jun 7, 2021
4e9ff9f
Merge remote-tracking branch 'upstream/master'
pm-harshad-mane Aug 6, 2021
f971232
Merge remote-tracking branch 'upstream/master'
pm-harshad-mane Aug 11, 2021
24b2cd0
Merge remote-tracking branch 'upstream/master'
pm-harshad-mane Sep 6, 2021
6d3d8a1
Merge remote-tracking branch 'upstream/master'
pm-harshad-mane Sep 10, 2021
ae6dbb2
Merge remote-tracking branch 'upstream/master'
pm-harshad-mane Sep 21, 2021
a691bc0
Merge remote-tracking branch 'upstream/master'
pm-harshad-mane Sep 23, 2021
bb3ceb1
Merge remote-tracking branch 'upstream/master'
pm-harshad-mane Sep 23, 2021
05b7793
Merge remote-tracking branch 'upstream/master'
pm-harshad-mane Sep 24, 2021
51755a1
Merge remote-tracking branch 'upstream/master'
pm-harshad-mane Sep 24, 2021
64fdc3b
Merge remote-tracking branch 'upstream/master'
pm-harshad-mane Sep 24, 2021
bc6c9f6
import utils functions as needed and not the whole module
pm-harshad-mane Sep 24, 2021
ef500ab
import utils functions as needed and not the whole module
pm-harshad-mane Sep 24, 2021
7e3fa3f
import utils functions as needed and not the whole module
pm-harshad-mane Sep 24, 2021
0a32ede
Revert "import utils functions as needed and not the whole module"
pm-harshad-mane Sep 24, 2021
e4dc495
Revert "import utils functions as needed and not the whole module"
pm-harshad-mane Sep 24, 2021
9e42ba5
Revert "import utils functions as needed and not the whole module"
pm-harshad-mane Sep 24, 2021
0a165c5
import utils functions as needed and not the whole module
pm-harshad-mane Sep 24, 2021
8a7034c
import utils functions as needed and not the whole module
pm-harshad-mane Sep 24, 2021
76b50cd
import utils functions as needed and not the whole module
pm-harshad-mane Sep 24, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 12 additions & 12 deletions modules/datablocksBidAdapter.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { getWindowTop, isGptPubadsDefined, deepAccess, getAdUnitSizes, isEmpty } from '../src/utils.js';
import { registerBidder } from '../src/adapters/bidderFactory.js';
import { config } from '../src/config.js';
import * as utils from '../src/utils.js';
import { BANNER, NATIVE } from '../src/mediaTypes.js';
import { getStorageManager } from '../src/storageManager.js';
import { ajax } from '../src/ajax.js';
Expand Down Expand Up @@ -199,7 +199,7 @@ export const spec = {
// GET BASIC CLIENT INFORMATION
get_client_info: function () {
let botTest = new BotClientTests();
let win = utils.getWindowTop();
let win = getWindowTop();
return {
'wiw': win.innerWidth,
'wih': win.innerHeight,
Expand All @@ -226,7 +226,7 @@ export const spec = {

// ADD GPT EVENT LISTENERS
let scope = this;
if (utils.isGptPubadsDefined()) {
if (isGptPubadsDefined()) {
if (typeof window['googletag'].pubads().addEventListener == 'function') {
window['googletag'].pubads().addEventListener('impressionViewable', function(event) {
scope.queue_metric({type: 'slot_view', source_id: scope.db_obj.source_id, auction_id: bid.auctionId, div_id: event.slot.getSlotElementId(), slot_id: event.slot.getSlotId().getAdUnitPath()});
Expand Down Expand Up @@ -306,7 +306,7 @@ export const spec = {
tagid: bidRequest.params.tagid || bidRequest.adUnitCode,
placement_id: bidRequest.params.placement_id || 0,
secure: window.location.protocol == 'https:',
ortb2: utils.deepAccess(bidRequest, `ortb2Imp`) || {},
ortb2: deepAccess(bidRequest, `ortb2Imp`) || {},
floor: {}
}

Expand All @@ -320,8 +320,8 @@ export const spec = {
}

// BUILD THE SIZES
if (utils.deepAccess(bidRequest, `mediaTypes.banner`)) {
let sizes = utils.getAdUnitSizes(bidRequest);
if (deepAccess(bidRequest, `mediaTypes.banner`)) {
let sizes = getAdUnitSizes(bidRequest);
if (sizes.length) {
imp.banner = {
w: sizes[0][0],
Expand All @@ -332,7 +332,7 @@ export const spec = {
// ADD TO THE LIST OF IMP REQUESTS
imps.push(imp);
}
} else if (utils.deepAccess(bidRequest, `mediaTypes.native`)) {
} else if (deepAccess(bidRequest, `mediaTypes.native`)) {
// ADD TO THE LIST OF IMP REQUESTS
imp.native = createNativeRequest(bidRequest);
imps.push(imp);
Expand Down Expand Up @@ -521,15 +521,15 @@ export const spec = {
const {id, img, data, title} = asset;
const key = NATIVE_ID_MAP[id];
if (key) {
if (!utils.isEmpty(title)) {
if (!isEmpty(title)) {
result.title = title.text
} else if (!utils.isEmpty(img)) {
} else if (!isEmpty(img)) {
result[key] = {
url: img.url,
height: img.h,
width: img.w
}
} else if (!utils.isEmpty(data)) {
} else if (!isEmpty(data)) {
result[key] = data.value;
}
}
Expand All @@ -539,11 +539,11 @@ export const spec = {
}

let bids = [];
let resBids = utils.deepAccess(rtbResponse, 'body.seatbid') || [];
let resBids = deepAccess(rtbResponse, 'body.seatbid') || [];
resBids.forEach(bid => {
let resultItem = {requestId: bid.id, cpm: bid.price, creativeId: bid.crid, currency: bid.currency || 'USD', netRevenue: true, ttl: bid.ttl || 360, meta: {advertiserDomains: bid.adomain}};

let mediaType = utils.deepAccess(bid, 'ext.mtype') || '';
let mediaType = deepAccess(bid, 'ext.mtype') || '';
switch (mediaType) {
case 'banner':
bids.push(Object.assign({}, resultItem, {mediaType: BANNER, width: bid.w, height: bid.h, ad: bid.adm}));
Expand Down
26 changes: 13 additions & 13 deletions modules/deepintentBidAdapter.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { generateUUID, deepSetValue, deepAccess, isArray } from '../src/utils.js';
import {registerBidder} from '../src/adapters/bidderFactory.js';
import {BANNER} from '../src/mediaTypes.js';
import * as utils from '../src/utils.js';
const BIDDER_CODE = 'deepintent';
const BIDDER_ENDPOINT = 'https://prebid.deepintent.com/prebid';
const USER_SYNC_URL = 'https://cdn.deepintent.com/syncpixel.html';
Expand Down Expand Up @@ -32,7 +32,7 @@ export const spec = {
var user = validBidRequests.map(bid => buildUser(bid));
clean(user);
const openRtbBidRequest = {
id: utils.generateUUID(),
id: generateUUID(),
at: 1,
imp: validBidRequests.map(bid => buildImpression(bid)),
site: buildSite(bidderRequest),
Expand All @@ -41,12 +41,12 @@ export const spec = {
};

if (bidderRequest && bidderRequest.uspConsent) {
utils.deepSetValue(openRtbBidRequest, 'regs.ext.us_privacy', bidderRequest.uspConsent);
deepSetValue(openRtbBidRequest, 'regs.ext.us_privacy', bidderRequest.uspConsent);
}

if (bidderRequest && bidderRequest.gdprConsent) {
utils.deepSetValue(openRtbBidRequest, 'user.ext.consent', bidderRequest.gdprConsent.consentString);
utils.deepSetValue(openRtbBidRequest, 'regs.ext.gdpr', (bidderRequest.gdprConsent.gdprApplies ? 1 : 0));
deepSetValue(openRtbBidRequest, 'user.ext.consent', bidderRequest.gdprConsent.consentString);
deepSetValue(openRtbBidRequest, 'regs.ext.gdpr', (bidderRequest.gdprConsent.gdprApplies ? 1 : 0));
}

injectEids(openRtbBidRequest, validBidRequests);
Expand Down Expand Up @@ -134,19 +134,19 @@ function buildUser(bid) {
}

function injectEids(openRtbBidRequest, validBidRequests) {
const bidUserIdAsEids = utils.deepAccess(validBidRequests, '0.userIdAsEids');
if (utils.isArray(bidUserIdAsEids) && bidUserIdAsEids.length > 0) {
utils.deepSetValue(openRtbBidRequest, 'user.eids', bidUserIdAsEids);
utils.deepSetValue(openRtbBidRequest, 'user.ext.eids', bidUserIdAsEids);
const bidUserIdAsEids = deepAccess(validBidRequests, '0.userIdAsEids');
if (isArray(bidUserIdAsEids) && bidUserIdAsEids.length > 0) {
deepSetValue(openRtbBidRequest, 'user.eids', bidUserIdAsEids);
deepSetValue(openRtbBidRequest, 'user.ext.eids', bidUserIdAsEids);
}
}

function buildBanner(bid) {
if (utils.deepAccess(bid, 'mediaTypes.banner')) {
if (deepAccess(bid, 'mediaTypes.banner')) {
// Get Sizes from MediaTypes Object, Will always take first size, will be overrided by params for exact w,h
if (utils.deepAccess(bid, 'mediaTypes.banner.sizes') && !bid.params.height && !bid.params.width) {
let sizes = utils.deepAccess(bid, 'mediaTypes.banner.sizes');
if (utils.isArray(sizes) && sizes.length > 0) {
if (deepAccess(bid, 'mediaTypes.banner.sizes') && !bid.params.height && !bid.params.width) {
let sizes = deepAccess(bid, 'mediaTypes.banner.sizes');
if (isArray(sizes) && sizes.length > 0) {
return {
h: sizes[0][1],
w: sizes[0][0],
Expand Down
20 changes: 10 additions & 10 deletions modules/dgkeywordRtdProvider.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @requires module:modules/realTimeData
*/

import * as utils from '../src/utils.js';
import { logMessage, deepSetValue, logError, logInfo } from '../src/utils.js';
import { ajax } from '../src/ajax.js';
import { submodule } from '../src/hook.js';
import { getGlobal } from '../src/prebidGlobal.js';
Expand All @@ -26,19 +26,19 @@ export function getDgKeywordsAndSet(reqBidsConfigObj, callback, moduleConfig, us
const url = (moduleConfig && moduleConfig.params && moduleConfig.params.url) ? moduleConfig.params.url : URL + encodeURIComponent(window.location.href);
const adUnits = reqBidsConfigObj.adUnits || getGlobal().adUnits;
let isFinish = false;
utils.logMessage('[dgkeyword sub module]', adUnits, timeout);
logMessage('[dgkeyword sub module]', adUnits, timeout);
let setKeywordTargetBidders = getTargetBidderOfDgKeywords(adUnits);
if (setKeywordTargetBidders.length <= 0) {
utils.logMessage('[dgkeyword sub module] no dgkeyword targets.');
logMessage('[dgkeyword sub module] no dgkeyword targets.');
callback();
} else {
utils.logMessage('[dgkeyword sub module] dgkeyword targets:', setKeywordTargetBidders);
utils.logMessage('[dgkeyword sub module] get targets from profile api start.');
logMessage('[dgkeyword sub module] dgkeyword targets:', setKeywordTargetBidders);
logMessage('[dgkeyword sub module] get targets from profile api start.');
ajax(url, {
success: function(response) {
const res = JSON.parse(response);
if (!isFinish) {
utils.logMessage('[dgkeyword sub module] get targets from profile api end.');
logMessage('[dgkeyword sub module] get targets from profile api end.');
if (res) {
let keywords = {};
if (res['s'] != null && res['s'].length > 0) {
Expand All @@ -60,8 +60,8 @@ export function getDgKeywordsAndSet(reqBidsConfigObj, callback, moduleConfig, us
if (!reqBidsConfigObj._ignoreSetOrtb2) {
// set keywrods to ortb2
let addOrtb2 = {};
utils.deepSetValue(addOrtb2, 'site.keywords', keywords);
utils.deepSetValue(addOrtb2, 'user.keywords', keywords);
deepSetValue(addOrtb2, 'site.keywords', keywords);
deepSetValue(addOrtb2, 'user.keywords', keywords);
const ortb2 = {ortb2: addOrtb2};
reqBidsConfigObj.setBidderConfig({ bidders: Object.keys(targetBidKeys), config: ortb2 });
}
Expand All @@ -73,7 +73,7 @@ export function getDgKeywordsAndSet(reqBidsConfigObj, callback, moduleConfig, us
},
error: function(errorStatus) {
// error occur
utils.logError('[dgkeyword sub module] profile api access error.', errorStatus);
logError('[dgkeyword sub module] profile api access error.', errorStatus);
callback();
}
}, null, {
Expand All @@ -83,7 +83,7 @@ export function getDgKeywordsAndSet(reqBidsConfigObj, callback, moduleConfig, us
setTimeout(function () {
if (!isFinish) {
// profile api timeout
utils.logInfo('[dgkeyword sub module] profile api timeout. [timeout: ' + timeout + 'ms]');
logInfo('[dgkeyword sub module] profile api timeout. [timeout: ' + timeout + 'ms]');
isFinish = true;
}
callback();
Expand Down
30 changes: 15 additions & 15 deletions modules/districtmDMXBidAdapter.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as utils from '../src/utils.js';
import { isArray, generateUUID, deepAccess, isStr } from '../src/utils.js';
import { registerBidder } from '../src/adapters/bidderFactory.js';
import { config } from '../src/config.js';
import { BANNER, VIDEO } from '../src/mediaTypes.js';
Expand Down Expand Up @@ -30,7 +30,7 @@ export const spec = {
interpretResponse(response, bidRequest) {
response = response.body || {};
if (response.seatbid) {
if (utils.isArray(response.seatbid)) {
if (isArray(response.seatbid)) {
const { seatbid } = response;
let winners = seatbid.reduce((bid, ads) => {
let ad = ads.bid.reduce(function (oBid, nBid) {
Expand Down Expand Up @@ -89,7 +89,7 @@ export const spec = {
let timeout = config.getConfig('bidderTimeout');
let schain = null;
let dmxRequest = {
id: utils.generateUUID(),
id: generateUUID(),
cur: ['USD'],
tmax: (timeout - 300),
test: this.test() || 0,
Expand All @@ -109,17 +109,17 @@ export const spec = {

let eids = [];
if (bidRequest[0] && bidRequest[0].userId) {
bindUserId(eids, utils.deepAccess(bidRequest[0], `userId.idl_env`), 'liveramp.com', 1);
bindUserId(eids, utils.deepAccess(bidRequest[0], `userId.id5id.uid`), 'id5-sync.com', 1);
bindUserId(eids, utils.deepAccess(bidRequest[0], `userId.pubcid`), 'pubcid.org', 1);
bindUserId(eids, utils.deepAccess(bidRequest[0], `userId.tdid`), 'adserver.org', 1);
bindUserId(eids, utils.deepAccess(bidRequest[0], `userId.criteoId`), 'criteo.com', 1);
bindUserId(eids, utils.deepAccess(bidRequest[0], `userId.britepoolid`), 'britepool.com', 1);
bindUserId(eids, utils.deepAccess(bidRequest[0], `userId.lipb.lipbid`), 'liveintent.com', 1);
bindUserId(eids, utils.deepAccess(bidRequest[0], `userId.intentiqid`), 'intentiq.com', 1);
bindUserId(eids, utils.deepAccess(bidRequest[0], `userId.lotamePanoramaId`), 'lotame.com', 1);
bindUserId(eids, utils.deepAccess(bidRequest[0], `userId.parrableId`), 'parrable.com', 1);
bindUserId(eids, utils.deepAccess(bidRequest[0], `userId.netId`), 'netid.de', 1);
bindUserId(eids, deepAccess(bidRequest[0], `userId.idl_env`), 'liveramp.com', 1);
bindUserId(eids, deepAccess(bidRequest[0], `userId.id5id.uid`), 'id5-sync.com', 1);
bindUserId(eids, deepAccess(bidRequest[0], `userId.pubcid`), 'pubcid.org', 1);
bindUserId(eids, deepAccess(bidRequest[0], `userId.tdid`), 'adserver.org', 1);
bindUserId(eids, deepAccess(bidRequest[0], `userId.criteoId`), 'criteo.com', 1);
bindUserId(eids, deepAccess(bidRequest[0], `userId.britepoolid`), 'britepool.com', 1);
bindUserId(eids, deepAccess(bidRequest[0], `userId.lipb.lipbid`), 'liveintent.com', 1);
bindUserId(eids, deepAccess(bidRequest[0], `userId.intentiqid`), 'intentiq.com', 1);
bindUserId(eids, deepAccess(bidRequest[0], `userId.lotamePanoramaId`), 'lotame.com', 1);
bindUserId(eids, deepAccess(bidRequest[0], `userId.parrableId`), 'parrable.com', 1);
bindUserId(eids, deepAccess(bidRequest[0], `userId.netId`), 'netid.de', 1);
dmxRequest.user = dmxRequest.user || {};
dmxRequest.user.ext = dmxRequest.user.ext || {};
dmxRequest.user.ext.eids = eids;
Expand Down Expand Up @@ -370,7 +370,7 @@ export function defaultSize(thebidObj) {
}

export function bindUserId(eids, value, source, atype) {
if (utils.isStr(value) && Array.isArray(eids)) {
if (isStr(value) && Array.isArray(eids)) {
eids.push({
source,
uids: [
Expand Down
10 changes: 5 additions & 5 deletions modules/dmdIdSystem.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* @requires module:modules/userId
*/

import * as utils from '../src/utils.js';
import { logError, getWindowLocation } from '../src/utils.js';
import { submodule } from '../src/hook.js';
import { ajax } from '../src/ajax.js';

Expand Down Expand Up @@ -46,7 +46,7 @@ export const dmdIdSubmodule = {
!configParams.api_key ||
typeof configParams.api_key !== 'string'
) {
utils.logError('dmd submodule requires an api_key.');
logError('dmd submodule requires an api_key.');
return;
}
// If cahceIdObj is null or undefined - calling AIX-API
Expand All @@ -59,7 +59,7 @@ export const dmdIdSubmodule = {
// Setting headers
const headers = {};
headers['x-api-key'] = configParams.api_key;
headers['x-domain'] = utils.getWindowLocation();
headers['x-domain'] = getWindowLocation();
// Response callbacks
const resp = function (callback) {
const callbacks = {
Expand All @@ -72,12 +72,12 @@ export const dmdIdSubmodule = {
responseId = responseObj.dgid;
}
} catch (error) {
utils.logError(error);
logError(error);
}
callback(responseId);
},
error: error => {
utils.logError(`${MODULE_NAME}: ID fetch encountered an error`, error);
logError(`${MODULE_NAME}: ID fetch encountered an error`, error);
callback();
}
};
Expand Down
18 changes: 9 additions & 9 deletions modules/docereeBidAdapter.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as utils from '../src/utils.js';
import { tryAppendQueryString } from '../src/utils.js';
import { registerBidder } from '../src/adapters/bidderFactory.js';
import { config } from '../src/config.js';
import { BANNER } from '../src/mediaTypes.js';
Expand All @@ -24,14 +24,14 @@ export const spec = {
const { publisherUrl, placementId } = validBidRequest.params;
const url = publisherUrl || page
let queryString = '';
queryString = utils.tryAppendQueryString(queryString, 'id', placementId);
queryString = utils.tryAppendQueryString(queryString, 'publisherDomain', domain);
queryString = utils.tryAppendQueryString(queryString, 'pubRequestedURL', encodeURIComponent(url));
queryString = utils.tryAppendQueryString(queryString, 'loggedInUser', encodedUserInfo);
queryString = utils.tryAppendQueryString(queryString, 'currentUrl', url);
queryString = utils.tryAppendQueryString(queryString, 'prebidjs', true);
queryString = utils.tryAppendQueryString(queryString, 'token', token);
queryString = utils.tryAppendQueryString(queryString, 'requestId', validBidRequest.bidId);
queryString = tryAppendQueryString(queryString, 'id', placementId);
queryString = tryAppendQueryString(queryString, 'publisherDomain', domain);
queryString = tryAppendQueryString(queryString, 'pubRequestedURL', encodeURIComponent(url));
queryString = tryAppendQueryString(queryString, 'loggedInUser', encodedUserInfo);
queryString = tryAppendQueryString(queryString, 'currentUrl', url);
queryString = tryAppendQueryString(queryString, 'prebidjs', true);
queryString = tryAppendQueryString(queryString, 'token', token);
queryString = tryAppendQueryString(queryString, 'requestId', validBidRequest.bidId);

serverRequests.push({
method: 'GET',
Expand Down
10 changes: 5 additions & 5 deletions modules/dspxBidAdapter.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as utils from '../src/utils.js';
import { deepAccess } from '../src/utils.js';
import {config} from '../src/config.js';
import {registerBidder} from '../src/adapters/bidderFactory.js';
import { BANNER, VIDEO } from '../src/mediaTypes.js';
Expand Down Expand Up @@ -199,7 +199,7 @@ function objectToQueryString(obj, prefix) {
* @returns {boolean} True if it's a banner bid
*/
function isBannerRequest(bid) {
return bid.mediaType === 'banner' || !!utils.deepAccess(bid, 'mediaTypes.banner') || !isVideoRequest(bid);
return bid.mediaType === 'banner' || !!deepAccess(bid, 'mediaTypes.banner') || !isVideoRequest(bid);
}

/**
Expand All @@ -209,7 +209,7 @@ function isBannerRequest(bid) {
* @returns {boolean} True if it's a video bid
*/
function isVideoRequest(bid) {
return bid.mediaType === 'video' || !!utils.deepAccess(bid, 'mediaTypes.video');
return bid.mediaType === 'video' || !!deepAccess(bid, 'mediaTypes.video');
}

/**
Expand All @@ -219,7 +219,7 @@ function isVideoRequest(bid) {
* @returns {object} True if it's a video bid
*/
function getVideoSizes(bid) {
return parseSizes(utils.deepAccess(bid, 'mediaTypes.video.playerSize') || bid.sizes);
return parseSizes(deepAccess(bid, 'mediaTypes.video.playerSize') || bid.sizes);
}

/**
Expand All @@ -229,7 +229,7 @@ function getVideoSizes(bid) {
* @returns {object} True if it's a video bid
*/
function getBannerSizes(bid) {
return parseSizes(utils.deepAccess(bid, 'mediaTypes.banner.sizes') || bid.sizes);
return parseSizes(deepAccess(bid, 'mediaTypes.banner.sizes') || bid.sizes);
}

/**
Expand Down
Loading