KB 00001 Reduced Spent on Publisher using Header Bidding without Supply Chain

Last year, The Trade Desk (TTD) was the first DSP to roll out a new transparency policy to all exchange partners. In this policy, they discontinued the purchase of intermediary sellers who transact via header bidding integrations, unless the sellers declared Schain information in each transaction. We assume reduced spend on publishers without this waiver.

To support Supply Chain few changes are needed:

  1. A PrebidJS version greater or requal to 3.5.0 and 2.44.5
  2. PrebidJS being build with the Supply Chain Object Module and a correctly configured schain configuration
pbjs.setConfig({
  "schain": {
    "validation": "strict",
    "config": {
      "ver":"1.0",
      "complete": 1,
      "nodes": [
        {
          "asi":"indirectseller.com",
          "sid":"00001",
          "hp":1
        }
      ]
    }
  }
});

KB 00002 Integrating yieldPass Prebid along side Amazon Header Bidding

Integrating yieldPass Prebid with Amazon is straightforward and follows Amazon's Method 2: Parallel integration alongside Prebid. The code below contains our Prebid namespace ypyp but has not been adjusted otherwise. Please set your apstag slot configuration as needed. executeParallelAuctionAlongsidePrebid() must also be executed from within your code.

<script>
/** Executes a parallel auction with prebid **/
function executeParallelAuctionAlongsidePrebid() {

    var FAILSAFE_TIMEOUT = 2000;
    var requestManager = {
        adserverRequestSent: false,
        aps: false,
        prebid: false
    };

    // when both APS and Prebid have returned, initiate ad request
    function biddersBack() {
        if (requestManager.aps && requestManager.prebid) {
            sendAdserverRequest();
        } 
        return;
    }

    // sends adserver request
    function sendAdserverRequest() {
        if (requestManager.adserverRequestSent === true) {
            return;
        }
        requestManager.adserverRequestSent = true;
        googletag.cmd.push(function() {
            googletag.pubads().refresh();
        });
    }

    // sends bid request to APS and Prebid
    function requestHeaderBids() {

        // APS request
        apstag.fetchBids({
                slots: [{
                    slotID: 'your-gpt-div-id',
                    slotName: '12345/yourAdUnit',
                    sizes: [[300, 250], [300, 600]]
                }]
            },function(bids) {
                googletag.cmd.push(function() {
                    apstag.setDisplayBids();
                    requestManager.aps = true; // signals that APS request has completed
                    biddersBack(); // checks whether both APS and Prebid have returned
                });
            }
        );

        // put prebid request here
        ypyp.que.push(function() {
            ypyp.requestBids({
                bidsBackHandler: function() {
                    googletag.cmd.push(function() {
                        ypyp.setTargetingForGPTAsync();
                        requestManager.prebid = true; // signals that Prebid request has completed
                        biddersBack(); // checks whether both APS and Prebid have returned
                    })
                }
            });
        });
    }

    // initiate bid request
    requestHeaderBids();

    // set failsafe timeout
    window.setTimeout(function() {
        sendAdserverRequest();
    }, FAILSAFE_TIMEOUT);
};
</script>