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

merge master #23

Merged
merged 31 commits into from
Apr 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
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
b37baca
Criteo Bid Adapter: Fix invalid DSA adrender field mapping (#11306)
leonardlabat Apr 8, 2024
7f93cb2
Agma Analytics Adapter: adds deviceHeight and deviceWidth to request …
steffenmllr Apr 8, 2024
668c7c7
Remove the sending of experian rtd data through the fpd object (#11307)
JonGoSonobi Apr 9, 2024
4577159
Appnexus Bid Adapter: added emetriq as an alias (#11302)
Pubstream Apr 9, 2024
ca5162b
Adkernel Bid Adapter: remove legacy native impl (#11291)
ckbo3hrk Apr 9, 2024
db0b1bd
refactors code for userIds; updates userId tests (#29) (#11298)
nickllerandi Apr 9, 2024
beeb901
Removed sending of experian data to Sonobi's bid endpoint (#11309)
JonGoSonobi Apr 9, 2024
de42f8d
Adagio Analytics: change bidder code for aliases and add bidder cpm (…
soupape34 Apr 10, 2024
7dbcb47
GumGum Bid Adapter : Add support for the DSA (#11311)
MartinGumGum Apr 10, 2024
458036a
JW Player RTD Module : populate content url, title and description (#…
karimMourra Apr 11, 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
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
<!DOCTYPE html>
<html lang="en">
<head>

/* Paste JW Player script tag here */

<script async src="../../build/dev/prebid.js"></script>
<script async src="https://www.googletagservices.com/tag/js/gpt.js"></script>
<meta charset="UTF-8">
<title>JW Player RTD Provider Example</title>
<script>
var FAILSAFE_TIMEOUT = 3300;
var PREBID_TIMEOUT = 1000;

var adUnits = [{
code: 'div-gpt-ad-1460505748561-0',
code: 'video-ad-unit',
ortb2Imp: {
ext: {
data: {
Expand All @@ -23,16 +25,21 @@
}
},
mediaTypes: {
banner: {
sizes: [[300, 250], [300,600]],
video: {
sizes: [[320, 460]],
mimes : ["video/mp4"],
minduration : 3,
maxduration: 30,
protocols : [1,2]
}
},
// Replace this object to test a new Adapter!
bids: [{
bidder: 'appnexus',
params: {
placementId: 13144370
}
bidder: 'ix',
params: {
siteId: '300',
video: {}
}
}]
}];

Expand All @@ -41,11 +48,6 @@
</script>

<script>
var googletag = googletag || {};
googletag.cmd = googletag.cmd || [];
googletag.cmd.push(function() {
googletag.pubads().disableInitialLoad();
});

pbjs.que.push(function() {
pbjs.setConfig({
Expand All @@ -63,44 +65,28 @@
});
pbjs.addAdUnits(adUnits);
pbjs.requestBids({
bidsBackHandler: sendAdserverRequest,
bidsBackHandler: renderHighestBid,
timeout: PREBID_TIMEOUT
});
});

function sendAdserverRequest() {
if (pbjs.adserverRequestSent) return;
pbjs.adserverRequestSent = true;
googletag.cmd.push(function() {
pbjs.que.push(function() {
pbjs.setTargetingForGPTAsync();
googletag.pubads().refresh();
});
});
}

setTimeout(function() {
sendAdserverRequest();
}, FAILSAFE_TIMEOUT);

</script>
function renderHighestBid() {
const highestBids = pbjs.getHighestCpmBids('video-ad-unit');
const highestBid = highestBids && highestBids.length && highestBids[0];
if (!highestBid) {
return;
}

<script>
googletag.cmd.push(function () {
googletag.defineSlot('/19968336/header-bid-tag-0', [[300, 250], [300, 600]], 'div-gpt-ad-1460505748561-0').addService(googletag.pubads());
if (highestBid.vastXml) {
jwplayer().loadAdXml(highestBid.vastXml);
} else if (highestBid.vastUrl) {
jwplayer().loadAdTag(highestBid.vastUrl);
}
}

googletag.pubads().enableSingleRequest();
googletag.enableServices();
});
</script>
</head>

<body>
<h5>Div-1</h5>
<div id='div-gpt-ad-1460505748561-0'>
<script type='text/javascript'>
googletag.cmd.push(function() { googletag.display('div-gpt-ad-1460505748561-0'); });
</script>
</div>
</body>
</html>
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
79 changes: 41 additions & 38 deletions modules/adagioAnalyticsAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ const ADAGIO_GVLID = 617;
const VERSION = '3.0.0';
const PREBID_VERSION = '$prebid.version$';
const ENDPOINT = 'https://c.4dex.io/pba.gif';
const CURRENCY_USD = 'USD';
const ADAGIO_CODE = 'adagio';
const cache = {
auctions: {},
getAuction: function(auctionId, adUnitCode) {
Expand Down Expand Up @@ -92,17 +94,11 @@ function removeDuplicates(arr, getKey) {
});
};

function getAdapterNameForAlias(aliasName) {
return adapterManager.aliasRegistry[aliasName] || aliasName;
};

function isAdagio(value) {
if (!value) {
function isAdagio(alias) {
if (!alias) {
return false
}

return value.toLowerCase().includes('adagio') ||
getAdapterNameForAlias(value).toLowerCase().includes('adagio');
return (alias + adapterManager.aliasRegistry[alias]).toLowerCase().includes(ADAGIO_CODE);
};

function getMediaTypeAlias(mediaType) {
Expand All @@ -129,6 +125,26 @@ function addKeyPrefix(obj, prefix) {
}, {});
}

function getUsdCpm(cpm, currency) {
let netCpm = cpm

if (typeof currency === 'string' && currency.toUpperCase() !== CURRENCY_USD) {
if (typeof getGlobal().convertCurrency === 'function') {
netCpm = parseFloat(Number(getGlobal().convertCurrency(cpm, currency, CURRENCY_USD))).toFixed(3);
} else {
netCpm = null
}
}
return netCpm
}

function getCurrencyData(bid) {
return {
netCpm: getUsdCpm(bid.cpm, bid.currency),
orginalCpm: getUsdCpm(bid.originalCpm, bid.originalCurrency)
}
}

/**
* sendRequest to Adagio. It filter null values and encode each query param.
* @param {Object} qp
Expand Down Expand Up @@ -258,7 +274,7 @@ function handlerAuctionInit(event) {
t_v: params.testVersion || null,
mts: mediaTypesKeys.join(','),
ban_szs: bannerSizes.join(','),
bdrs: bidders.map(bidder => getAdapterNameForAlias(bidder.bidder)).sort().join(','),
bdrs: bidders.map(bidder => bidder.bidder).sort().join(','),
adg_mts: adagioMediaTypes.join(',')
};

Expand Down Expand Up @@ -299,56 +315,43 @@ function handlerAuctionEnd(event) {

const adUnitCodes = cache.getAllAdUnitCodes(auctionId);
adUnitCodes.forEach(adUnitCode => {
const mapper = (bidder) => event.bidsReceived.find(bid => bid.adUnitCode === adUnitCode && bid.bidder === bidder) ? '1' : '0';
const bidResponseMapper = (bidder) => {
const bid = event.bidsReceived.find(bid => bid.adUnitCode === adUnitCode && bid.bidder === bidder)
return bid ? '1' : '0'
}
const bidCpmMapper = (bidder) => {
const bid = event.bidsReceived.find(bid => bid.adUnitCode === adUnitCode && bid.bidder === bidder)
return bid ? getCurrencyData(bid).netCpm : null
}

cache.updateAuction(auctionId, adUnitCode, {
bdrs_bid: cache.getBiddersFromAuction(auctionId, adUnitCode).map(mapper).join(',')
bdrs_bid: cache.getBiddersFromAuction(auctionId, adUnitCode).map(bidResponseMapper).join(','),
bdrs_cpm: cache.getBiddersFromAuction(auctionId, adUnitCode).map(bidCpmMapper).join(',')
});
sendNewBeacon(auctionId, adUnitCode);
});
}

function handlerBidWon(event) {
let auctionId = getTargetedAuctionId(event);

if (!guard.bidTracked(auctionId, event.adUnitCode)) {
return;
}

let adsCurRateToUSD = (event.currency === 'USD') ? 1 : null;
let ogCurRateToUSD = (event.originalCurrency === 'USD') ? 1 : null;
try {
if (typeof getGlobal().convertCurrency === 'function') {
// Currency module is loaded, we can calculate the conversion rate.

// Get the conversion rate from the original currency to USD.
ogCurRateToUSD = getGlobal().convertCurrency(1, event.originalCurrency, 'USD');
// Get the conversion rate from the ad server currency to USD.
adsCurRateToUSD = getGlobal().convertCurrency(1, event.currency, 'USD');
}
} catch (error) {
logError('Error on Adagio Analytics Adapter - handlerBidWon', error);
}
const currencyData = getCurrencyData(event)

const adagioAuctionCacheId = (
(event.latestTargetedAuctionId && event.latestTargetedAuctionId !== event.auctionId)
? cache.getAdagioAuctionId(event.auctionId)
: null);

cache.updateAuction(auctionId, event.adUnitCode, {
win_bdr: getAdapterNameForAlias(event.bidder),
win_bdr: event.bidder,
win_mt: getMediaTypeAlias(event.mediaType),
win_ban_sz: event.mediaType === BANNER ? `${event.width}x${event.height}` : null,

// ad server currency
win_cpm: event.cpm,
cur: event.currency,
cur_rate: adsCurRateToUSD,

// original currency from bidder
og_cpm: event.originalCpm,
og_cur: event.originalCurrency,
og_cur_rate: ogCurRateToUSD,
win_net_cpm: currencyData.netCpm,
win_og_cpm: currencyData.orginalCpm,

// cache bid id
auct_id_c: adagioAuctionCacheId,
Expand Down Expand Up @@ -428,7 +431,7 @@ adagioAdapter.enableAnalytics = config => {

adapterManager.registerAnalyticsAdapter({
adapter: adagioAdapter,
code: 'adagio',
code: ADAGIO_CODE,
gvlid: ADAGIO_GVLID,
});

Expand Down
Loading