How Header Bidding Works with GAM
In a header bidding workflow, Prebid.js orchestrates concurrent auctions among multiple SSPs inside the user's browser. Once a winning bid is resolved, Prebid.js injects this price via key-values into the ad server request sent to Google Ad Manager (e.g., hb_pb=2.50).
For GAM to evaluate and compare this external bid against its own inventory (Ad Exchange, AdSense, direct campaigns), the ad server must contain **pre-configured Line Items** for every potential price increment ("price slices").
Line Item Configuration Best Practices
Incorrect priority levels or mismatched targeting criteria can prevent bids from delivering, hurting your publisher yield. Follow these rules:
- Line Item Type: Always select **Price Priority**. This allows Google Ad Manager to dynamically compare the Prebid CPM value against direct campaigns and Ad Exchange.
- Priority Level: Keep it at **12** (the default for Price Priority). This is the industry standard. Delivery Rate: Set delivery to **Unlimited** with permanent targeting so no monetizable bids are missed.
Recommended Price Slice Increments
To capture maximum value without overloading your GAM network limits, we recommend a tiered slicing structure:
De 0.10€ à 3.00€
Pour capter précisément les petits volumes d'enchères du display de masse.De 3.00€ à 10.00€
Idéal pour le milieu de panier, capturant l'essentiel de la valeur programmatique.Au-delà de 10.00€
Pour les formats vidéo premium ou les bannières à très fort taux d'engagement.The Prebid Universal Creative (Creative Mapping)
You do not need to upload a different creative asset for every price slice or SSP. Instead, Prebid relies on a single **Master Creative** mapped to your Line Items. This creative dynamically resolves the win script at render time.
Here is the standard HTML snippet to insert in your custom creative in Google Ad Manager:
<script src="https://cdn.jsdelivr.net/npm/prebid-universal-creative@latest/dist/creative.js"></script>
<script>
var ucTag = {};
ucTag.adId = "%%PATTERN:hb_adid%%";
ucTag.pubUrl = "%%REFERRER_URL%%";
try {
ucClient.renderAd(document, ucTag);
} catch (e) {
console.error("Erreur de rendu Prebid Universal Creative:", e);
}
</script> Automating the Creation of 200+ Line Items
Creating 200 or 400 Line Items manually (setting dimensions, keys, and creative mappings) takes hours and is prone to human error.
With the OrbiAds MCP console or connected AI assistants, you can generate your entire Prebid footprint in a single command.
# Automate Prebid slices via AI
prebid.generate_slices(
advertiser_id="12345678",
min_cpm=0.10,
max_cpm=20.00,
granularity="medium",
sizes=[[300, 250], [728, 90]],
dry_run=false
) This command logs into your network, defines `hb_pb` targeting rules, spins up the Price Priority Line Items, and maps them to Prebid creatives in one go.
Troubleshooting & Maintenance
- Priority Overlap: If a direct campaign has a higher priority rank (e.g., Standard priority 10) and targets the same slot, it will win over Prebid regardless of CPM. Ensure dynamic competition is active.
- Network limits: Keep your GAM network clean. Old, inactive Prebid items should be archived to avoid hitting network entity limits (typically 100k to 600k total items).
Automate Prebid.js Setup in Seconds
Leverage the OrbiAds integration engine to deploy, refresh, or audit your Prebid setups. Eliminate manual mistakes and maximize yield.
