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

HB-2217 Allow size overrides per bid #17

Closed
wants to merge 21 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
a96a2ca
Updated adapterManager to allow size overrides per bid
Mar 3, 2018
aefa1ad
Updated adapterManager to allow size overrides per bid
Mar 3, 2018
bea0305
Updated bugfix for last commit
Mar 3, 2018
190fb4f
Refactored bid size mapping logic to the sizeMapping module
Mar 5, 2018
9c1906f
Refactored bid size mapping test into separate tests
Mar 5, 2018
a88dd61
Added argument to resolveBidOverrideSizes for s2sConfig to avoid test…
idettman Mar 6, 2018
a3cdafd
Linting fixes
idettman Mar 6, 2018
f8fd3b6
Bug fix for resolveStatus to handle sizes defined as plain Objects as…
Mar 19, 2018
77d0e06
fixing getintent to use utils.isInteger to fix browserstack tests
snapwich Apr 30, 2018
d28c4a8
[1.x] Populate crid with values from demand if present (#2424)
aprakash-sovrn May 1, 2018
a0fee37
PulsePoint Adapter GDPR support (#2471)
anand-venkatraman May 1, 2018
027abc7
getting publisher url fix (#2472)
sekindo May 1, 2018
4a149cf
OpenX Adapter: Support out of order bids. (#2452)
jimee02 May 1, 2018
247ea80
GDPR consentManagement module (#2213)
jsnellbaker May 1, 2018
4dcb046
added whitelist for loading external JS + tests (#2430)
mkendall07 May 1, 2018
64f342a
Add note about headerbid expert (#2367)
matthewlane May 1, 2018
a4913ea
Prebid 1.9.0 Release
jsnellbaker May 1, 2018
ab0386d
Increment Prebid version
jsnellbaker May 1, 2018
9416e75
GDPR support for Sovrn Adapter (#2475)
May 1, 2018
0654474
send rp_secure to frank for video bids (#2476)
moonshells May 1, 2018
470abe2
Merge branch 'master' of https://github.com/prebid/Prebid.js into HB-…
May 2, 2018
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
1 change: 1 addition & 0 deletions PR_REVIEW.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ For modules and core platform updates, the initial reviewer should request an ad
- Adapters may not use the $$PREBID_GLOBAL$$ variable
- All adapters must support the creation of multiple concurrent instances. This means, for example, that adapters cannot rely on mutable global variables.
- Adapters may not globally override or default the standard ad server targeting values: hb_adid, hb_bidder, hb_pb, hb_deal, or hb_size, hb_source, hb_format.
- After a new adapter is approved, let the submitter know they may open a PR in the [headerbid-expert repository](https://github.com/prebid/headerbid-expert) to have their adapter recognized by the [Headerbid Expert extension](https://chrome.google.com/webstore/detail/headerbid-expert/cgfkddgbnfplidghapbbnngaogeldmop). The PR should be to the [bidder patterns file](https://github.com/prebid/headerbid-expert/blob/master/bidderPatterns.js), adding an entry with their adapter's name and the url the adapter uses to send and receive bid responses.

## Ticket Coordinator

Expand Down
103 changes: 103 additions & 0 deletions integrationExamples/gpt/gdpr_hello_world.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
<html>
<head>
<script>window.__cmp = {config: {logging: 'debug'}}</script>
<script src="//acdn.adnxs.com/cmp/cmp.complete.bundle.js" async></script>

<script>
var PREBID_TIMEOUT = 700;

var adUnits = [{
code: 'div-gpt-ad-1460505748561-0',
sizes: [[300, 250], [300,600]],

// Replace this object to test a new Adapter!
bids: [{
bidder: 'appnexusAst',
params: {
placementId: '10433394'
}
}]

}];

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

</script>

<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.setConfig({
consentManagement: {
cmpApi: 'iab',
timeout: 5000,
allowAuctionWithoutConsent: true
},
pubcid: {
enable: false
}
});
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();
// console.log('timeout in main pbjs fired');
// }, PREBID_TIMEOUT);

</script>

<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], [300, 600]], '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>
7 changes: 6 additions & 1 deletion modules/adformBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export const spec = {
isBidRequestValid: function (bid) {
return !!(bid.params.mid);
},
buildRequests: function (validBidRequests) {
buildRequests: function (validBidRequests, bidderRequest) {
var i, l, j, k, bid, _key, _value, reqParams, netRevenue;
var request = [];
var globalParams = [ [ 'adxDomain', 'adx.adform.net' ], [ 'fd', 1 ], [ 'url', null ], [ 'tid', null ] ];
Expand Down Expand Up @@ -38,6 +38,11 @@ export const spec = {
request.push('pt=' + netRevenue);
request.push('stid=' + validBidRequests[0].auctionId);

if (bidderRequest && bidderRequest.gdprConsent) {
request.push('gdpr=' + bidderRequest.gdprConsent.gdprApplies);
request.push('gdpr_consent=' + bidderRequest.gdprConsent.consentString);
}

for (i = 1, l = globalParams.length; i < l; i++) {
_key = globalParams[i][0];
_value = globalParams[i][1];
Expand Down
Loading