Header bidding

Header bidding
with Prebid.js and Prebid Server

All demand sources are asked in parallel, a timeout you control ends the round, and the top bid reaches GAM while the page is still loading. Prebid.js and Prebid Server are managed by Worksly.

Prebid.js 8+Prebid ServerGAMOpen BiddingOne wrapper, no exclusivity
Step by step

What happens while
the page paints

Five steps, one after another. Watch them run, then read the budget below.

  1. 01
    Page loadThe wrapper tag is fetched from the edge and ad units register with their sizes and floors.
  2. 02
    Bidders called in parallelAll demand sources are asked at once, Prebid.js adapters plus Prebid Server, in the same round.
  3. 03
    TimeoutThe configured budget closes the round, and slow bidders drop out.
  4. 04
    Top bid to GAMPrice and key-values are pushed to Google Ad Manager, where line items get the final say.
  5. 05
    Auction + renderGAM decides, the creative paints inside the reserved container, and each losing bid is logged with a reason.
Timeout budget

How the timeout
trades speed for bids

A longer timeout lets more bidders answer: higher fill, slower pages. Pick a posture and see the trade you're making.

Bidder timeout postureRecommended for most sites
Wrapper initBidders in parallelGAM callRender
Bidders answered93%of demand sources inside the timeout
Cost to page speedModeratewhat the auction can add to page load
What it meansMore demand on slow connections, without holding faster visitors back

Illustrative trade-offs. The right posture depends on your audience, your bidders and how each page earns.

Client vs server

Client-side
or server-side

Most publishers run both: Prebid.js on the page for banner-rich web, Prebid Server where the client can't afford the round trip.

Prebid.jsPrebid Server
Where it runsIn the page, on the clientIn our cloud, server-side
Latency profileAdds its timeout to the pageOne request from the edge
Demand reachAll Prebid.js adaptersServer-side adapters + your direct deals
Best forDesktop & mobile web with many biddersCTV, AMP, app webviews, slower connections
You maintainWrapper config in your repoNothing: it runs as part of the platform
Worksly setupManaged Prebid.js 8+ wrapperPrebid Server endpoints, s2s configured
GAM + AdX

Your ad server
stays in charge

The wrapper's top bid competes inside Google Ad Manager, so your existing line items keep the final word, with AdX and Worksly demand in one comparable auction.

Open BiddingWorksly demand competes inside AdX as an authorized buyer, and your existing setup stays as it is.
Google MCMFor MCM partners: delegated inventory runs through the same auction with the revenue split you negotiated.
Full bid-loss reasonsEach lost impression reports why it lost: in GAM and in the Worksly dashboard, side by side.
All integrations
Prebid.js adUnits · worksly-hb.jsjs
// worksly-hb.js: Prebid.js 8+ const adUnits = [{ code: 'billboard-970x250', mediaTypes: { banner: { sizes: [[970, 250], [728, 90]] } }, bids: [{ bidder: 'worksly', params: { placementId: 'YOUR_PLACEMENT_ID' } }] }]; pbjs.que.push(() => { pbjs.addAdUnits(adUnits); pbjs.requestBids({ bidsBackHandler: () => pbjs.setTargetingForGPTAsync() }); });
Decision helper

Where the auction
does its work

Three questions about your inventory and your team. The recommendation updates with each answer, and the setup path follows from it.

Where is most of your inventory?
How many demand sources bid on a typical web page?
Who ships wrapper changes?
The common answerBoth, run as one setup

Prebid.js covers banner-rich web while Prebid Server handles CTV, apps and the long tail of slower connections. One auction, one dashboard, the same loss reasons on both lanes.

Where it runsPrebid.js on web, Prebid Server elsewhere
You maintainThe web wrapper config; the server lane stays managed
Setup pathThe integration steps below cover both lanes in order
Prerequisites

What we need
from you before setup

Five items, most of them sitting in accounts you already run. Bring them to the setup call and the test page usually runs the same week.

GAM network access

An ad manager account with permission to create an order and line items. We deliver the Worksly HB order, the price buckets and the key-values as a setup guide, and your GAM admin applies them. MCM-delegated inventory runs through the same auction.

A consent platform

For EEA and UK traffic, a CMP registered on the IAB TCF list. The Worksly tag reads the TCF 2.2 string your CMP registers, and Google Consent Mode defaults go in before the first ad tag.

