forked from prebid/Prebid.js
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of https://github.com/prebid/Prebid.js
* 'master' of https://github.com/prebid/Prebid.js: (51 commits) Update maintainer email (prebid#2132) Replace event string with constant (prebid#2128) Add adapter for IAS (prebid#2056) Fix sovrn dealid (prebid#2119) Added support for NURL and ADM as backup (prebid#2112) fix bug where hooked functions w/ no hooks weren't ran immediately (prebid#2115) Increment pre version Prebid 1.3.1 Release Omit app and device if not present rather than send false (prebid#2116) Increment pre version Prebid.js 1.3.0 Release Unit test fixes (prebid#2111) must explicitly list pre1api for it to be included in build (prebid#2097) adkernel adapter additional bid parameters (prebid#2105) removing userSync (prebid#2032) 33across Bid Adapter: Bugfix + Refactor (prebid#2024) Port calling order fix to 1.x (prebid#2067) Update adform adapter request (prebid#2107) Serverbid Bid Adapter: getUserSyncs and new adsizes (prebid#2106) Add hfa and pv parameter to request payload (prebid#2109) ...
- Loading branch information
Showing
77 changed files
with
5,073 additions
and
519 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,103 @@ | ||
<html> | ||
<head> | ||
<script> | ||
var PREBID_TIMEOUT = 3000; | ||
|
||
var googletag = googletag || {}; | ||
var sizes = [[728, 90],[300, 250], [300,600]]; | ||
googletag.cmd = googletag.cmd || []; | ||
|
||
function initAdserver() { | ||
if (pbjs.initAdserverSet) return; | ||
(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); | ||
})(); | ||
pbjs.initAdserverSet = true; | ||
}; | ||
setTimeout(initAdserver, PREBID_TIMEOUT); | ||
|
||
var pbjs = pbjs || {}; | ||
pbjs.que = pbjs.que || []; | ||
(function() { | ||
var pbjsEl = document.createElement("script"); | ||
pbjsEl.type = "text/javascript"; | ||
pbjsEl.async = true; | ||
pbjsEl.src = '/build/dev/prebid.js'; | ||
var pbjsTargetEl = document.getElementsByTagName("head")[0]; | ||
pbjsTargetEl.insertBefore(pbjsEl, pbjsTargetEl.firstChild); | ||
})(); | ||
|
||
pbjs.que.push(function() { | ||
var adUnits = [{ | ||
code: 'div-gpt-ad-1460505748561-0', | ||
sizes: [[300, 250], [300,600]], | ||
bids: [ | ||
{ | ||
bidder: 'appnexus', | ||
params: { | ||
placementId: '12224129' | ||
} | ||
}, | ||
] | ||
}]; | ||
|
||
pbjs.setConfig({ | ||
bidderTimeout: 3000, | ||
s2sConfig : { | ||
enabled : true, | ||
bidders : ['appnexus'], | ||
timeout : 1000, | ||
networkId: '9969', | ||
siteId: '985041', | ||
adapter: 'serverbidServer', | ||
//The accountId and endpoint are required by Prebid for validation | ||
//but are not used by ServerBid. They can either be filled in with | ||
//nonsense values, or left out entirely. If left out you will see | ||
//errors in the browser console, but nothing will actually be wrong. | ||
accountId: 9000, | ||
endpoint: "unused" | ||
} | ||
}); | ||
|
||
pbjs.addAdUnits(adUnits); | ||
|
||
pbjs.requestBids({ | ||
bidsBackHandler: function(bidResponses) { | ||
initAdserver(); | ||
} | ||
}) | ||
}); | ||
</script> | ||
|
||
<script> | ||
googletag.cmd.push(function() { | ||
var rightSlot = googletag.defineSlot('/19968336/header-bid-tag-0', [[300, 250], [300, 600]], 'div-gpt-ad-1460505748561-0').addService(googletag.pubads()); | ||
|
||
pbjs.que.push(function() { | ||
pbjs.setTargetingForGPTAsync(); | ||
}); | ||
|
||
googletag.pubads().enableSingleRequest(); | ||
googletag.enableServices(); | ||
}); | ||
</script> | ||
</head> | ||
|
||
<body> | ||
<h2>Prebid.js S2S Example</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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.