Skip to content

Commit

Permalink
Merge branch 'prebid:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
krzysztofequativ authored Sep 2, 2024
2 parents 55bbc9d + 360c3ea commit a0e1efe
Show file tree
Hide file tree
Showing 77 changed files with 9,252 additions and 8,305 deletions.
35 changes: 35 additions & 0 deletions libraries/paapiTools/buyerOrigins.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
/*
This list is several known buyer origins for PAAPI auctions.
Bidders should add anyone they like to it.
It is not intended to be comphensive nor maintained by the Core team.
Rather, Bid adapters should simply append additional constants whenever
the need arises in their adapter.
The goal is to reduce expression of common constants over many
bid adapters attempting to define interestGroupBuyers
in advance of network traffic.
Bidders should consider updating their interstGroupBuyer list
with server communication for auctions initiated after the first bid response.
Known buyers without current importers are commented out. If you need one, uncomment it.
*/

export const BO_CSR_ONET = 'https://csr.onet.pl';
// export const BO_DOUBLECLICK_GOOGLEADS = 'https://googleads.g.doubleclick.net';
// export const BO_DOUBLECLICK_TD = 'https://td.doubleclick.net';
// export const BO_RTBHOUSE = 'https://f.creativecdn.com';
// export const BO_CRITEO_US = 'https://fledge.us.criteo.com';
// export const BO_CRITEO_EU = 'https://fledge.eu.criteo.com';
// export const BO_CRITEO_AS = 'https://fledge.as.criteo.com';
// export const BO_CRITEO_GRID_MERCURY = 'https://grid-mercury.criteo.com';
// export const BO_CRITEO_BIDSWITCH_TRADR = 'https://tradr.bsw-sb.criteo.com';
// export const BO_CRITEO_BIDSWITCH_SANDBOX = 'https://dsp-paapi-sandbox.bsw-ig.criteo.com';
// export const BO_APPSPOT = 'https://fledge-buyer-testing-1.uc.r.appspot.com';
// export const BO_OPTABLE = 'https://ads.optable.co';
// export const BO_ADROLL = 'https://x.adroll.com';
// export const BO_ADFORM = 'https://a2.adform.net';
// export const BO_RETARGETLY = 'https://cookieless-campaign.prd-00.retargetly.com';
// export const BO_AUDIGENT = 'https://proton.ad.gt';
// export const BO_YAHOO = 'https://pa.ybp.yahoo.com';
// export const BO_DOTOMI = 'https://usadmm.dotomi.com';
4 changes: 4 additions & 0 deletions libraries/vidazooUtils/bidderUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,8 @@ export function buildRequestData(bid, topWindowUrl, sizes, bidderRequest, bidder
const pagecat = deepAccess(bidderRequest, 'ortb2.site.pagecat', []);
const contentData = deepAccess(bidderRequest, 'ortb2.site.content.data', []);
const userData = deepAccess(bidderRequest, 'ortb2.user.data', []);
const contentLang = deepAccess(bidderRequest, 'ortb2.site.content.language') || document.documentElement.lang;
const coppa = deepAccess(bidderRequest, 'ortb2.regs.coppa', 0);

if (isFn(bid.getFloor)) {
const floorInfo = bid.getFloor({
Expand Down Expand Up @@ -278,6 +280,8 @@ export function buildRequestData(bid, topWindowUrl, sizes, bidderRequest, bidder
gpid: gpid,
cat: cat,
contentData,
contentLang,
coppa,
userData: userData,
pagecat: pagecat,
transactionId: ortb2Imp?.ext?.tid,
Expand Down
12 changes: 8 additions & 4 deletions modules/adagioAnalyticsAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ function handlerAuctionInit(event) {
// Check if Adagio is on the bid requests.
const adagioBidRequest = event.bidderRequests.find(bidRequest => isAdagio(bidRequest.bidderCode));

const rtdUid = deepAccess(adagioBidRequest, 'ortb2.site.ext.data.adg_rtd.uid');
const rtdUid = deepAccess(event.bidderRequests[0], 'ortb2.site.ext.data.adg_rtd.uid');
cache.addPrebidAuctionIdRef(prebidAuctionId, rtdUid);

cache.auctions[prebidAuctionId] = {};
Expand Down Expand Up @@ -214,13 +214,16 @@ function handlerAuctionInit(event) {
bannerSize => bannerSize
).sort();

const sortedBidderCodes = bidders.sort()
const sortedBidderNames = bidders.sort();

const bidSrcMapper = (bidder) => {
// bidderCode in the context of the bidderRequest is the name given to the bidder in the adunit.
// It is not always the "true" bidder code, it can also be its alias
const request = event.bidderRequests.find(br => br.bidderCode === bidder)
return request ? request.bids[0].src : null
}
const biddersSrc = sortedBidderCodes.map(bidSrcMapper).join(',');
const biddersSrc = sortedBidderNames.map(bidSrcMapper).join(',');
const biddersCode = sortedBidderNames.map(bidder => adapterManager.resolveAlias(bidder)).join(',');

// if adagio was involved in the auction we identified it with rtdUid, if not use the prebid auctionId
const auctionId = rtdUid || prebidAuctionId;
Expand All @@ -238,14 +241,15 @@ function handlerAuctionInit(event) {
url_dmn: w.location.hostname,
mts: mediaTypesKeys.join(','),
ban_szs: bannerSizes.join(','),
bdrs: sortedBidderCodes.join(','),
bdrs: sortedBidderNames.join(','),
pgtyp: deepAccess(event.bidderRequests[0], 'ortb2.site.ext.data.pagetype', null),
plcmt: deepAccess(adUnits[0], 'ortb2Imp.ext.data.placement', null),
t_n: adgRtdSession.testName || null,
t_v: adgRtdSession.testVersion || null,
s_id: adgRtdSession.id || null,
s_new: adgRtdSession.new || null,
bdrs_src: biddersSrc,
bdrs_code: biddersCode,
};

if (adagioBidRequest && adagioBidRequest.bids) {
Expand Down
22 changes: 16 additions & 6 deletions modules/connatixBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ import {
isFn,
logError,
isArray,
formatQS
formatQS,
deepSetValue
} from '../src/utils.js';

import {
Expand Down Expand Up @@ -61,6 +62,16 @@ export function validateVideo(mediaTypes) {
return video.context !== ADPOD;
}

/**
* Get ids from Prebid User ID Modules and add them to the payload
*/
function _handleEids(payload, validBidRequests) {
let bidUserIdAsEids = deepAccess(validBidRequests, '0.userIdAsEids');
if (isArray(bidUserIdAsEids) && bidUserIdAsEids.length > 0) {
deepSetValue(payload, 'userIdList', bidUserIdAsEids);
}
}

export const spec = {
code: BIDDER_CODE,
gvlid: 143,
Expand All @@ -75,20 +86,17 @@ export const spec = {
const bidId = deepAccess(bid, 'bidId');
const mediaTypes = deepAccess(bid, 'mediaTypes', {});
const params = deepAccess(bid, 'params', {});
const bidder = deepAccess(bid, 'bidder');

const hasBidId = Boolean(bidId);
const isValidBidder = (bidder === BIDDER_CODE);
const hasMediaTypes = Boolean(mediaTypes) && (Boolean(mediaTypes[BANNER]) || Boolean(mediaTypes[VIDEO]));
const isValidBanner = validateBanner(mediaTypes);
const isValidVideo = validateVideo(mediaTypes);
const hasRequiredBidParams = Boolean(params.placementId);

const isValid = isValidBidder && hasBidId && hasMediaTypes && isValidBanner && isValidVideo && hasRequiredBidParams;
const isValid = hasBidId && hasMediaTypes && isValidBanner && isValidVideo && hasRequiredBidParams;
if (!isValid) {
logError(
`Invalid bid request:
isValidBidder: ${isValidBidder},
`Invalid bid request:
hasBidId: ${hasBidId},
hasMediaTypes: ${hasMediaTypes},
isValidBanner: ${isValidBanner},
Expand Down Expand Up @@ -130,6 +138,8 @@ export const spec = {
bidRequests,
};

_handleEids(requestPayload, validBidRequests);

return {
method: 'POST',
url: AD_URL,
Expand Down
Loading

0 comments on commit a0e1efe

Please sign in to comment.