ads.txt and app-ads.txt

The dashboard generates your line: worksly.io, your account ID, DIRECT, 1bc3f09e77a2c401. Apps publish the same line as app-ads.txt on the developer domain named in the store listing.

A test page

One URL where the wrapper can run before live traffic: a staging build or a low-risk section. Testing there covers the consent deny path and the first GAM deliveries without touching real inventory.

Your current setup details

The wrapper you run today, floors per placement, and the ad units for the first batch. If another wrapper is live, we benchmark both on the same traffic before anything changes.

Setup sequence

Integration steps

From generated config to full traffic in five steps. Tick a step as your team finishes it; the tracker runs in your browser and sends nothing anywhere.

  1. 01
    Wrapper config generatedYour placements, sizes and floors become a managed Prebid.js 8 config. Worksly generates it; your team reviews and ships it.
    Worksly
  2. 02
    GAM order and line itemsCreate the Worksly HB order, one line item per price bucket, plus the hb_pb, hb_bidder and hb_adid key-values. The dashboard generates the bucket list for dense pricing.
    You
  3. 03
    ads.txt and consent verifiedPublish the generated ads.txt line, app-ads.txt for apps, and test the consent chain including the deny path of your banner.
    You
  4. 04
    Test page verifiedFirst deliveries show hb_bidder=worksly in GAM and bid-loss reasons start appearing in the dashboard. Floors meet real bids for the first time.
    Both
  5. 05
    Traffic ramp in batchesPlacements move from the test section to full traffic in batches, with fill and loss trends watched in the dashboard after each batch.
    Both
Diagnostics

Reading bid-loss reasons

Each lost impression reports a reason, and the mix tells you what to fix. Filter by the kind of problem you are chasing; losses are normal, a shift is the signal.

ReasonWhat happenedWhat to do
Below floorbelowFloorA bid arrived and sat under the floor set for the placement.Check the floor against the bid distribution before moving it; the dashboard plots both.
No clearing bidinsufficientBidBids came in and none reached the clearing price in the first-price auction.Expected for some share of impressions; act when it climbs on a placement that used to clear.
Timed outtimeoutA buyer answered after the round had already closed.Trim slow bidders from the client wrapper or move that demand server-side.
No eligible demandnoDemandCategory, geo or deal targeting left the impression without an eligible buyer.Review deal targeting and blocked categories for that placement.
Ads.txt mismatchThe domain's ads.txt did not authorize the seller on the bid.Publish the line generated under Settings → Inventory and let the crawler re-check.
Blocked categoryA category you blocked removed the buyer from the auction.Compare blocked categories against the demand bidding on the placement today.
Line item gapA winning price landed in a bucket with no line item to serve it.Regenerate the bucket list under Settings → Inventory → GAM setup.

The codes belowFloor, insufficientBid, timeout and noDemand are the stable strings the Reporting API returns with the bidLossReasons metric, so a chart built from the dashboard keeps matching an API pull over time.

Migration

Switching from
another wrapper

Already running a wrapper? The changeover runs in stages with the old setup serving until each batch moves. Open a stage to see what happens inside it.

Prebid + GAM setup docs
Stage 1: export what the current wrapper knows

Ad units with sizes, bidders per slot, floors, and the GAM order structure around them. This inventory list is the input for the Worksly config, so nothing gets lost between setups.

Stage 2: run both wrappers on a test section

The Worksly wrapper serves a test section while the current wrapper keeps the rest of the site. GAM keeps the two paths in separate orders, so delivery data stays readable on both sides.

Stage 3: compare lanes on the same traffic

The dashboard puts revenue per thousand impressions, win rate and the loss-reason mix side by side per placement. A week or two of overlapping data is usually enough to read which lane earns more on each section.

Stage 4: move placements in batches

One section moves at a time: the Worksly order takes the traffic, the old line items pause for that batch, and fill and loss trends get checked in the dashboard before the next batch starts.

Stage 5: retire the old setup

Remove the old tag, its GAM order and its key-values once the last batch settles. ads.txt lines for partners you still sell through stay; the Worksly line stays too.

Header bidding

Start monetizing
with Worksly

Bring your current wrapper and floors. We benchmark both lanes on your traffic before you change a thing.