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

amp integration #756

Merged
merged 9 commits into from
Nov 1, 2016
Merged

amp integration #756

merged 9 commits into from
Nov 1, 2016

Conversation

protonate
Copy link
Collaborator

Type of change

  • Feature

Description of change

An example of integrating Prebid.js into an AMP page to fill <amp-ad> components with Prebid demand.

@mkendall07 mkendall07 self-assigned this Oct 31, 2016
@mkendall07 mkendall07 added this to the Prebid 0.14.0 milestone Oct 31, 2016
<title>Hello, AMPs</title>
<link rel="canonical" href="http://example.ampproject.org/article-metadata.html" />
<meta name="viewport" content="width=device-width,minimum-scale=1,initial-scale=1">
<meta name="amp-3p-iframe-src" content="https://amp.prebidapp.com:5000/remote.html">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's make the publisher hosted content obvious with a macro or something.

document.write('<script'+' src="'+encodeURI(u)+'"><'+'/script>');
})();
</script>
<script>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's add a <!-- start Prebid.js AMP integration --> comment


setTimeout(function() {
return initAdserver;
}(), PREBID_TIMEOUT);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need this timeout ?



pbjs.que.push(function () {

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: extra line breaks / spacing.

(function () {
var d = document, pbs = d.createElement("script"), pro = d.location.protocal;
pbs.type = "text/javascript";
pbs.src = 'https://localhost:9999/build/dev/prebid.js';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we load this in the head?

loadPrebidJS();
}
window.context.master.adCalls.push(setTargeting.bind(null, config, done));
}, ['doubleclick'], ['prebidapp.com']);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the meaning prebidapp.com here?


pbjs.logging = true;

var adUnits = [
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we clean this up a little bit so all publisher defined variables are declared in one spot and that's the only code that has to change on the page?

@protonate
Copy link
Collaborator Author

@mkendall07 notes addressed

@mkendall07 mkendall07 merged commit eeec25b into master Nov 1, 2016
@protonate protonate deleted the feature/amp-integration branch November 3, 2016 20:39
mp-12301 pushed a commit to aol/Prebid.js that referenced this pull request Apr 10, 2017
…ebid-0.14.0 to release/1.7.0

* commit '3eefcf043466f5457c81bfec18b032b53490b78b': (52 commits)
  New adapters ids.
  Prebid 0.14.0 Release
  add workaround to prevent IX adapter from ending auction earlier due to one request becoming many responses (prebid#763)
  Add pbjs.getHighestCpmBids for getting winning bids (prebid#755)
  Fix build
  Drop Sekindo adapter.
  Bugfix/suppress prebid request if sizeMapping undefined for device width (prebid#758)
  amp integration (prebid#756)
  Add contribution guidelines (prebid#761)
  Add api method to shuffle the order bidders are called in (prebid#760)
  build adapter from custom source path (prebid#753)
  reduce duplication and ignore ga.js in coverage (prebid#754)
  Log /ut response errors in dev console (prebid#747)
  Fix indentation (code style error when building) (prebid#751)
  Add package keywords (prebid#746)
  added new rubiconLite adapter (prebid#740)
  Show warning if bidCpmAdjustment is set for AOL bidder (closes prebid#725) (prebid#728)
  IX adapter code refactoring (prebid#711)
  Update memeglobal.js (prebid#737)
  Pulsepoint Analytics adapter for Prebid (prebid#706)
  ...
mp-12301 pushed a commit to aol/Prebid.js that referenced this pull request Apr 10, 2017
…7.0 to master

* commit '262f371a5c855419c3ef357fb1f0cf87a107749f': (52 commits)
  New adapters ids.
  Prebid 0.14.0 Release
  add workaround to prevent IX adapter from ending auction earlier due to one request becoming many responses (prebid#763)
  Add pbjs.getHighestCpmBids for getting winning bids (prebid#755)
  Fix build
  Drop Sekindo adapter.
  Bugfix/suppress prebid request if sizeMapping undefined for device width (prebid#758)
  amp integration (prebid#756)
  Add contribution guidelines (prebid#761)
  Add api method to shuffle the order bidders are called in (prebid#760)
  build adapter from custom source path (prebid#753)
  reduce duplication and ignore ga.js in coverage (prebid#754)
  Log /ut response errors in dev console (prebid#747)
  Fix indentation (code style error when building) (prebid#751)
  Add package keywords (prebid#746)
  added new rubiconLite adapter (prebid#740)
  Show warning if bidCpmAdjustment is set for AOL bidder (closes prebid#725) (prebid#728)
  IX adapter code refactoring (prebid#711)
  Update memeglobal.js (prebid#737)
  Pulsepoint Analytics adapter for Prebid (prebid#706)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants