What is Prebid Header Bidding?
Prebid header bidding is an open-source technology that enables publishers to offer their ad inventory to multiple demand sources simultaneously before making calls to their ad server. Unlike traditional waterfall setups where demand sources bid sequentially, Prebid allows real-time competition among advertisers, typically resulting in 20-40% revenue increases for publishers.

Developed by AppNexus (now Xandr) in 2015 and released as an open-source project, Prebid has become the industry standard for header bidding implementation. The technology works by placing JavaScript code in the header of web pages, allowing multiple ad exchanges and demand-side platforms (DSPs) to bid on inventory before the primary ad server makes its decision.
How Prebid Header Bidding Works
The Technical Process
The Prebid header bidding process follows a precise sequence:
- Page Load Initiation: When a user visits a webpage, the Prebid.js library loads in the page header
- Bid Request Distribution: Prebid simultaneously sends bid requests to all configured demand partners
- Real-Time Bidding: Each demand source evaluates the request and submits their bid within the timeout period (typically 1000-2000ms)
- Bid Collection and Ranking: Prebid collects all bids and ranks them by price
- Ad Server Integration: The highest bids are passed to the primary ad server (Google Ad Manager, etc.) as key-value pairs
- Final Auction: The ad server conducts its own auction, comparing Prebid bids against direct campaigns
- Ad Rendering: The winning creative is selected and rendered on the page
Key Components
Prebid header bidding relies on several critical components:
Prebid.js: The core JavaScript library that manages the entire bidding process Bid Adapters: Specialized modules that facilitate communication with specific demand partners Price Granularity: Configuration settings that determine how bid prices are bucketed and passed to the ad server Timeout Management: Controls how long Prebid waits for bid responses before proceeding
Benefits of Implementing Prebid Header Bidding
Revenue Optimization
Publishers implementing Prebid typically see significant revenue improvements:
- Increased Fill Rates: Multiple demand sources competing simultaneously reduces unfilled inventory
- Higher CPMs: Real-time competition drives up bid prices as advertisers compete for premium inventory
- Better Yield: Publishers can capture the true market value of their inventory rather than accepting the first acceptable bid
Operational Advantages
Transparency: Publishers gain complete visibility into bid data, including win rates, average CPMs, and partner performance Control: Full control over timeout settings, price granularity, and demand partner configurations Flexibility: Easy addition or removal of demand partners without complex technical integrations
Market Access
Prebid opens access to a broader ecosystem of demand sources, including:
- Premium exchanges previously unavailable through traditional waterfall setups
- Specialized demand sources for specific content verticals
- International demand partners for global inventory monetization
Implementation Guide for Publishers
Step 1: Technical Prerequisites
Before implementing Prebid, ensure your technical infrastructure supports:
- Modern web standards and HTTPS
- Google Ad Manager or compatible ad server
- Development resources for initial setup and ongoing optimization
- Performance monitoring tools to track page load impact
Step 2: Prebid.js Configuration
Create a custom Prebid.js build including only required bid adapters:
var pbjs = pbjs || {};
pbjs.que = pbjs.que || [];
pbjs.que.push(function() {
var adUnits = [{
code: 'header-banner',
mediaTypes: {
banner: {
sizes: [[728, 90], [320, 50]]
}
},
bids: [{
bidder: 'appnexus',
params: {
placementId: 13144370
}
}, {
bidder: 'rubicon',
params: {
accountId: 14062,
siteId: 70608,
zoneId: 335918
}
}]
}];
pbjs.addAdUnits(adUnits);
pbjs.requestBids({
timeout: 2000,
bidsBackHandler: sendAdserverRequest
});
});
Step 3: Ad Server Integration
Configure your ad server to recognize Prebid key-value pairs and create corresponding line items. For Google Ad Manager:
- Create custom targeting keys for each bid adapter
- Set up line items with appropriate targeting and pricing
- Configure creative templates to render winning ads
- Implement proper key-value passing from Prebid to GAM
Step 4: Video Integration
For publishers implementing video advertising, Prebid supports VAST-compliant video ads across multiple players. When working with video player solutions like Veedmo, ensure proper integration between the player’s ad serving capabilities and Prebid’s video bid responses to maximize video ad revenue.
Optimization Strategies
Timeout Optimization
Balancing revenue and user experience requires careful timeout tuning:
- Start Conservative: Begin with 1500-2000ms timeouts
- Monitor Performance: Track page load impact and user engagement metrics
- Gradual Adjustment: Reduce timeouts in 100ms increments while monitoring revenue impact
- Device-Specific Settings: Consider different timeouts for mobile vs. desktop traffic
Price Granularity Configuration
Optimize price granularity to maximize bid competition:
pbjs.setConfig({
priceGranularity: {
"buckets": [{
"precision": 2,
"min": 0,
"max": 5,
"increment": 0.01
}, {
"precision": 2,
"min": 5,
"max": 10,
"increment": 0.05
}, {
"precision": 2,
"min": 10,
"max": 50,
"increment": 0.10
}]
}
});
Demand Partner Management
Performance Monitoring: Regularly assess each partner’s:
- Bid rate and win rate
- Average CPM contribution
- Latency impact
- Fill rate by ad unit
Portfolio Optimization: Maintain an optimal mix of:
- Premium exchanges for high-value inventory
- Volume-focused partners for consistent fill
- Specialized partners for niche content
Common Implementation Challenges
Page Load Performance
Header bidding can impact page performance if not properly implemented:
Solutions:
- Use asynchronous loading for all bid adapters
- Implement proper timeout management
- Consider lazy loading for below-the-fold inventory
- Monitor Core Web Vitals impact
Ad Server Limitations
Most ad servers have limitations on key-value pairs and line items:
Workarounds:
- Implement price buckets instead of exact price passing
- Use consolidated line items where possible
- Consider server-side header bidding for complex setups
Demand Partner Conflicts
Some demand partners may have exclusivity requirements or conflicts:
Management Strategies:
- Maintain clear partner agreements
- Use bid adapter configurations to manage conflicts
- Implement partner-specific rules and targeting
Advanced Prebid Features
Server-Side Header Bidding
For publishers with performance concerns or complex setups, Prebid Server offers:
- Reduced browser-side latency
- Access to server-only demand sources
- Simplified client-side implementation
- Better mobile performance
First Party Data Integration
Leverage first-party data to increase bid values:
pbjs.setConfig({
ortb2: {
user: {
data: [{
name: "publisher-data",
segment: [{
id: "premium-subscriber"
}]
}]
}
}
});
Advanced Analytics
Implement comprehensive analytics to optimize performance:
- Bid landscape analysis
- Partner performance trending
- User experience impact measurement
- Revenue attribution modeling
Future of Prebid Header Bidding
Privacy-First Adaptations
Prebid continues evolving to address privacy regulations:
- Enhanced consent management integration
- Cookieless targeting solutions
- Privacy-preserving auction mechanics
- First-party data activation tools
Emerging Standards
The platform supports emerging industry standards:
- OpenRTB 2.6 and 3.0 compatibility
- Supply Path Optimization (SPO) features
- Enhanced brand safety controls
- Advanced fraud prevention integration
Measuring Prebid Success
Key Performance Indicators
Track these essential metrics:
Revenue Metrics:
- Total ad revenue increase
- CPM improvements by ad unit
- Fill rate optimization
- Viewable CPM trends
Operational Metrics:
- Bid rate by partner
- Timeout rate monitoring
- Error rate tracking
- Partner response times
User Experience Metrics:
- Page load time impact
- Bounce rate changes
- Core Web Vitals scores
- User engagement metrics
Continuous Optimization
Successful Prebid implementation requires ongoing optimization:
- Weekly performance reviews
- Monthly partner evaluations
- Quarterly strategy assessments
- Annual technology updates
Conclusion
Prebid header bidding represents a fundamental shift in programmatic advertising, offering publishers unprecedented control over their ad monetization strategies. While implementation requires technical expertise and ongoing optimization, the revenue benefits and operational advantages make it essential for serious publishers.
Success with Prebid depends on careful planning, methodical implementation, and continuous optimization. Publishers who invest in proper setup and ongoing management typically see substantial revenue improvements while maintaining excellent user experiences.
As the digital advertising landscape continues evolving, Prebid’s open-source approach and active community ensure it remains at the forefront of header bidding innovation, making it a strategic investment for publishers committed to maximizing their ad revenue potential.