Big Crunch

Search Documentation

Search across all documentation pages

Debugging Google Ad Manager

The Google Publisher Console is the primary debugging tool for GAM.

Accessing the Console

Append this to your URL:

?googfc

Console Features

The Publisher Console shows:

  • Slots - All ad slots on the page
  • Targeting - Key-value pairs and targeting criteria
  • Creatives - Which creatives won the auction
  • Line Items - Active line items and their priorities
  • Errors - Warnings and error messages

GPT Console Commands

Use these commands in the browser console to debug GPT implementation:

Display All Slots

googletag.pubads().getSlots();

Returns array of all defined ad slots with:

  • Slot element ID
  • Ad unit path
  • Sizes
  • Targeting

Get Slot by Element ID

googletag
  .pubads()
  .getSlots()
  .find((slot) => slot.getSlotElementId() === "div-gpt-ad-123456");

Check Slot Targeting

const slot = googletag.pubads().getSlots()[0];
slot.getTargetingKeys().forEach((key) => {
  console.log(key, "=", slot.getTargeting(key));
});

Check Page-Level Targeting

googletag
  .pubads()
  .getTargetingKeys()
  .forEach((key) => {
    console.log(key, "=", googletag.pubads().getTargeting(key));
  });

Network Request Debugging

Inspect Ad Requests

  1. Open browser DevTools (F12)
  2. Go to the Network tab
  3. Filter by doubleclick.net or googlesyndication.com
  4. Look for requests to /gampad/ads

Ad Request Parameters

Key parameters in the ad request URL:

  • iu=/networkCode/adUnit - Ad unit path
  • sz=300x250|728x90 - Creative sizes
  • cust_params - Custom targeting key-values (URL encoded)
  • prev_scp - Previous custom parameters
  • url - Page URL
  • gdpr - GDPR consent status
  • gdpr_consent - Consent string

Decode Custom Parameters:

decodeURIComponent("hb_pb%3D1.50%26hb_bidder%3Drubicon");
// Returns: hb_pb=1.50&hb_bidder=rubicon

Support Resources