-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Minor Issue - DFP prebid line items not delivering - Used Custom Price Bucket Example code #282
Comments
The key is |
Actually not sure about that, reopening. |
Actually......i had to make a bunch of changes, from your example:
pbjs.bidderSettings Overall, you have a great solution here for us......but i think you example codes are a bit misleading due to lack of updates, they require a bunch of tweaking to make them work. The above changes seem to work, now i have some few impressions delivering on my prebid line items in DFP That said, thanks for your response.....i may have few questions later on but so far i am a good.....monitoring this thing for a day or two |
Glad to hear it. We will be updating the example files with our next release. The latest version of prebid.js is available at acdn.adnxs.com/prebid/prebid.js and specific versions are at acdn.adnxs.com/prebid/static//prebid.js. Closing, just open a new issue with anything further. |
Hi Prebid Team,
I have implemented your custom price bucket example found on this page - http://prebid.org/dev-docs/examples/custom-price-bucket.html
of course i had to change to my dfp code and add the bidder (RTB platform and params) i want to work with.......BUT i can't seem to get my prebid line items delivering in DFP.
Confusion #1.....your code example is using key "custom_bid_price", i have tried to use that in DFP....that did not work, i have also tried to use "hp_pb" (this is what is used in your video guide for adops) that also is not working.
Other ads (default adsense in dfp and other demand sources in dfp) are rendering fine....but i think there is an issue with the prebid key i am supposed to be using in dfp or your code example
Any assistance will be appreciated, but here is my full header and body code (only using sovrn right now in prebid code, nothing else) - see link here in case github is not showing my code - https://docs.google.com/document/d/1iuTNMREkrv7EWxGlU4DM2EPeVFLF2ewRODYX_woQgxY/edit?usp=sharing :
<script> var PREBID_TIMEOUT = 1000; var googletag = googletag || {}; 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 = "//acdn.adnxs.com/prebid/static/0.6.0/prebid.js"; var pbjsTargetEl = document.getElementsByTagName("head")[0]; pbjsTargetEl.insertBefore(pbjsEl, pbjsTargetEl.firstChild); })(); pbjs.que.push(function() { var adUnits = [{ code: 'div-gpt-ad-1459211248906-0', sizes: [300, 250], bids: [{ bidder: 'sovrn', params: { tagid: '340466' } }] },{ code: 'div-gpt-ad-1459211248906-1', sizes: [300, 250], bids: [{ bidder: 'sovrn', params: { tagid: '313817' } }] },{ code: 'div-gpt-ad-1459211248906-2', sizes: [300, 250], bids: [{ bidder: 'sovrn', params: { tagid: '340465' } }] },{ code: 'div-gpt-ad-1459211248906-3', sizes: [728, 90], bids: [{ bidder: 'sovrn', params: { tagid: '340467' } }] }]; pbjs.addAdUnits(adUnits); pbjs.bidderSettings = { standard: { adserverTargeting: [{ key: "hb_bidder", val: function(bidResponse) { return bidResponse.bidderCode; } }, { key: "hb_adid", val: function(bidResponse) { return bidResponse.adId; } }, { key: "custom_bid_price", val: function(bidResponse) { var cpm = bidResponse.cpm; if (cpm < 3.00) { return (Math.floor(cpm * 100) / 100).toFixed(2); } else if (cpm < 5.00) { return (Math.floor(cpm * 10) / 10).toFixed(2); } else if (cpm < 20.00) { return (Math.floor(cpm * 2) / 2).toFixed(2); } else { return '20.00'; } } }] } }; pbjs.requestBids({ bidsBackHandler: function(bidResponses) { initAdserver(); } }) }); </script> <script> googletag.cmd.push(function() { var rightSlot1 = googletag.defineSlot('/25196256/dab300x250ATF', [300, 250], 'div-gpt-ad-1459211248906-0').addService(googletag.pubads()); var rightSlot2 = googletag.defineSlot('/25196256/DigitalAdBlog_300x250_BTF', [300, 250], 'div-gpt-ad-1459211248906-1').addService(googletag.pubads()); var rightSlot3 = googletag.defineSlot('/25196256/DigitalAdBlog_300x250_Middle', [300, 250], 'div-gpt-ad-1459211248906-2').addService(googletag.pubads()); var topSlot = googletag.defineSlot('/25196256/DigitalAdBlog_728x90_Header', [728, 90], 'div-gpt-ad-1459211248906-3').addService(googletag.pubads()); pbjs.que.push(function() { pbjs.setTargetingForGPTAsync(); var targetingParams = pbjs.getAdserverTargeting(); var container = document.getElementById('container'); container.innerHTML = JSON.stringify(targetingParams); }); googletag.pubads().enableSingleRequest(); googletag.enableServices(); }); </script>The text was updated successfully, but these errors were encountered: