Skip to content

Headertag

htag is a powerful header bidding solution that simplifies ad integration and maximizes revenue for publishers. This documentation provides comprehensive guidance on implementing and using htag effectively.

htag is a JavaScript library that manages the complexities of header bidding and ad delivery. It coordinates auctions between multiple bidders, handles ad rendering, and provides tools for optimizing ad performance.

  • Header Bidding: Simultaneous auctions across multiple bidders
  • Google Ad Manager Integration: Seamless integration with Google Ad Manager
  • Prebid.js Integration: Integration with Prebid.js for hundreds of ad networks
  • Dynamic Placements: Automatically create ad placements based on page content
  • Roadblocks: Coordinate ad delivery across multiple placements
  • Lazy Loading: Load ads only when they’re about to come into view
  • Responsive Design: Adapt ads to different screen sizes
  • Consent Management: Integration with Consent Management Platforms (CMPs)
  • Contextual Targeting: Integration with Semantiq for contextual keywords

See the Integration guide for setup instructions.

Let Google Ad Manager decide what a placement shows

Section titled “Let Google Ad Manager decide what a placement shows”

In the Adconsole placement editor, enable Prioritize GAM to give GAM the final delivery decision and let publisher campaigns compete with header bids. At a breakpoint with a GAM ad unit path and sizes, htag sends the auction winner’s targeting to GAM. It also requests GAM when there is no bid. A priority creative and an override bid selected by ast_override_div compete on CPM. Bids above maxGoogleCpm still go to GAM.

If GAM returns an empty slot, the placement stays empty. When this suppresses a winning Prebid bid, the scheduled reload runs at its usual interval.

An empty GAM size list allows direct render when this setting is on. A breakpoint that previously showed no ad can now show an eligible Prebid bid using its bidder sizes. The same direct render path applies when GAM configuration is missing or a publisher hook removes the GAM ad unit path or clears the sizes. Amazon APS requires GAM.

A multi-slot bid (roadblock or high impact) is skipped in full if it would claim a GAM-protected placement. When any placement in the tag prioritizes GAM and a companion’s setting is still unknown, htag skips the creative for that auction. If a registered companion uses this setting and its first breakpoint is wider than the current viewport, a high-impact bid can win without claiming that companion. The companion can then request GAM when the viewport reaches its breakpoint.

Use a unique GAM ad unit path for each placement. The publisher campaigns and mediation line items must compete in the GAM network receiving the request. Configure floor rules to exclude hb_htag=true and serve the mediation creative through an order recognized by htag. The creative must handle a missing hb_adid as an empty result. Coordinate new mediation orders with Audienzz before enabling the setting.