Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/prebid/Prebid.js into pre…
Browse files Browse the repository at this point in the history
…built

* 'master' of https://github.com/prebid/Prebid.js: (38 commits)
  Add optional domain parameter to AdButler adapter (prebid#1078)
  Send transactionID to Criteo Services (prebid#1113)
  Fix `buildMasterVideoTagFromAdserverTag()` not selecting winning bid (prebid#1106)
  Remove placement size selection and filtering (prebid#1107)
  revert `srcdoc` change (prebid#1130)
  Add new Adapter- Beachfront Media (prebid#1062)
  Fixes SpringServe adapter (prebid#1101)
  Update Widespace request param (prebid#1098)
  - New Adapter: Innity (prebid#1074)
  Update Roxot prebid analytic adapter (prebid#1034)
  Yarn Package Manager (prebid#1109)
  allow writing into current document if prebid is loaded inside an iframe (prebid#1066)
  Adapter bug fix (prebid#1096)
  fix typo
  added pr review process and governance model (prebid#1103)
  added support for sampling in ga and base adapter, fixed up some tests (prebid#1011)
  Add Inneractive adapter (prebid#1048)
  Add alias freewheel-ssp to stickyadstv bidder adapter  (prebid#1043)
  Add Facebook Audience Network adapter (prebid#1068)
  Add Atomx support (prebid#1056)
  ...
  • Loading branch information
outoftime committed Apr 19, 2017
2 parents 39c40c5 + 6a6724c commit b930704
Show file tree
Hide file tree
Showing 74 changed files with 11,148 additions and 868 deletions.
2 changes: 1 addition & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Thank you for your pull request. Please make sure this PR is scoped to one chang
<!-- Remove items that don't apply and/or select an item by changing [ ] to [x] -->
- [ ] Bugfix
- [ ] Feature
- [ ] New bidder adapter
- [ ] New bidder adapter <!-- IMPORTANT: if checking here, also submit your bidder params documentation here https://github.com/prebid/prebid.github.io/tree/master/dev-docs/bidders -->
- [ ] Code style update (formatting, local variables)
- [ ] Refactoring (no functional changes, no api changes)
- [ ] Build related changes
Expand Down
32 changes: 20 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ This README is for developers who want to contribute to Prebid.js. For user-fac

$ git clone https://github.com/prebid/Prebid.js.git
$ cd Prebid.js
$ npm install
$ yarn install

If you experience errors after a version update, try a fresh install:
Prebid now supports the `yarn` npm client. This is an alternative to using `npm` for package management, though `npm` will continue to work as before.

$ rm -rf ./node_modules && npm cache clean && npm install
For more info about yarn see https://yarnpkg.com

<a name="Build"></a>

Expand Down Expand Up @@ -64,19 +64,22 @@ For example, in `path/to/your/list-of-adapters.json`, write:
Building with just these adapters will result in a smaller bundle which should allow your pages to load faster.

**Build standalone prebid.js**
Prebid now supports the `yarn` npm client. This is an alternative to using `npm` for package management, though `npm` will continue to work as before.

- Clone the repo, run `npm install`
For more info about yarn see https://yarnpkg.com

- Clone the repo, run `yarn install`
- Duplicate `adapters.json` to e.g. `list-of-adapters.json`
- Remove the unnecessary adapters from `list-of-adapters.json`
- Then run the build:

$ gulp build --adapters path/to/your/list-of-adapters.json

**Build prebid.js using NPM for bundling**
**Build prebid.js using Yarn for bundling**

In case you'd like to explicitly show that your project uses `prebid.js` and want a reproducible build, consider adding it as an `npm` dependency.
In case you'd like to explicitly show that your project uses `prebid.js` and want a reproducible build, consider adding it as an `yarn` dependency.

- Install `prebid.js` as an `npm` dependency of your project
- Add `prebid.js` as a `yarn` dependency of your project: `yarn add prebid.js`
- Duplicate `node_modules/prebid.js/adapters.json` to under your project path, e.g. `path/to/your/list-of-adapters.json`
- Remove the unnecessary adapters
- Run the `prebid.js` build under the `node_modules/prebid.js/` folder
Expand Down Expand Up @@ -131,7 +134,7 @@ This runs code quality checks, generates all the necessary files and starts a we

To run the example file, go to:

+ `http://localhost:9999/integrationExamples/gpt/pbjs_example_gpt.html`
+ `http://localhost:9999/integrationExamples/gpt/pbjs_example_gpt.html`

To view a test coverage report, go to:

Expand All @@ -143,13 +146,15 @@ A watch is also in place that will run continuous tests in the terminal as you e

## Contribute

Many SSPs, bidders, and publishers have contributed to this project. [20+ Bidders](https://github.com/prebid/Prebid.js/tree/master/src/adapters) are supported by Prebid.js.
Many SSPs, bidders, and publishers have contributed to this project. [60+ Bidders](https://github.com/prebid/Prebid.js/tree/master/src/adapters) are supported by Prebid.js.

Our PR review process can be found [here](https://github.com/prebid/Prebid.js/tree/master/pr_review.md).

### Add a Bidder Adapter

To add a bidder adapter, see the instructions in [How to add a bidder adaptor](http://prebid.org/dev-docs/bidder-adaptor.html).

Please **do NOT load Prebid.js inside your adapter**. If you do this, we will reject or remove your adapter as appropriate.
Please **do NOT load Prebid.js inside your adapter**. If you do this, we will reject or remove your adapter as appropriate.

### Code Quality

Expand All @@ -167,13 +172,13 @@ This will run tests and keep the Karma test browser open. If your `prebid.js` fi

+ For test results, see the console

+ To set breakpoints in source code, see the developer tools
+ To set breakpoints in source code, see the developer tools

Detailed code coverage reporting can be generated explicitly with

$ gulp test --coverage

The results will be in
The results will be in

./build/coverage

Expand All @@ -184,3 +189,6 @@ For instructions on writing tests for Prebid.js, see [Testing Prebid.js](http://
### Supported Browsers

Prebid.js is supported on IE9+ and modern browsers.

### Governance
Review our governance model [here](https://github.com/prebid/Prebid.js/tree/master/governance.md).
23 changes: 21 additions & 2 deletions adapters.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,18 @@
"aol",
"appnexus",
"appnexusAst",
"beachfront",
"audienceNetwork",
"conversant",
"districtmDMX",
"fidelity",
"gumgum",
"hiromedia",
"indexExchange",
"innity",
"kruxlink",
"getintent",
"inneractive",
"komoona",
"lifestreet",
"mantis",
Expand Down Expand Up @@ -56,6 +60,7 @@
"vertoz",
"widespace",
"admixer",
"atomx",
"tapsense",
{
"appnexus": {
Expand Down Expand Up @@ -86,6 +91,11 @@
"supportedMediaTypes": ["video"]
}
},
{
"beachfront": {
"supportedMediaTypes": ["video"]
}
},
{
"appnexus": {
"alias": "matomy"
Expand All @@ -101,7 +111,7 @@
"appnexus": {
"alias": "featureforward"
}
},
},
{
"appnexus": {
"alias": "oftmedia"
Expand All @@ -116,6 +126,15 @@
"getintent": {
"supportedMediaTypes" : ["video"]
}
},
{
"stickyadstv": {
"alias": "freewheel-ssp"
}
},
{
"rhythmone": {
"supportedMediaTypes": ["video"]
}
}

]
1 change: 1 addition & 0 deletions analytics.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[]
22 changes: 22 additions & 0 deletions governance.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
### Overview:

This document describes the governance model for the Prebid project. The Prebid project’s stated mission is to facilitate fair, transparent, and effective header bidding across the industry, and is responsible for creating and maintaining such projects as [Prebid.js](https://github.com/prebid/Prebid.js).

1. A single Tech Lead oversees the technical direction of the project and appoints Core Team members
2. The Core Team members maintain the project on an ongoing basis with direction from the Tech Lead.
3. In the event of any disagreements, the Tech Lead will make a final decision.
4. If there is no Tech Lead available to perform his/her duties, AppNexus Inc. will appoint one.

### Roles and Responsibilities:
- **User:** Any individual who consumes / uses the Prebid.js library.
- **Contributor:** Any individual who contributes code that is subsequently merged to the project. Contributed code is governed by the Prebid.js [license](https://github.com/prebid/Prebid.js/blob/master/LICENSE). Contributors are required to sign a CLA before any code can be committed (CLA pending).
- **Core Team Member:** An individual contributor who has been appointed by the Tech Lead on the project to maintain it and further it’s stated goals.
- **Tech Lead:** The Tech Lead is responsible for overall technical direction of the project. The Tech Lead will work closely with Core Team members to facilitate development and further the project goals.

### Current Prebid.js Core Team
- @mkendall07 (Tech Lead)
- @protonate
- @matthewlane
- @jaiminpanchal27
- @snapwich
- @harpere
83 changes: 83 additions & 0 deletions integrationExamples/gpt/audienceNetwork_dfp.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
<html>
<head>
<script src="/build/dev/prebid.js" async></script>
<script>
var PREBID_TIMEOUT = 2000;
var adUnits = [{
code: '/5555555/hb_300x250',
sizes: [[300, 250]],
bids: [{
bidder: 'audienceNetwork',
params: {
placementId: '555555555555555_555555555555555'
}
}]
}];

(function () {
var gads = document.createElement('script');
gads.async = true;
gads.type = 'text/javascript';
var useSSL = 'https:' == document.location.protocol;
gads.src = (useSSL ? 'https:' : 'http:') + '//www.googletagservices.com/tag/js/gpt.js';
var node = document.getElementsByTagName('script')[0];
node.parentNode.insertBefore(gads, node);
})();

var googletag = googletag || {};
googletag.cmd = googletag.cmd || [];
googletag.cmd.push(function() {
googletag.pubads().disableInitialLoad();
});
googletag.cmd.push(function () {
googletag.defineSlot('/5555555/hb_300x250', [[300, 250]], 'div-gpt-ad-5555555555555-0').addService(googletag.pubads());
googletag.pubads().enableSingleRequest();
googletag.enableServices();
});

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

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

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

pbjs.que.push(function() {
pbjs.addAdUnits(adUnits);
pbjs.requestBids({
bidsBackHandler: sendAdserverRequest
});
});
</script>
</head>
<body>
<h2>Prebid.js Test</h2>
<div id='div-gpt-ad-5555555555555-0'>
<script>
googletag.cmd.push(function() {
googletag.display('div-gpt-ad-5555555555555-0');
});
</script>
</div>
<div>
<p>Audience Network quick start</p>
<ol>
<li>Create a new App at <a href="https://developers.facebook.com/apps">https://developers.facebook.com/apps</a></li>
<li>Add the Audience Network product to it</li>
<li>Create a new Placement to generate your placementId</li>
<li>To test, ensure the User-Agent request header represents a mobile device</li>
</ol>
</div>
</body>
</html>
6 changes: 6 additions & 0 deletions integrationExamples/gpt/pbjs_example_gpt.html
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,12 @@
params: {
zone: '2eb6bd58-865c-47ce-af7f-a918108c3fd2' // REQUIRED zone oid
}
},
{
bidder: 'atomx',
params: {
id: 7395
}
}
]
}, {
Expand Down
94 changes: 94 additions & 0 deletions integrationExamples/gpt/pbjs_innity_gpt.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<!-- Prebid Config Section START -->
<!-- Make sure this is inserted before your GPT tag -->
<script>
var PREBID_TIMEOUT = 1000;

var adUnits = [{
code: 'div-gpt-ad-1460505748561-0',
sizes: [[300, 250]],
bids: [{
bidder: 'innity',
params: {
pub: 267,
zone: 62546
}
}
]
}];

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

</script>
<!-- Prebid Config Section END -->

<!-- Prebid Boilerplate Section START. No Need to Edit. -->
<script type="text/javascript" src="../../build/dev/prebid.js" async></script>
<script>
var googletag = googletag || {};
googletag.cmd = googletag.cmd || [];
googletag.cmd.push(function() {
googletag.pubads().disableInitialLoad();
});

pbjs.que.push(function() {
pbjs.addAdUnits(adUnits);
pbjs.requestBids({
bidsBackHandler: sendAdserverRequest
});
});

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();
}, PREBID_TIMEOUT);

</script>
<!-- Prebid Boilerplate Section END -->

<script>
(function () {
var gads = document.createElement('script');
gads.async = true;
gads.type = 'text/javascript';
var useSSL = 'https:' == document.location.protocol;
gads.src = (useSSL ? 'https:' : 'http:') +
'//www.googletagservices.com/tag/js/gpt.js';
var node = document.getElementsByTagName('script')[0];
node.parentNode.insertBefore(gads, node);
})();
</script>

<script>
googletag.cmd.push(function () {
googletag.defineSlot('/19968336/header-bid-tag-0', [[300, 250]], 'div-gpt-ad-1460505748561-0').addService(googletag.pubads());
googletag.pubads().enableSingleRequest();
googletag.enableServices();
});
</script>
</head>

<body>
<h2>Prebid.js Test</h2>
<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>
2 changes: 1 addition & 1 deletion loaders/adapterLoader.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const fs = require('fs');
const blockLoader = require('block-loader');
const getAdapters = require('./getAdapters');

const adapters = getAdapters();
const adapters = getAdapters('adapters.json', 'adapters');
const files = fs.readdirSync('src/adapters').map((file) => file.replace(/\.[^/.]+$/, ''));
const adapterNames = adapters.filter(getStandardAdapters).filter(getUniques);
//adapters loaded from `srcPath`
Expand Down
Loading

0 comments on commit b930704

Please sign in to comment.