JSFiddle - React, Tailwind, and code Playground

by Karmik Patel

HTML

<html>
<head>
  <!-- Prebid Config Section START -->
  <!-- Make sure this is inserted before your GPT tag -->
  <script> 
    var PREBID_TIMEOUT = 2000;

    var adUnits = [{
        code: 'div-gpt-ad-1460505748561-0',
        sizes: [[300, 250]],
        bids: [{
            bidder: 'pulsepoint',
            params: {
               cf: '300X250',  //String adSize identifier 
               cp: 560189,     //Number Publisher Id
               ct: 465377      //Number  Ad Tag Id
            }
        }]
    },{
        code: 'div-gpt-ad-1460505661639-0',
        sizes: [[728, 90], [970, 90]],
        bids: [{
            bidder: 'appnexus',
            params: {
               placementId: '4799418'
            }
        }]
    }];

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

    pbjs.que.push(function() {
        pbjs.enableSendAllBids();
    });

  </script>
  <!-- Prebid Config Section END -->
  
  <!-- Prebid Boilerplate Section START. No Need to Edit. -->
  <script type="text/javascript" src="//acdn.adnxs.com/prebid/not-for-prod/prebid.js" async></script>
  <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();

                var targetingParams = pbjs.getAdserverTargeting();
                var container = document.getElementById('container');
                container.innerHTML = JSON.stringify(targetingParams, null, 2);
            });
        });
    }

   ...