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.

Leave a comment