Edit in JSFiddle

<script type="text/javascript" src="//acdn.adnxs.com/prebid/not-for-prod/prebid.js" async></script>
<div id="container">Bid Response</div>
<script>
    var pbjs = pbjs || {};
    pbjs.que = pbjs.que || [];

    pbjs.que.push(function() {
        var adUnits = [{
            code: 'div-gpt-ad-1438287399331-0',
            sizes: [[300, 250], [300, 600]],
            bids: [{
                bidder: 'appnexus',
                params: { placementId: '4799418' }
            }
            // Add other bidders here
            ]
        }];
        pbjs.addAdUnits(adUnits);
        pbjs.requestBids({
            // This callback gets triggered when all bids for this
            // ad unit come back. 
            bidsBackHandler: function(bidResponses) {
                var targetingParams = pbjs.getAdserverTargeting();
                var container = document.getElementById('container');
                container.innerHTML = JSON.stringify(targetingParams);
            }
        });
    });
</script>