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

[pull] master from prebid:master #22

Merged
merged 34 commits into from
Apr 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
9648399
PubMatic Bid Adapter: Support for DSA (#11245)
jlquaccia Mar 21, 2024
2fbdf06
Kargo Bid Adapter: Adds ortb2 and ortb2Imp to request (#11248)
nickllerandi Mar 21, 2024
708a696
NextMillennium: Added some parameters for video (#11235)
mhlm Mar 21, 2024
9088112
Debugging module: add PAAPI support (#11240)
dgirardi Mar 22, 2024
d9245b0
AdMatic Bid Adapter : gvlid and video renderer feature added (#11212)
fatihkaya84 Mar 22, 2024
4bad7e4
Uid2 Token Gen Library: Allow EUID key prefixes (#11250)
ssundahlTTD Mar 25, 2024
e5da9e4
Update DM wrappers TTL default (#11255)
apukh-magnite Mar 25, 2024
af20eda
Aso Bid Adapter: refactoring to use ortb converter (#11249)
adserver-online Mar 25, 2024
c5e8af7
OMS Adapter: add gpid support (#11238)
prBigBrother Mar 25, 2024
e3789a6
Prebid 8.42.0 release
prebidjs-release Mar 26, 2024
b64724e
Increment version to 8.43.0-pre
prebidjs-release Mar 26, 2024
8e5b35c
Bump express from 4.18.2 to 4.19.2 (#11258)
dependabot[bot] Mar 26, 2024
673f44f
Smartyads Bid Adapter : add user id fields (#11221)
rishko00 Mar 26, 2024
0d681ef
Adkernel Bid Adapter: add monetix alias (#11264)
ckbo3hrk Mar 27, 2024
ec34fa4
Documentation : change day on release notes (#11257)
ChrisHuie Mar 27, 2024
af3e7fa
DeepIntent Bid Adapter : add gpp and coppa compliance support (#11239)
parthshah51999 Mar 27, 2024
f072634
OpenWeb adapter refactoring (#11115)
alexander-plotnikov-openweb Mar 28, 2024
74d63a4
Evolution Bid Adapter: add gvlid (#11272)
e-volution-tech Apr 1, 2024
3a808fe
Gamma Bid Adapter : Support multi endpoint by region (#11263)
gammassp Apr 1, 2024
cddb934
AppNexus Bid Adapter - add support for video plcmt field (#11244)
jsnellbaker Apr 2, 2024
c27f64b
Optimize splitChunk config; import paapi from fledgeFromGpt (#11269)
dgirardi Apr 3, 2024
74a404c
Smartadserver Bid Adapter: Update default value of startDelay video p…
krzysztofequativ Apr 3, 2024
b8786a9
core: allow bid adapters to return null fledgeAuctionConfigs (#11271)
dgirardi Apr 3, 2024
f63b3ad
Build system: fix e2e tests (#11287)
dgirardi Apr 4, 2024
32e952c
PXYZ Bid Adapter : add GumGum iframe url to usersync list (#11280)
giri-playgroundxyz Apr 4, 2024
0bcd57f
Anyclip Bid Adapter : initial release (#11200)
basil79 Apr 4, 2024
797adc1
GumGum Bid Adapter : add support for displaymanager and displaymanage…
ahzgg Apr 4, 2024
d1d1564
MediaImpact Bid Adapter : add custom size parameter to request (#11254)
nalexand Apr 4, 2024
af21c55
Yieldmo Bid Adapter : support for cookie deprecation label (#11294)
desidiver Apr 4, 2024
e405ca9
Build system: fix source maps (#11293)
dgirardi Apr 4, 2024
a76da0e
Core: fix build for node 12 (#11299)
dgirardi Apr 5, 2024
dc3b7c6
Prebid 8.43.0 release
prebidjs-release Apr 5, 2024
0aed5ce
Increment version to 8.44.0-pre
prebidjs-release Apr 5, 2024
eac5e04
Lasso Bid Adapter: add gpp support (#11256)
victorlassomarketing Apr 8, 2024
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
2 changes: 1 addition & 1 deletion RELEASE_SCHEDULE.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

## Release Schedule

We aim to push a new release of Prebid.js every week on Tuesday.
We aim to push a new release of Prebid.js each week barring any unforseen circumstances or in observance of holidays.

While the releases will be available immediately for those using direct Git access,
it will be about a week before the Prebid Org [Download Page](https://docs.prebid.org/download.html) will be updated.
Expand Down
3 changes: 1 addition & 2 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -295,8 +295,7 @@ function bundle(dev, moduleArr) {
[coreFile].concat(moduleFiles).map(name => path.basename(name)).forEach((file) => {
(depGraph[file] || []).forEach((dep) => dependencies.add(helpers.getBuiltPath(dev, dep)));
});

const entries = [coreFile].concat(Array.from(dependencies), moduleFiles);
const entries = _.uniq([coreFile].concat(Array.from(dependencies), moduleFiles));

var outputFileName = argv.bundleName ? argv.bundleName : 'prebid.js';

Expand Down
3 changes: 1 addition & 2 deletions karma.conf.maker.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@ function newWebpackConfig(codeCoverage, disableFeatures) {
mode: 'development',
devtool: 'inline-source-map',
});

delete webpackConfig.entry;
['entry', 'optimization'].forEach(prop => delete webpackConfig[prop]);

webpackConfig.module.rules
.flatMap((r) => r.use)
Expand Down
3 changes: 2 additions & 1 deletion modules/adkernelBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,8 @@ export const spec = {
{code: 'qortex'},
{code: 'adpluto'},
{code: 'headbidder'},
{code: 'digiad'}
{code: 'digiad'},
{code: 'monetix'}
],
supportedMediaTypes: [BANNER, VIDEO, NATIVE],

Expand Down
104 changes: 74 additions & 30 deletions modules/admaticBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import {getValue, formatQS, logError, deepAccess, isArray, getBidIdParameter} fr
import { registerBidder } from '../src/adapters/bidderFactory.js';
import { config } from '../src/config.js';
import { BANNER, VIDEO, NATIVE } from '../src/mediaTypes.js';
import { Renderer } from '../src/Renderer.js';

/**
* @typedef {import('../src/adapters/bidderFactory.js').BidRequest} BidRequest
Expand Down Expand Up @@ -33,11 +34,13 @@ export const OPENRTB = {

let SYNC_URL = '';
const BIDDER_CODE = 'admatic';
const RENDERER_URL = 'https://acdn.adnxs.com/video/outstream/ANOutstreamVideo.js';

export const spec = {
code: BIDDER_CODE,
gvlid: 1281,
aliases: [
{code: 'pixad'}
{code: 'pixad', gvlid: 1281}
],
supportedMediaTypes: [BANNER, VIDEO, NATIVE],
/**
Expand Down Expand Up @@ -190,38 +193,45 @@ export const spec = {
interpretResponse: (response, request) => {
const body = response.body;
const bidResponses = [];

if (body && body?.data && isArray(body.data)) {
body.data.forEach(bid => {
const resbid = {
requestId: bid.id,
cpm: bid.price,
width: bid.width,
height: bid.height,
currency: body.cur || 'TRY',
netRevenue: true,
creativeId: bid.creative_id,
meta: {
model: bid.mime_type,
advertiserDomains: bid && bid.adomain ? bid.adomain : []
},
bidder: bid.bidder,
mediaType: bid.type,
ttl: 60
};

if (resbid.mediaType === 'video' && isUrl(bid.party_tag)) {
resbid.vastUrl = bid.party_tag;
resbid.vastImpUrl = bid.iurl;
} else if (resbid.mediaType === 'video') {
resbid.vastXml = bid.party_tag;
resbid.vastImpUrl = bid.iurl;
} else if (resbid.mediaType === 'banner') {
resbid.ad = bid.party_tag;
} else if (resbid.mediaType === 'native') {
resbid.native = interpretNativeAd(bid.party_tag)
};
const bidRequest = getAssociatedBidRequest(request.data.imp, bid);
if (bidRequest) {
const resbid = {
requestId: bid.id,
cpm: bid.price,
width: bid.width,
height: bid.height,
currency: body.cur || 'TRY',
netRevenue: true,
creativeId: bid.creative_id,
meta: {
model: bid.mime_type,
advertiserDomains: bid && bid.adomain ? bid.adomain : []
},
bidder: bid.bidder,
mediaType: bid.type,
ttl: 60
};

if (resbid.mediaType === 'video' && isUrl(bid.party_tag)) {
resbid.vastUrl = bid.party_tag;
} else if (resbid.mediaType === 'video') {
resbid.vastXml = bid.party_tag;
} else if (resbid.mediaType === 'banner') {
resbid.ad = bid.party_tag;
} else if (resbid.mediaType === 'native') {
resbid.native = interpretNativeAd(bid.party_tag)
};

const context = deepAccess(bidRequest, 'mediatype.context');
if (resbid.mediaType === 'video' && context === 'outstream') {
resbid.renderer = createOutstreamVideoRenderer(bid);
}

bidResponses.push(resbid);
bidResponses.push(resbid);
}
});
}
return bidResponses;
Expand Down Expand Up @@ -272,6 +282,40 @@ function isUrl(str) {
}
};

function outstreamRender (bid) {
bid.renderer.push(() => {
window.ANOutstreamVideo.renderAd({
targetId: bid.adUnitCode,
adResponse: bid.adResponse
});
});
}

function createOutstreamVideoRenderer(bid) {
const renderer = Renderer.install({
id: bid.bidId,
url: RENDERER_URL,
loaded: false
});

try {
renderer.setRender(outstreamRender);
} catch (err) {
logError('Prebid Error calling setRender on renderer' + err);
}

return renderer;
}

function getAssociatedBidRequest(bidRequests, bid) {
for (const request of bidRequests) {
if (request.id === bid.id) {
return request;
}
}
return undefined;
}

function enrichSlotWithFloors(slot, bidRequest) {
try {
const slotFloors = {};
Expand Down
213 changes: 213 additions & 0 deletions modules/anyclipBidAdapter.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,213 @@
import {registerBidder} from '../src/adapters/bidderFactory.js';
import {BANNER} from '../src/mediaTypes.js';
import {deepAccess, isArray, isFn, logError, logInfo} from '../src/utils.js';
import {config} from '../src/config.js';

/**
* @typedef {import('../src/adapters/bidderFactory.js').BidRequest} BidRequest
* @typedef {import('../src/adapters/bidderFactory.js').Bid} Bid
* @typedef {import('../src/adapters/bidderFactory.js').ServerRequest} ServerRequest
* @typedef {import('../src/adapters/bidderFactory.js').BidderSpec} BidderSpec
*/

const BIDDER_CODE = 'anyclip';
const ENDPOINT_URL = 'https://prebid.anyclip.com';
const DEFAULT_CURRENCY = 'USD';
const NET_REVENUE = false;

/*
* Get the bid floor value from the bidRequest object, either using the getFloor function or by accessing the 'params.floor' property.
* If the bid floor cannot be determined, return 0 as a fallback value.
*/
function getBidFloor(bidRequest) {
if (!isFn(bidRequest.getFloor)) {
return deepAccess(bidRequest, 'params.floor', 0);
}

try {
const bidFloor = bidRequest.getFloor({
currency: DEFAULT_CURRENCY,
mediaType: '*',
size: '*',
});
return bidFloor.floor;
} catch (err) {
logError(err);
return 0;
}
}

/** @type {BidderSpec} */
export const spec = {
code: BIDDER_CODE,
supportedMediaTypes: [BANNER],

/**
* @param {object} bid
* @return {boolean}
*/
isBidRequestValid: (bid = {}) => {
const bidder = deepAccess(bid, 'bidder');
const params = deepAccess(bid, 'params', {});
const mediaTypes = deepAccess(bid, 'mediaTypes', {});
const banner = deepAccess(mediaTypes, BANNER, {});

const isValidBidder = (bidder === BIDDER_CODE);
const isValidSize = (Boolean(banner.sizes) && isArray(mediaTypes[BANNER].sizes) && mediaTypes[BANNER].sizes.length > 0);
const hasSizes = mediaTypes[BANNER] ? isValidSize : false;
const hasRequiredBidParams = Boolean(params.publisherId && params.supplyTagId);

const isValid = isValidBidder && hasSizes && hasRequiredBidParams;
if (!isValid) {
logError(`Invalid bid request: isValidBidder: ${isValidBidder}, hasSizes: ${hasSizes}, hasRequiredBidParams: ${hasRequiredBidParams}`);
}
return isValid;
},

/**
* @param {BidRequest[]} validBidRequests
* @param {*} bidderRequest
* @return {ServerRequest}
*/
buildRequests: (validBidRequests, bidderRequest) => {
const bidRequest = validBidRequests[0];

let refererInfo;
if (bidderRequest && bidderRequest.refererInfo) {
refererInfo = bidderRequest.refererInfo;
}

const timeout = bidderRequest.timeout;
const timeoutAdjustment = timeout - ((20 / 100) * timeout); // timeout adjustment - 20%

if (isPubTagAvailable()) {
// Options
const options = {
publisherId: bidRequest.params.publisherId,
supplyTagId: bidRequest.params.supplyTagId,
url: refererInfo.page,
domain: refererInfo.domain,
prebidTimeout: timeoutAdjustment,
gpid: bidRequest.adUnitCode,
ext: {
transactionId: bidRequest.transactionId
},
sizes: bidRequest.sizes.map((size) => {
return {width: size[0], height: size[1]}
})
}
// Floor
const floor = parseFloat(getBidFloor(bidRequest));
if (!isNaN(floor)) {
options.ext.floor = floor;
}
// Supply Chain (Schain)
if (bidRequest?.schain) {
options.schain = bidRequest.schain
}
// GDPR & Consent (EU)
if (bidderRequest?.gdprConsent) {
options.gdpr = (bidderRequest.gdprConsent.gdprApplies ? 1 : 0);
options.consent = bidderRequest.gdprConsent.consentString;
}
// GPP
if (bidderRequest?.gppConsent?.gppString) {
options.gpp = {
gppVersion: bidderRequest.gppConsent.gppVersion,
sectionList: bidderRequest.gppConsent.sectionList,
applicableSections: bidderRequest.gppConsent.applicableSections,
gppString: bidderRequest.gppConsent.gppString
}
}
// CCPA (US Privacy)
if (bidderRequest?.uspConsent) {
options.usPrivacy = bidderRequest.uspConsent;
}
// COPPA
if (config.getConfig('coppa') === true) {
options.coppa = 1;
}
// Eids
if (bidRequest?.userIdAsEids) {
const eids = bidRequest.userIdAsEids;
if (eids && eids.length) {
options.eids = eids;
}
}

// Request bids
const requestBidsPromise = window._anyclip.pubTag.requestBids(options);
if (requestBidsPromise !== undefined) {
requestBidsPromise
.then(() => {
logInfo('PubTag requestBids done');
})
.catch((err) => {
logError('PubTag requestBids error', err);
});
}

// Request
const payload = {
tmax: timeoutAdjustment
}

return {
method: 'GET',
url: ENDPOINT_URL,
data: payload,
bidRequest
}
}
},

/**
* @param {*} serverResponse
* @param {ServerRequest} bidRequest
* @return {Bid[]}
*/
interpretResponse: (serverResponse, { bidRequest }) => {
const bids = [];

if (bidRequest && isPubTagAvailable()) {
const bidResponse = window._anyclip.pubTag.getBids(bidRequest.transactionId);
if (bidResponse) {
const { adServer } = bidResponse;
if (adServer) {
bids.push({
requestId: bidRequest.bidId,
creativeId: adServer.bid.creativeId,
cpm: bidResponse.cpm,
width: adServer.bid.width,
height: adServer.bid.height,
currency: adServer.bid.currency || DEFAULT_CURRENCY,
netRevenue: NET_REVENUE,
ttl: adServer.bid.ttl,
ad: adServer.bid.ad,
meta: adServer.bid.meta
});
}
}
}

return bids;
},

/**
* @param {Bid} bid
*/
onBidWon: (bid) => {
if (isPubTagAvailable()) {
window._anyclip.pubTag.bidWon(bid);
}
}
}

/**
* @return {boolean}
*/
const isPubTagAvailable = () => {
return !!(window._anyclip && window._anyclip.pubTag);
}

registerBidder(spec);
Loading