Skip to content

Commit

Permalink
Revcontent Bid Adapter: adjusted for Price Floors Module (prebid#7093)
Browse files Browse the repository at this point in the history
* Original adapter

* REVC-3691 | Prebid.js support for price floors module (#1)

* REVC-3691 | Prebid.js support for price floors module | Call getFloor function; test-case is added

* REVC-3691 | 1 - Snippet with multi-items (#2)

* REVC-3691 | Prebid.js support for price floors module | Snippet for multi-item

* REVC-3691 | Prebid.js support for price floors module | Muti-item + fixed test-cases (#3)

* REVC-3691 | Prebid.js support for price floors module | Fixed demo pages

* REVC-3691 | Prebid.js support for price floors module | Added demo with multi-items

* manually kick off circleci tests

Co-authored-by: Chris Huie <phoenixtechnerd@gmail.com>
  • Loading branch information
alexander-alexandrov and ChrisHuie authored Jul 6, 2021
1 parent 26aa81b commit 568a90d
Show file tree
Hide file tree
Showing 4 changed files with 790 additions and 7 deletions.
116 changes: 116 additions & 0 deletions integrationExamples/gpt/revcontent_example_banner.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Prebid.js Banner Example</title>
<!-- Prebid.js -->
<!-- <script async src="prebid.js"></script> -->
<!-- <script async src="../../build/dist/prebid.js"></script> -->
<script async src="../../build/dev/prebid.js"></script>
<!-- Google Publisher Tag -->
<script async src="https://www.googletagservices.com/tag/js/gpt.js"></script>
<script>
var pbjs = pbjs || {};
pbjs.que = pbjs.que || [];
const customConfigObject = {
"buckets": [{
"max": 40,
"increment": 0.5
}]
};
// Prebid Banner Ad Unit
const adUnits = [{
code: '/21623266709/prebid-test',
mediaTypes: {
banner: {
sizes: [[300, 250]],
}
},
bids: [{
bidder: 'revcontent',
params: {
// Your user-id and api-key
apiKey: 'abababababababababababababababababababab',
userId: 111111,
domain: 'www.denverpost.com',
endpoint: 'trends.revcontent.com',
bidfloor: 0.05,
}
}]
},{
code: '/21623266709/prebid-test-2',
mediaTypes: {
banner: {
sizes: [[300, 250]],
}
},
bids: [{
bidder: 'revcontent',
params: {
// Your user-id and api-key
apiKey: 'abababababababababababababababababababab',
userId: 111111,
domain: 'www.denverpost.com',
endpoint: 'trends.revcontent.com',
bidfloor: 0.05,
}
}]
}
];
</script>
<script>
var googletag = googletag || {};
googletag.cmd = googletag.cmd || [];
googletag.cmd.push(function () {
googletag.pubads().disableInitialLoad();
});
pbjs.que.push(function () {
pbjs.setConfig({
enableSendAllBids: false,
priceGranularity: customConfigObject
});
pbjs.addAdUnits(adUnits);
pbjs.requestBids({ bidsBackHandler: sendAdServerRequest });
});
function sendAdServerRequest() {
googletag.cmd.push(function () {
pbjs.que.push(function () {
pbjs.setTargetingForGPTAsync('/21623266709/prebid-test');
pbjs.setTargetingForGPTAsync('/21623266709/prebid-test-2');
googletag.pubads().refresh();
});
});
}
</script>
<script>
googletag.cmd.push(function () {
googletag
.defineSlot('/21623266709/prebid-test', [[300, 250]], 'div-0')
.addService(googletag.pubads());
googletag
.defineSlot('/21623266709/prebid-test-2', [[300, 250]], 'div-1')
.addService(googletag.pubads());
googletag.pubads().enableSingleRequest();
googletag.enableServices();
});
</script>
</head>
<body>
<h2>Prebid.js Banner Example</h2>
<div id='div-0'>
<script>
googletag.cmd.push(function () {
googletag.display('div-0');
});
</script>
</div>
<br>
<div id='div-1'>
<script>
googletag.cmd.push(function () {
googletag.display('div-1');
});
</script>
</div>
<div id="targeting-keys"></div>
</body>
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<html>

<head>
<link rel="icon" type="image/png" href="/favicon.png">
<script async src="//www.googletagservices.com/tag/js/gpt.js"></script>
<title>Prebid.js Native Example</title>

<script async src="../../build/dev/prebid.js"></script>
<script async src="//www.googletagservices.com/tag/js/gpt.js"></script>
<script>
/*
Supported sizes:
Expand Down Expand Up @@ -42,8 +42,9 @@
bidder: 'revcontent',
params: {
size: size,
apiKey: '8a33fa9cf220ae685dcc3544f847cdda858d3b1c',
userId: 673,
// Your user-id and api-key
apiKey: 'abababababababababababababababababababab',
userId: 111111,
domain: 'test.com',
endpoint: 'trends.revcontent.com'
}
Expand Down Expand Up @@ -94,14 +95,13 @@
</head>

<body>
<h2>Basic Prebid.js Example</h2>
<h2>Prebid.js Native Example</h2>
<h5>Div-1</h5>
<div id='div-1'>
<script type='text/javascript'>
googletag.cmd.push(function() {
googletag.display('div-1');
});

</script>
</div>
</body>
Expand Down
Loading

0 comments on commit 568a90d

Please sign in to comment.