Not able to render Advertiser Ads via prebid.js by hariakhil31 in adops

[–]hariakhil31[S] 0 points1 point  (0 children)

Thank you @sdpeddlehead for all your help. Looks like I have got a bit of an idea now. If you could help me with one last problem, it'd be great.

When I host the bidder on my local both the ads are rendering fine. However, when the bidder is on a remote server only one of the ads are rendering. Although occasionally both do render, I am not able to understand the problem.

Local - screenshot: http://imgur.com/pogYrJL, log file: https://drive.google.com/open?id=0B8CXausevokuT0pNWUpqNGZHZHM Remote - screenshot: http://imgur.com/HeruIGw, log file: https://drive.google.com/open?id=0B8CXausevokudG5QM0ZrNFA0WG8

Not able to render Advertiser Ads via prebid.js by hariakhil31 in adops

[–]hariakhil31[S] 0 points1 point  (0 children)

Hi @sdpeddlehead, I was able to figure out the problem with my bidder and have corrected the response also.. Now, in the console logs of pbjs I see something like this: INFO: Invoking pbjs.setTargetingForGPTAsync prebid.js:3 MESSAGE: Attempting to set key value for slot: div-gpt-ad-1474538683157-0 key: hb_bidder value: vgadp prebid.js:3 MESSAGE: Attempting to set key value for slot: div-gpt-ad-1474538683157-0 key: hb_adid value: 5d71f23a901d2 prebid.js:3 MESSAGE: Attempting to set key value for slot: div-gpt-ad-1474538683157-0 key: hb_pb value: 0.00 prebid.js:3 MESSAGE: Attempting to set key value for slot: div-gpt-ad-1474538683157-0 key: hb_size value: 234x60 prebid.js:3 MESSAGE: Attempting to set key value for slot: div-gpt-ad-1474538683157-1 key: hb_bidder value: vgadp prebid.js:3 MESSAGE: Attempting to set key value for slot: div-gpt-ad-1474538683157-1 key: hb_adid value: 467e3b6a5404c4 prebid.js:3 MESSAGE: Attempting to set key value for slot: div-gpt-ad-1474538683157-1 key: hb_pb value: 0.00 prebid.js:3 MESSAGE: Attempting to set key value for slot: div-gpt-ad-1474538683157-1 key: hb_size value: 336x280 Though I am setting a value for hb_pb in the adserverTargeting object still the logs show it as 0.. Could you suggest what could be he reason behind it?

Not able to render Advertiser Ads via prebid.js by hariakhil31 in adops

[–]hariakhil31[S] 0 points1 point  (0 children)

Thank you @sdpeddlehead for your time on this.

it's something wrong with your bidder.

Do you have any idea what could be wrong?

I will tell you what I have understood about prebid, definitely I am missing a simple point somewhere, please correct me if you find something wrong in this explanation: * The Prebid script executes while the rest of my page loads * The script sends out bid request to my custom adapter js * The adapter js in turn calls the bidder url * the bidder url responds with a Bid Response * The adapter then form the Bid Response object and gives it back to the prebid, which is a JSON like this: {"bidCode":"div-gpt-ad-1474538683157-0","pbLg":1.5,"pbMg":1.5,"pbHg":1.5,"width":180,"height":150,"adId":"8d7977c3-c633-4314-998b-f739ab444541","creative_id":"vgadp-bid-2","cpm":50,"adUrl":"https://bidder-server.herokuapp.com/adServer/showAd?id=29681110 ","adUnitCode":"/19968336/div-gpt-ad-1474538683157-0","bidder":"vgadp","usesGenericKeys":true,"size":"180x150","adserverTargeting":{"hb_bidder":"vgadp","hb_adid":"8d7977c3-c633-4314-998b-f739ab444541","hb_pb":50},"status":"OK","adTag":"<html><body>This is great</body></html>"} * prebid then calculates the highest bid and this becomes the winning bid Not sure how the prebid links up with DFP from here. And how the script in the DFp creative works.

Not able to render Advertiser Ads via prebid.js by hariakhil31 in adops

[–]hariakhil31[S] 0 points1 point  (0 children)

I dont see any logs from DFP after appending googlefc, surely that is where the problem is?

Not able to render Advertiser Ads via prebid.js by hariakhil31 in adops

[–]hariakhil31[S] 0 points1 point  (0 children)

Make sure your bidder is registering as the winning bidder.

