Skip to content

Debugging HTAG

This guide covers various techniques and tools available for debugging HTAG implementations, including URL parameters, console logging, and other utilities that can help diagnose issues.

The ast_override_div URL parameter allows specific ad placements to be blocked from rendering.

Add the ast_override_div parameter to the page URL. The parameter accepts a comma-separated list of elementId:creativeId pairs. Any placement with a creativeId value of '0' will be blocked and will not render.

With a URL containing:

https://example.com/page?ast_override_div=div-1:0,div-2:123,div-3:0
  • Placements with IDs div-1 and div-3 will be blocked (not rendered)
  • Placement with ID div-2 will force render Xandr with creative 123.

The apn_test=TRUE URL parameter enables test mode for Xandr (AppNexus) ad requests, disabling antifraud protection and impression counting.

When apn_test=TRUE is present in the URL, HTAG enables test mode for all Xandr ad requests. This parameter:

  • Disables antifraud protection mechanisms
  • Prevents impressions from being counted in analytics
  • Allows unrestricted testing without affecting production metrics

Add the parameter to any page URL:

https://example.com/page?apn_test=TRUE

This will enable test mode for all Xandr placements on that page.

  • Only use apn_test=TRUE during development and testing phases
  • Do not enable this parameter in production environments
  • Test mode prevents analytics pollution during development

Force Bidder Parameters with adnz_force_bidder

Section titled “Force Bidder Parameters with adnz_force_bidder”

The adnz_force_bidder URL parameter allows you to control which bidders participate in the ad auction for specific placements, providing granular control for testing and debugging purposes.

Add the adnz_force_bidder parameter to the page URL to specify which bidders should be active for specific placements or globally across all placements. This feature filters the bidder list before the auction begins.

The parameter accepts a sophisticated syntax for specifying bidder constraints:

Basic Format: ?adnz_force_bidder=<placement>:<bidder1>,<bidder2>

Supported Patterns:

  • Single placement, single bidder: placement1:google
  • Single placement, multiple bidders: placement1:google,appnexus
  • Multiple placements: placement1:google;placement2:appnexus,xandr
  • Wildcard (all placements): *:xandr

Force specific bidders for one placement:

https://example.com/page?adnz_force_bidder=main-banner:appnexus,xandr

Only AppNexus and Xandr will bid on the main-banner placement.

Configure different bidders per placement:

https://example.com/page?adnz_force_bidder=header:google;sidebar:appnexus,xandr
  • header placement: only Google
  • sidebar placement: only AppNexus and Xandr

Apply globally to all placements:

https://example.com/page?adnz_force_bidder=*:xandr

Only Xandr will bid on all placements.

Disable all bidders:

https://example.com/page?adnz_force_bidder=*:google

Specifying google as the only bidder disables all prebid.js bidding.

Wildcard Priority: When a wildcard rule (*:bidders) is present, it takes precedence over any specific placement rules.

Google Bidder: When google is specified as the only allowed bidder, the system disables all prebid.js bidders for that placement.