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
DimaIntentIQ authored Nov 13, 2024
2 parents a298a00 + 112beee commit adbc56d
Show file tree
Hide file tree
Showing 104 changed files with 6,503 additions and 2,243 deletions.
20 changes: 10 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Prebid.js is open source software that is offered for free as a convenience. Whi

*Note:* Requires Prebid.js v1.38.0+

Prebid.js depends on Babel and some Babel Plugins in order to run correctly in the browser. Here are some examples for
Prebid.js depends on Babel and some Babel Plugins in order to run correctly in the browser. Here are some examples for
configuring webpack to work with Prebid.js.

With Babel 7:
Expand All @@ -37,7 +37,7 @@ module.exports = {
mode: 'production',
module: {
rules: [

// this rule can be excluded if you don't require babel-loader for your other application files
{
test: /\.m?js$/,
Expand All @@ -46,7 +46,7 @@ module.exports = {
loader: 'babel-loader',
}
},

// this separate rule is required to make sure that the Prebid.js files are babel-ified. this rule will
// override the regular exclusion from above (for being inside node_modules).
{
Expand All @@ -71,15 +71,15 @@ Or for Babel 6:
// you must manually install and specify the presets and plugins yourself
options: {
plugins: [
"transform-object-assign", // required (for IE support) and "babel-plugin-transform-object-assign"
"transform-object-assign", // required (for IE support) and "babel-plugin-transform-object-assign"
// must be installed as part of your package.
require('prebid.js/plugins/pbjsGlobals.js') // required!
],
presets: [
["env", { // you can use other presets if you wish.
"targets": { // this example is using "babel-presets-env", which must be installed if you
"browsers": [ // follow this example.
... // your browser targets. they should probably match the targets you're using for the rest
... // your browser targets. they should probably match the targets you're using for the rest
// of your application
]
}
Expand Down Expand Up @@ -143,7 +143,7 @@ This will run testing but not linting. A web server will start at `http://localh

Development may be a bit slower but if you prefer linting and additional watch files you can also still run just:

$ gulp serve
$ gulp serve


### Build Optimization
Expand All @@ -162,11 +162,11 @@ Building with just these adapters will result in a smaller bundle which should a
- Then run the build:

$ gulp build --modules=openxBidAdapter,rubiconBidAdapter,sovrnBidAdapter

Alternatively, a `.json` file can be specified that contains a list of modules you would like to include.

$ gulp build --modules=modules.json

With `modules.json` containing the following
```json modules.json
[
Expand Down Expand Up @@ -202,7 +202,7 @@ gulp bundle --tag one --modules=one.json
gulp bundle --tag two --modules=two.json
```

This generates slightly larger files, but has the advantage of being much faster to run (after the initial `gulp build`). It's also the method used by [the Prebid.org download page](https://docs.prebid.org/download.html).
This generates slightly larger files, but has the advantage of being much faster to run (after the initial `gulp build`). It's also the method used by [the Prebid.org download page](https://docs.prebid.org/download.html).

<a name="Run"></a>

Expand Down Expand Up @@ -378,7 +378,7 @@ For instructions on writing tests for Prebid.js, see [Testing Prebid.js](https:/

### Supported Browsers

Prebid.js is supported on IE11 and modern browsers until 5.x. 6.x+ transpiles to target >0.25%; not Opera Mini; not IE11.
Prebid.js is supported on IE11 and modern browsers until 5.x. 6.x+ transpiles to target >0.25%; not Opera Mini; not IE11.

### Governance
Review our governance model [here](https://github.com/prebid/Prebid.js/tree/master/governance.md).
Expand Down
7 changes: 3 additions & 4 deletions integrationExamples/gpt/51DegreesRtdProvider_example.html
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@
name: '51Degrees',
waitForIt: true,
params: {
// Get your resource key from https://configure.51degrees.com/tWrhNfY6
// Get your resource key from https://configure.51degrees.com/HNZ75HT1
resourceKey: '<YOUR_RESOURCE_KEY>',
// alternatively, you can use the on-premise version of the 51Degrees service and connect to your chosen end point
// onPremiseJSUrl: 'https://localhost/51Degrees.core.js'
Expand Down Expand Up @@ -181,12 +181,11 @@ <h3>div-banner-native-2</h3>
<h3>Testing/Debugging Guidance</h3>
<ol>
<li>Make sure you have <code>debug: true</code> under <code>pbjs.setConfig</code> in this example code (be sure to remove it for production!)
<li>Make sure you have replaced <code>&lt;YOUR RESOURCE KEY&gt;</code> in this example code with the one you have obtained
from the <a href="https://configure.51degrees.com/tWrhNfY6" target="blank;">51Degrees Configurator Tool</a></li>
<li>Make sure you have replaced <code>&lt;YOUR RESOURCE KEY&gt;</code> in this example code with the one you have obtained
from the <a href="https://configure.51degrees.com/HNZ75HT1" target="blank;">51Degrees Configurator Tool</a></li>
<li>Open DevTools Console in your browser and refresh the page</li>
<li>Observe the enriched ortb device data shown below and also in the console as part of the <code>[51Degrees RTD Submodule]: reqBidsConfigObj:</code> message (under <code>reqBidsConfigObj.global.device</code>)</li>
</ol>

</div>
<div id="enriched-51" style="display: none">
<h3>Enriched ORTB2 device data</h3>
Expand Down
132 changes: 132 additions & 0 deletions integrationExamples/gpt/adnuntius_multiformat_example.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,132 @@
<html>
<head>
<script async src="https://www.googletagservices.com/tag/js/gpt.js"></script>
<script async src="../../build/dev/prebid.js"></script>
<script>
var FAILSAFE_TIMEOUT = 3000;

var adUnits = [{
code: 'div-gpt-ad-1683695049516-0',
bids: [{
bidder: 'adnuntius',
params: {
auId: "381535",
network: "1287",
bidType: 'netBid',
targeting: {
kv: {
'isolate': 'native-anto'
}
}
}
}],
mediaTypes: {
banner: {
sizes: [[200, 200]]
},
video: {
playerSize: [200, 200],
context: 'instream'
}
}},
{
code: 'div-gpt-ad-1683695049516-0',
bids: [{
bidder: 'adnuntius',
params: {
auId: "381535",
network: "1287",
bidType: 'netBid',
targetId: 'fred',
targeting: {
kv: {
'isolate': 'native-anto'
}
}
}
}],
mediaTypes: {
banner: {
sizes: [[200, 200]]
},
video: {
playerSize: [200, 200],
context: 'instream'
}
}}];
var googletag = googletag || {};
googletag.cmd = googletag.cmd || [];
googletag.cmd.push(function() {
googletag.pubads().disableInitialLoad();
});

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

pbjs.que.push(function() {
pbjs.setConfig({
enableSendAllBids: true,
targetingControls: {
alwaysIncludeDeals: true
},
userSync: {
syncEnabled: false
}
});

pbjs.setBidderConfig({
bidders: ['adnuntius'],
config: {
bidType: 'netBid'
}
});

pbjs.bidderSettings = {
standard: {
storageAllowed: true
}
};

pbjs.addAdUnits(adUnits);
pbjs.requestBids({bidsBackHandler: initAdserver});
});

function initAdserver() {
if (pbjs.initAdserverSet) return;
pbjs.initAdserverSet = true;
googletag.cmd.push(function() {
pbjs.que.push(function() {
pbjs.setTargetingForGPTAsync('div-gpt-ad-1683695049516-0');
googletag.pubads().refresh();
});
});
}

// in case PBJS doesn't load
setTimeout(function() {
initAdserver();
}, FAILSAFE_TIMEOUT);

window.googletag = window.googletag || {cmd: []};
googletag.cmd.push(function() {
googletag.defineSlot('/19660636/320x320', [320, 320], 'div-gpt-ad-1683695049516-0').addService(googletag.pubads());
googletag.pubads().enableSingleRequest();
googletag.enableServices();
});
</script>
</head>
<body>
<h2>Adnuntius NATIVE</h2>
<h5>Ad Slot 1</h5>

<!-- /19660636/320x320 -->
<div id='div-gpt-ad-1683695049516-0' style='min-width: 320px; min-height: 320px;'>
<script>
googletag.cmd.push(function() {
googletag.display('div-gpt-ad-1683695049516-0');
});
</script>
</div>

</body>
</html>
Loading

0 comments on commit adbc56d

Please sign in to comment.