Implementing Multi-Format Ads in Prebid.js: A Publisher’s Guide
As digital inventory becomes more fragmented, publishers are challenged to maximize revenue while managing a mix of banner, native, and video demand. Running single-format ad units limits competition and often leaves money on the table.
Multi-format ad units in Prebid.js offer a straightforward path to unifying these formats in a single auction. By understanding their setup and operational nuances, ad ops teams can tap into the full value of programmatic demand—without creating unnecessary ad unit complexity.
What Are Multi-Format Ad Units in Prebid.js?
Multi-format ad units support two or more creative types within a single ad slot—banner, native, and video. When properly configured, these units let any eligible bidder compete, provided they have demand for at least one of the unit’s media types. The result: increased competition, higher fill rates, and greater yield per impression.
How Prebid.js Enables Format Competition
Using the ‘mediaTypes’ configuration, a unit can declare support for multiple ad formats. This lets the auction engine allow banner, native, and outstream/in-stream video bids to compete directly. The highest-value bid, regardless of format, wins.
The Role of Targeting Keys
Prebid.js sets a key, such as ‘hb_format’, in the ad server targeting to indicate which format won the auction. This is essential for creative selection and troubleshooting within ad servers like Google Ad Manager (GAM).
Implementing Multi-Format Ad Units: A Technical Walkthrough
Setting up multi-format ad units requires careful configuration but follows a clear pattern in Prebid.js. A solid implementation means fewer troubleshooting headaches and maximum yield from each slot.
Step-by-Step Example
Suppose you want to let banners, outstream video, and native ads compete on a mobile leaderboard. You would define an ad unit in Prebid.js using the ‘mediaTypes’ field with properties for each supported format—such as size arrays for banners and configuration details for video (context, playerSize, mimes). You then specify eligible bidders for each format inside the ‘bids’ array.
Integrating with the Page and Ad Server
Once defined, place the corresponding div tag in your page markup. Prebid.js will populate this slot with the winning creative, and the ad server (GAM, for example) will use the targeting key to determine which creative to serve. Review ad server setup guides to ensure you’re making the most of format-specific targeting and reporting.
Prerequisites and Common Pitfalls
Multi-format setups aren’t just plug-and-play; careful bidder selection and testing are critical for success.
Verifying Bidder Support
Before enabling multi-format units, ensure your bidders actually support the formats you want—native and video demand is not universal. Review each partner’s documentation or use Prebid’s bidder directory to verify compatibility.
Creative Mismatches and Troubleshooting
A frequent problem: ad server expects a banner, but a video wins the auction. To avoid serving blank ads, refine creative assignments in your ad server based on the ‘hb_format’ value and rigorously QA all supported frictions.
What this means for publishers
Adopting multi-format ad units can significantly enhance auction pressure, potentially leading to better CPMs and monetization flexibility. However, it introduces more complexity in ad ops workflows, particularly around creative setup and troubleshooting mismatches. Publishers must pay close attention to bidder capabilities and keep ad server targeting logic tightly aligned with format outcomes.
Practical takeaway
Multi-format units in Prebid.js are a powerful way to increase yield without fragmenting your page with separate ad placements. Start with a careful audit of your existing demand partners and inventory types—ensure you’re only enabling formats with real bidder support. Then, map your ad server targeting rules to the ‘hb_format’ key so the correct creative always displays.
Regularly monitor your analytics to catch format misfires or low fill scenarios early. By maximizing competition for each impression and keeping your implementation clean, you give every ad slot on your site the best shot at delivering top-tier results.