Client-Side Prebid.js
Prebid.js is the wrapper most of the open web runs on. This track takes you from the wrapper concept through ad units, adapters, the auction lifecycle, timeouts, price granularity, GAM line items, and the module system. The Prebid config analyzer in Bidcliq Academy is the live companion.
What do L1–L5 mean?depth, beginner → expert
Each module carries a depth band. A range like L3–L4 means it spans two.
- Foundations
- Vocabulary and the big picture. No prior ad-tech assumed.
- Practitioner
- The hands-on basics you use day to day.
- Intermediate
- Real configuration and the trade-offs behind it.
- Advanced
- Optimization, edge cases, and running at scale.
- Expert
- Architecture and deep specialization.
Prereqs: A3
Objectives- Define a wrapper / container tag.
- Explain why publishers use a managed wrapper instead of stacking N vendor tags.
- Identify Prebid.js as the dominant open-source wrapper and its component model: core plus bid adapters plus analytics adapters plus modules.
Key conceptsWrapper / container tagPrebid.js component model (core, bid adapters, analytics adapters, modules)Managed vs unmanaged multi-tag setupsRead the lesson →AssessmentAnnotate the four Prebid.js component types and explain one risk of an unmanaged multi-tag setup.
PRACTICEProposed guided "build a Prebid.js bundle" config exercise.
Prereqs: B1
Objectives- Author an adUnit: code, mediaTypes (banner / video / native), sizes / sizeConfig, bids[].
- Map ad-unit fields to the OpenRTB imp object.
- Understand ortb2 / ortb2Imp first-party data.
Key conceptsadUnit (code, mediaTypes, sizes, bids[])OpenRTB imp mappingortb2 / ortb2Imp first-party dataRead the lesson →AssessmentWrite a valid two-bidder banner ad unit from a spec, then find the bug in a malformed one.
PRACTICEProposed ad-unit builder.
DEBUGProposed "no bids because the size was never requested" reproduction.
Prereqs: B2
Objectives- Explain what a bid adapter does.
- Configure per-bidder params.
- Understand aliases.
Key conceptsBid adapterPer-bidder params (placement / zone / site IDs)AliasesRead the lesson →AssessmentFill the correct params from a bidder's docs and explain why a copied param block fails for another bidder.
ANALYZEEach bidder in a Prebid config should map to an authorized line in the publisher ads.txt. Cross-check a config against a Bidcliq Academy audit and flag any bidder with no authorization, a real and common leak. Start from the Prebid analyzer.
Open the Prebid analyzer →DEBUGUNAUTHORIZED root-caused to "bidder live in the wrapper but absent from ads.txt."
Run it live →Prereqs: B2, B3
Objectives- Sequence the auction: requestBids() fires adapters in parallel, responses are collected, bidsBackHandler fires on all-back or timeout, then targeting is set and the ad server is called.
- Use the Prebid event system.
Key conceptsrequestBids()bidsBackHandler (all-back or timeout)setTargetingForGPTAsync()The Prebid event systemRead the lesson →AssessmentOrder a scrambled lifecycle, explain timedOut: true, and write a bidsBackHandler that calls setTargetingForGPTAsync() then refresh.
DEBUGProposed auction-timeline simulator.
Prereqs: B4
Objectives- Distinguish the auction timeout, bidderTimeout, and failsafeTimeout.
- Explain the revenue trade: too short starves bids, too long delays the ad-server call.
- Understand that setTimeout is not a hard guarantee.
Key conceptsbidderTimeoutfailsafeTimeoutThe latency-vs-bid-density tradeRead the lesson →AssessmentGiven a latency histogram, choose a timeout that captures the 80th percentile without exceeding a page-experience budget.
DEBUGProposed timeout-tuning sandbox.
PRACTICEProposed failsafe proof.
ANALYZESee how the Prebid analyzer flags a too-low or too-high bidderTimeout on a real config.
Open the Prebid analyzer →Prereqs: B4
Objectives- Explain why bids are quantized into price buckets.
- Configure standard vs custom priceGranularity.
- Map winning bids to hb_pb, hb_adid, hb_size, hb_format, and per-bidder variants under send-all-bids.
- Understand query-string length risk.
Key conceptsPrice bucketsStandard vs custom priceGranularityhb_pb / hb_adid / hb_size / hb_formatSend-all-bids key explosionRead the lesson →AssessmentDefine a custom bucket scheme and compute the keys produced for a given winning bid.
PRACTICEProposed granularity designer.
DEBUGProposed "bid lost revenue to a coarse bucket" reproduction.
Prereqs: B6
Objectives- Build the GAM scaffold: key-values, Price Priority (type 12) line items per bucket, the universal creative.
- Choose top-price vs send-all-bids trafficking and reason about UPR (Unified Pricing Rules) interaction.
Key conceptsPrice Priority line items (type 12)Universal creativeTop-price vs send-all-bids traffickingUnified Pricing Rules (UPR)Read the lesson →AssessmentCompute the line-item count for a granularity, write key-value targeting for a $4.50 line item, and explain a missing-key failure mode.
PRACTICEProposed line-item generator.
DEBUGProposed "creative renders blank because hb_adid is undefined in GAM" reproduction.
Prereqs: B4
Objectives- Navigate the module system: User ID, floors, consent, currency, and analytics.
- Use setConfig() and bidderSettings (CPM adjustments, custom targeting).
- Wire one analytics adapter.
Key conceptsThe module systemsetConfig()bidderSettings and bidCpmAdjustmentAnalytics adaptersRead the lesson →AssessmentConfigure a 10% bidCpmAdjustment and explain its competitive effect, then list the modules for a GDPR-compliant, floored, UID2-enabled build.
Complete this track
Five questions drawn from this track. Get 4 right to mark the whole track done.
1.In Prebid.js, a bid “adapter” is…
2.The Prebid bidder timeout controls…
3.Why do publishers configure price granularity (buckets)?
4.How is a winning Prebid bid passed to GAM?
5.A Prebid “ad unit” defines…