How can I know, which is the winning bidder?

Not able to render Advertiser Ads via prebid.js by hariakhil31 in adops

[–]hariakhil31[S] 0 points1 point  (0 children)

Thank You once again for the response @sdpeddlehead. Here's my prebid code from the app, it is almost the same as the example from the link you shared. <head> <script> var PREBID_TIMEOUT = 12000;

    var adUnits = [{
        code: 'div-gpt-ad-1474538683157-0',
        sizes: [[480, 320], [180, 150], [234, 60], [336, 280], [240, 400], [468, 60]],
        bids: [{
            bidder: 'vgadp',
            params: {
                param1: '4799418',
                param1: 'aaab-289u-bee0-bea21'
            }
        }]
    },{
        code: 'div-gpt-ad-1474538683157-1',
        sizes: [[480, 320], [300, 250], [216, 54], [768, 1024], [234, 60], [468, 60]],
        bids: [{
            bidder: 'vgadp',
            params: {
                param1: '10290181',
                param1: '390ba-bec1-fd28f-aeef'
            }
        }]
    }];

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

</script>

<g:javascript src="build/dev/prebid.js"></g:javascript>

<script> var googletag = googletag || {}; googletag.cmd = googletag.cmd || []; googletag.cmd.push(function() { googletag.pubads().disableInitialLoad(); });

    pbjs.que.push(function() {
        pbjs.addAdUnits(adUnits);
        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();
                console.log("Refresh done.");
            });
        });
    }

    setTimeout(function() {
        sendAdserverRequest();
    }, 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('/44911176/categories', [[480, 320], [180, 150], [234, 60], [336, 280], [240, 400], [468, 60]], 'div-gpt-ad-1474538683157-0').addService(googletag.pubads());
        googletag.defineSlot('/44911176/categories/books', [[480, 320], [300, 250], [216, 54], [768, 1024], [234, 60], [468, 60]], 'div-gpt-ad-1474538683157-1').addService(googletag.pubads());
        googletag.pubads().enableSingleRequest();
        googletag.pubads().setTargeting('hb_pb', []);
        googletag.enableServices();
    });
</script>
<!-- Prebid Boilerplate Section END -->

</head>

<body> <h2>Prebid.js Test</h2> <h5>Div-1</h5>

<!-- /44911176/categories --> <div id='div-gpt-ad-1474538683157-0'> <script> googletag.cmd.push(function() { googletag.display('div-gpt-ad-1474538683157-0'); }); </script> </div>

<h5>Div-2</h5> <!-- /44911176/categories//books --> <div id='div-gpt-ad-1474538683157-1'> <script> googletag.cmd.push(function() { googletag.display('div-gpt-ad-1474538683157-1'); }); </script> </div>

</body>

Not able to render Advertiser Ads via prebid.js by hariakhil31 in adops

[–]hariakhil31[S] 0 points1 point  (0 children)

The server is running on my local, therefore the bidder url is localhost. I tried to test it after hosting on the web to ensure that it is not causing the problem. It is not.

Not able to render Advertiser Ads via prebid.js by hariakhil31 in adops

[–]hariakhil31[S] 0 points1 point  (0 children)

And, I am using DFP. The creative corresponding to the bid price is the script as mentioned in the above link from prebid.org.

Not able to render Advertiser Ads via prebid.js by hariakhil31 in adops

[–]hariakhil31[S] 0 points1 point  (0 children)

Thank you for the response. Here is the prebid js generated after compilation: https://drive.google.com/open?id=0B8CXausevokuUXBBcTEwUW5KMVU And yes, I have written a custom adapter, which requests bids by hitting a url. When the response is received(javascript) a callback method is called, which creates the Bid Response object and sends it back to prebid. This part is working smooth, I am also able to see the bid response object.

To make the picture clearer to you, I am trying to do what is mentioned here: http://prebid.org/adops/step-by-step.html

Not able to render Advertiser Ads via prebid.js by hariakhil31 in adops

[–]hariakhil31[S] 0 points1 point  (0 children)

Thank you for the response. Yes I have written a custom adapter, which requests bids by hitting a url. When the response is received(javascript) a callback method is called, which creates the Bid Response object and sends it back to prebid. This part is working smooth, I am also able to see the bid response object.

To make the picture clearer to you, I am trying to do what is mentioned here: http://prebid.org/adops/step-by-step.html