When Header Bidding Should Start In A Page View

Header bidding is a technique developed to improve the performance of RTB. Header bidding takes the RTB process one step further by allowing an ad impression to be put up for auction across multiple demand sources at the same time, instead of running the auction through each demand source one at a time (a process referred to as “waterfalling”).

The above definition states putting an ad impression up for auction across multiple demand sources at the same time, but does not say when to do it in a page view. Actually, it can start anytime in a page view. The general guideline is that it should provide as much information to the demand sources as possible while minimizes interfering with user experience.

Often times, the header bidding process starts as soon as the page loads within the user’s browser. This way, the header bidding process competes with page content loading, which may result in longer waiting time for a user to see page content. The other issue is that the page content is not available yet for demand sources, which is critical to the Content-Driven Advertising.

Another option is start the bidding process in a DOMContentLoaded event handler. There are a few advantages by doing this. First, it doesn’t compete with page content loading. Second, by waiting for DOMContentLoaded and then starting the bidding process, the page content is available to the demand sources to make better decisions.

The blog Programming Adrelevantis Bidder Adapter gives an example for starting bidding process in a DOMContentLoaded event handler.

Please contact us for more information at info@adrelevantis.com.

Programming Adrelevantis Bidder Adapter

Programming Adrelevantis Bidder Adapter is the same as other Prebid.js Bidder Adapters. The only difference is when the bidding process should start. Normally, header bidding begins as soon as the page loads within the user’s browser. For Adrelevantis Bidder Adapter, the bidding starts in the event handler of DOMContentLoaded event. The reason is that Adrelevantis Bidder Adapter needs to access to the page content to match ads based on the content.

document.addEventListener("DOMContentLoaded", function(event){ adrtags(adUnits, adDivIds); });

The above code is excerpted from programming examples at Ads relevant to content with Adrelevantis bidder adapter in GitHub.

There are a few implications. By putting adrtags function in DOMContentLoaded event handler, it can extract and parse the page content, then, search ads based on the content, and display ads. By starting bid until the document has been loaded, it also alleviates the concerns that the bidding process competes with page content loading. The user gets more responsive page loading experience.

Please go to GitHub open source for complete examples at https://github.com/ghguo/adrhbexamples.

Please contact us for more information at info@adrelevantis.com.