and to be requested in their // single Page Load request they make. // // Prebidding Ads, is the ability to allow bidders at the Prebid.js auction to bid on rendering in a slot on the page. This results // in more ad revenue than a standard google ad. For this to work all ads must be defined and then sent to Prebid.js to auction // them, then returned winner information appended to the ad before Google renders it. // // Given this, the general order of operations for ads is: // 1. Define all ads that would appear on first page load for the page // 2. Define bidders for the ads that will appear on first page load too // 3. Make sure Google is setup to render all first page load ads in a single request // 4. Send the ad info to auction with an async callback when completed // 5. Additionally set a max timeout before we quit waiting for action to complete // 6. Apply prebid callback data to ads and call "display" before the page finishes loaded // 7. Google takes all ad data and returns ads, supporting potentially both Roadblocks and Prebid // 8. Disable single page load request for Google ads // 9. All remaining and dynamic ads created at any point then individually make calls to render without Auction debug("START"); window.DFP_networkId = "11222444"; window.DFP_sitepage = "DMN/news/politics"; window.DFP_adTargets = {}; window.DFP_adTargetsParam = " "; window.adSlots = {}; window.bidSlots = []; // Prebid.js bid slots window.amzSlots = []; // Amazon prebid bid slots window.PREBID_TIMEOUT = 2000; window.useMobileAds = window.innerWidth / (window.devicePixelRatio ? window.devicePixelRatio : 1) < 992 ? true : false; window.AMAZON_PUB_ID = "592c72a8-a9c3-44d2-ae9e-42bc09831712"; window.ROXOT_PUBLISHER_ID = "f4300502-9fc2-416b-8fec-1cd6894679a9"; window.DFP_adTargets.beta = "true"; window.DFP_adTargets.dnLoggedIn = "false"; window.DFP_adTargets.isPremiumSubscriber = "false"; window.DFP_adTargetsParam = "beta%3Dtrue%26dnLoggedIn%3Dfalse%26isPremiumSubscriber%3Dfalse"; // GOOGLE DFP SETUP // Create Google Tag queue to process pushed functions asynchronously var googletag = googletag || {}; googletag.cmd = googletag.cmd || []; var prebidCompleted = false; var amazonCompleted = false; function prebidComplete() { debug("PREBID COMPLETE"); prebidCompleted = true; attemptInitAdServer(); } function amazonComplete() { debug("AMAZON COMPLETE"); amazonCompleted = true; attemptInitAdServer(); } function attemptInitAdServer() { debug("ATTEMPT INIT AD SERVER"); if (prebidCompleted && amazonCompleted) { initAdserver(); } } // Define the function that will load the Google Publisher Tag library (used by DFP) asynchronously function initAdserver() { // Skip reloading ad server if we already did with prebid (since this is called in a timeout) if(window.DallasNews.settings.ADS_HEADER_BIDDING){ if (pbjs.initAdserverSet) return; } debug("INIT AD SERVER"); // Build the GPT library

Politics

More in Politics
More in Letters to the Editor