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

Sync with prebid master #11

Merged
merged 46 commits into from
May 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
1400fbe
Add GPP support in Teads adapter (#11535)
github-baptiste-haudegand May 22, 2024
4d0d0b7
Onetag Bid Adapter: add reading of ortb2Imp field (#11539)
fliccione May 22, 2024
e55a64b
Handle kvs and segments better from multiple sources (#11508)
antosarho May 22, 2024
178ef64
PubMatic Bid Adapter : start sending displaymanager & displaymanagerv…
kapil-tuptewar May 22, 2024
565825f
Forward extended parameters (#11527)
bjorn-lw May 22, 2024
e8c6891
51d: remove specific API request limits from doc (#11546)
justadreamer May 23, 2024
e074512
LiveIntent Identity Module: Introduce First Party ID (#11437)
3link May 23, 2024
f4d8ed3
Prebid 8.50.0 release
prebidjs-release May 23, 2024
1ebf1a6
Increment version to 8.51.0-pre
prebidjs-release May 23, 2024
b1d5237
CadentApertureMX Bid Adapter : update gpid support (#11557)
EMXDigital May 23, 2024
8c4955b
Eskimi Bid Adapter: switching to plcmt (#11543)
myDisconnect May 23, 2024
8efc3be
Colombia Bid Adapter : initial release (#11478)
adtech-colombia May 24, 2024
dd34052
Insticator Bid Adapter: Add support for BidFloors (#11472)
shubhamc-ins May 24, 2024
caa2b8b
User id module: Ability to store user IDs in cookie and localStorage …
carlosfelix May 24, 2024
abf0fd0
Taboola Bid Adapter: support DChain (#11545)
ahmadlob May 24, 2024
29a5b40
Kobler adapter: Fix to avoid bidding with third-party creatives requi…
acsbendi May 24, 2024
1fc5844
MinuteMedia: Respond with the correct creativeId (#11565)
zkosanovic May 25, 2024
f6a214b
Rise: Respond with the correct creativeId (#11564)
zkosanovic May 25, 2024
229c968
STN: Respond with the correct creativeId (#11566)
zkosanovic May 26, 2024
e0e177f
Adkernel Bid Adapter: add hyperbrainz alias (#11544)
ckbo3hrk May 27, 2024
187e0d8
Prebid Core: Configurable maxbid (#11519)
mkomorski May 27, 2024
af55020
remove use of deprecated video.placement (#11573)
vishal-dw May 27, 2024
e093b2c
ZetaGlobalSpp adapter: remove onTimeout (#11576)
asurovenko-zeta May 28, 2024
a5eaf63
OpenWeb: Respond with the correct creativeId (#11574)
AvivOpenWeb May 28, 2024
6957843
Beachfront Bid Adapter : add plcmt support (#11558)
jsalis May 28, 2024
646426f
Preciso Bid Adapter : update on valid request checks (#11161)
NikhilGopalChennissery May 28, 2024
7851caf
Revert "Preciso Bid Adapter : update on valid request checks (#11161…
ChrisHuie May 28, 2024
8620ae4
update adapter SmartHub: add aliases (#11553)
SmartHubSolutions May 28, 2024
b44deb8
AIDEM Bid Adapter : fixed getConfig cleanup of consent management (#1…
Wazabit May 28, 2024
f6040c4
DeepIntent Bid Adapter : update video.placement to video.plcmt (#11577)
parthshah51999 May 28, 2024
6b446e6
IQzone Bid Adapter : update placement to plcmt and move coppa from ge…
IQZoneAdx May 28, 2024
78f93cd
Concert Bid Adapter : add dealId Property to Bid Responses (#11582)
BrettBlox May 28, 2024
8309f29
Sirdata RTD Module : add eids and post content support and get ready …
nouchy May 28, 2024
0f91aff
Lucead Bid Adapter: Update (#11488)
aymeric45 May 28, 2024
e1b028f
new lint rule for Prebid 9 fix : use textContent instead of innerText…
nouchy May 29, 2024
deeeb9e
update placement logic, deprecated in 9.0 prebid version (#11600)
shubhamc-ins May 29, 2024
1cad24d
Smartadserver Bid Adapter : refactor gpid logic as part of Prebid 9.0…
krzysztofequativ May 29, 2024
2fef9c2
Appnexus Bid Adapter: parse the currency from the bid if specified (#…
astartsky May 29, 2024
45a77ef
PBS adapter: do not set bidder schain in source.ext.schain (#11467)
dgirardi May 29, 2024
2928473
Nexx360 Bid Adapter: Additional localStorage information (#11466)
gchicoye May 29, 2024
6b7c86e
Adagio Rtd Provider: initial release (#11509)
osazos May 29, 2024
8681fb9
AdagioBidAdapter: update preparation for Rtd module and Prebid.js 9 (…
osazos May 29, 2024
b15af76
Contxtful RTD Provider : add ORTB2 support (#11497)
sebastienrufiange May 29, 2024
38ca7c2
Add vidazoo bidder to topicsFpdModule. (#11283)
saar120 May 29, 2024
84e4359
Taboola Bid Adapter: fix ortb2 user override issue (#11516)
ahmadlob May 29, 2024
5a62b38
Currency module: fix bug where changing currency configs causes curre…
dgirardi May 30, 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
261 changes: 191 additions & 70 deletions integrationExamples/gpt/contxtfulRtdProvider_example.html
Original file line number Diff line number Diff line change
@@ -1,91 +1,212 @@
<!DOCTYPE html>
<html>

<head>
<script src="http://localhost:9999/build/dev/prebid.js" async></script>
<script async src="https://www.googletagservices.com/tag/js/gpt.js"></script>
<script async>
const FAILSAFE_TIMEOUT = 8000;
const PREBID_TIMEOUT = 5000;
<script async src=
"https://www.googletagservices.com/tag/js/gpt.js"></script>
<script async src="http://localhost:9999/build/dev/prebid.js"></script>
<title>Contxtful Rtd Provider Example</title>
<script>
var div1Sizes = [
[300, 250],
[300, 600]
];
var div2Sizes = [
[728, 90 ],
[970, 250]
];

var PREBID_TIMEOUT = 1000;
var FAILSAFE_TIMEOUT = 3000;

var adUnits = [
{
code: '/19968336/header-bid-tag-0',
mediaTypes: {
banner: {
sizes: div1Sizes
},
},

const bidders = [
bids: [
{
bidder: 'appnexus',
params: {
placementId: 13144370
placementId: 13144370,
},
},
{
bidder: 'rubicon',
params: {
accountId: 14062,
siteId: 70608,
zoneId: 498816,
},
},
{
bidder: 'sharethrough',
params: {

placementId: 13144370,
// REQUIRED - The placement key
pkey: 'LuB3vxGGFrBZJa6tifXW4xgK',

// OPTIONAL - Blocked Advertiser Domains
badv: ['domain1.com', 'domain2.com'],

// OPTIONAL - Blocked Categories (IAB codes)
bcat: ['IAB1-1', 'IAB1-2'],

// OPTIONAL - default bid floor, if not specified in bid request (USD)
floor: 0.1,
}
},
],
},
{
code: '/19968336/header-bid-tag-1',
mediaTypes: {
banner: {
sizes: div2Sizes,
}
];
},

var adUnits = [
bids: [
{
code: 'div-gpt-ad-1460505748561-0',
mediaTypes: {
banner: {
sizes: [[300, 250], [300, 600]],
}
bidder: 'rubicon',
params: {
accountId: 14062,
siteId: 70608,
zoneId: 498816,
},
bids: bidders,
}
];


var pbjs = pbjs || {};
pbjs.que = pbjs.que || [];
var googletag = googletag || {};
googletag.cmd = googletag.cmd || [];
googletag.cmd.push(function () {
googletag.pubads().disableInitialLoad();
googletag.defineSlot('/19968336/header-bid-tag-0', [[300, 250], [300, 600]], 'div-gpt-ad-1460505748561-0').addService(googletag.pubads());
googletag.pubads().enableSingleRequest();
googletag.enableServices();
},
{
bidder: 'sharethrough',
params: {

placementId: 13144370,
// REQUIRED - The placement key
pkey: 'LuB3vxGGFrBZJa6tifXW4xgK',

// OPTIONAL - Blocked Advertiser Domains
badv: ['domain1.com', 'domain2.com'],

// OPTIONAL - Blocked Categories (IAB codes)
bcat: ['IAB1-1', 'IAB1-2'],

// OPTIONAL - default bid floor, if not specified in bid request (USD)
floor: 0.1,
}
},
]
},
];

var pbjs = pbjs || {};
pbjs.que = pbjs.que || [];

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

pbjs.que.push(function() {
pbjs.setConfig({
debug: true,
realTimeData: {
auctionDelay: 100,
dataProviders: [
{
name: 'contxtful',
waitForIt: true,
params:
{
'version': 'Contact [email protected] for the API version',
'customer': 'Contact [email protected] for the customer ID',
'hostname': 'api.receptivity.io',
'adServerTargeting': true,
'bidders': ['sharethrough']
}
}
]}
});

pbjs.addAdUnits(adUnits);

// Initial bids
pbjs.requestBids({
bidsBackHandler: initAdserver,
timeout: PREBID_TIMEOUT
});
});

function refreshBids() {
pbjs.que.push(function () {
pbjs.requestBids({
bidsBackHandler: initAdserver,
timeout: PREBID_TIMEOUT,
});
});
}

function initAdserver() {
googletag.cmd.push(function () {
pbjs.que.push(function () {
pbjs.setConfig({
debug: true,
realTimeData: {
auctionDelay: 100,
dataProviders: [
{
name: "contxtful",
waitForIt: true,
params: {
version: "Contact [email protected] for the API version",
customer: "Contact [email protected] for the customer ID"
}
}
]
}
});
pbjs.addAdUnits(adUnits);
pbjs.requestBids({
bidsBackHandler: sendAdserverRequest,
timeout: PREBID_TIMEOUT
});
pbjs.setTargetingForGPTAsync();
googletag.pubads().refresh();
});
});
}

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

setTimeout(function () {
sendAdserverRequest();
}, FAILSAFE_TIMEOUT);
googletag.cmd.push(function () {
googletag
.defineSlot('/19968336/header-bid-tag-0',
div1Sizes, 'div-1')
.addService(googletag.pubads());
googletag.pubads().enableSingleRequest();
googletag.enableServices();
});

</script>
</head>
googletag.cmd.push(function () {
googletag
.defineSlot('/19968336/header-bid-tag-1',
div2Sizes, 'div-2')
.addService(googletag.pubads());
googletag.pubads().enableSingleRequest();
googletag.enableServices();
});

</script>
</head>
<body>
<h2>Contxtful RTD Provider</h2>
<div id='div-gpt-ad-1460505748561-0'></div>
</div>
</body>
<h2>Contxtful Rtd Provider Example</h2>

<p><button onclick="refreshBids()">Refresh Ad Units</button></p>

<h5>Div-1</h5>
<div id='div-1'>
<script type='text/javascript'>
googletag.cmd.push(function() {
googletag.display('div-1');
});

</html>
</script>
</div>

<br>

<h5>Div-2</h5>
<div id='div-2'>
<script type='text/javascript'>
googletag.cmd.push(function() {
googletag.display('div-2');
});

</script>
</div>
</body>
</html>
2 changes: 1 addition & 1 deletion modules/51DegreesRtdProvider.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ In order to use the module please first obtain a Resource Key using the [Configu
* ScreenInchesWidth
* PixelRatio (optional)

PixelRatio is desirable, but it's a paid property requiring a paid license. Also free API service is limited to 500,000 requests per month - consider picking a [51Degrees pricing plan](https://51degrees.com/pricing) that fits your needs.
PixelRatio is desirable, but it's a paid property requiring a paid license. Free API service is limited. Please check [51Degrees pricing](https://51degrees.com/pricing) to choose a plan that suits your needs.

#### User Agent Client Hint (UA-CH) Permissions

Expand Down
15 changes: 8 additions & 7 deletions modules/adagioBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -667,13 +667,14 @@ function autoFillParams(bid) {
bid.params.site = adgGlobalConf.siteId.split(':')[1];
}

// Edge case. Useful when Prebid Manager cannot handle properly params setting…
if (adgGlobalConf.useAdUnitCodeAsPlacement === true || bid.params.useAdUnitCodeAsPlacement === true) {
// `useAdUnitCodeAsPlacement` is an edge case. Useful when a Prebid Manager cannot handle properly params setting.
// In Prebid.js 9, `placement` should be defined in ortb2Imp and the `useAdUnitCodeAsPlacement` param should be removed
bid.params.placement = deepAccess(bid, 'ortb2Imp.ext.data.placement', bid.params.placement);
if (!bid.params.placement && (adgGlobalConf.useAdUnitCodeAsPlacement === true || bid.params.useAdUnitCodeAsPlacement === true)) {
bid.params.placement = bid.adUnitCode;
}

bid.params.adUnitElementId = deepAccess(bid, 'ortb2Imp.ext.data.elementId', null) || bid.params.adUnitElementId;

bid.params.adUnitElementId = deepAccess(bid, 'ortb2Imp.ext.data.divId', bid.params.adUnitElementId);
if (!bid.params.adUnitElementId) {
if (adgGlobalConf.useAdUnitCodeAsAdUnitElementId === true || bid.params.useAdUnitCodeAsAdUnitElementId === true) {
bid.params.adUnitElementId = bid.adUnitCode;
Expand Down Expand Up @@ -959,14 +960,14 @@ const OUTSTREAM_RENDERER = {
* @returns
*/
const _getFeatures = (bidRequest) => {
const f = { ...deepAccess(bidRequest, 'ortb2.ext.features', GlobalExchange.getOrSetGlobalFeatures()) } || {};
const f = { ...deepAccess(bidRequest, 'ortb2.site.ext.data.adg_rtd.features', GlobalExchange.getOrSetGlobalFeatures()) } || {};

f.print_number = deepAccess(bidRequest, 'bidderRequestsCount', 1).toString();

if (f.type === 'bidAdapter') {
f.adunit_position = getSlotPosition(bidRequest.params.adUnitElementId)
} else {
f.adunit_position = deepAccess(bidRequest, 'ortb2Imp.ext.data.adunit_position');
f.adunit_position = deepAccess(bidRequest, 'ortb2Imp.ext.data.adg_rtd.adunit_position');
}

Object.keys(f).forEach((prop) => {
Expand Down Expand Up @@ -1019,7 +1020,7 @@ export const spec = {
// We don't validate the dsa object in adapter and let our server do it.
const dsa = deepAccess(bidderRequest, 'ortb2.regs.ext.dsa');

let rtdSamplingSession = deepAccess(bidderRequest, 'ortb2.ext.session');
let rtdSamplingSession = deepAccess(bidderRequest, 'ortb2.site.ext.data.adg_rtd.session');
const dataExchange = (rtdSamplingSession) ? { session: rtdSamplingSession } : GlobalExchange.getExchangeData();

const aucId = generateUUID()
Expand Down
Loading