Quick Help

The knowledgebase is a categorized collection of answers to frequently asked questions (FAQ) and articles. You can read articles in this category or select a subcategory that you are interested in.



 Why Is Your Prebid Adapter Not Bidding in GAM?

Solution

Why Prebid Adapter Not Responding in GAM

Multiple factors can cause a Prebid adapter to not respond or return a bid, including timeouts, misconfigurations in your Prebid.js setup, incorrect ad server (GAM) key-values, or issues with the bidder itself.

Common causes and solutions

1. Configuration errors

  • Incorrect adapter parameters: The bidder parameters (params) in your pbjs.addAdUnits() call must be correctly set for each bidder. A simple typo or missing parameter can cause the adapter to fail.
  • Ad unit mismatch: The ad unit code defined in Prebid.js must exactly match the ad unit configured in Google Ad Manager (GAM).
  • Missing ad units: Ensure you have called pbjs.addAdUnits() for every ad unit on the page.

Debugging steps:

  • Enable debug mode by adding ?pbjs_debug=true to your page URL or by using pbjs.setConfig({ debug: true }). This will print detailed logs in the browser console.
  • In the console, run pbjs.getBidResponses() to see what responses were received for each ad unit.
  • Use the Professor Prebid Chrome extension to view your entire auction, including ad units, bids, and timeouts.

2. Timeout issues

  • Global timeout is too low: If your pbjs.requestBids() call has a low timeout value (e.g., 500ms), some slower bidders may not respond in time and will not be sent to GAM.
  • High page latency: If the user's network connection is slow or other scripts on the page are resource-intensive, the auction may time out before bids are returned.
  • Geographic distribution: A user's distance from a bidder's server can increase network latency and lead to timeouts.

Debugging steps:

  • Look for timeout messages in the browser console after enabling debug mode.
  • Consider increasing the global timeout in your Prebid.js configuration.
  • Use the Professor Prebid extension to analyze the timeline of the auction and identify slow bidders.

3. GAM setup problems

  • Key-value targeting mismatch: The key-values sent by Prebid.js must exactly match the targeting criteria on your line items in GAM. Pay close attention to GAM's 20-character key length limit, which can truncate longer key names.
  • High-priority line items: If you have higher-priority line items (e.g., sponsorship or standard deals) running in GAM, they may win the impression even if Prebid returns a valid bid.
  • Price granularity mismatch: If a bid's price falls between the price buckets you configured in your Prebid line items, the bid will effectively be treated as $0. For example, if your buckets are in $0.50 increments and a bid of $0.40 comes in, it will be mapped to $0.00.

Debugging steps:

  • Use the Google Publisher Console by adding ?googfc to your page URL or running googletag.openConsole() in the console. Check the "Delivery Diagnostics" to see what key-values were passed to GAM for each ad slot.
  • In the browser console, run pbjs.getAdserverTargeting() to see the key-values that Prebid intended to send to GAM. Compare the two sets of key-values to find any discrepancies.

4. Issues with Prebid Server

If you are using Prebid Server, the issue could lie there instead of with the client-side adapter.

  • Server-side timeout: The timeout configured for Prebid Server (s2sConfig.timeout) may be too low, causing server-side bidders to fail.
  • Debug flags: For server-side debugging, you can force a debug response from Prebid Server by adding &debug=1 to the server-side bid request URL.

Debugging steps:

  • Check that your s2sConfig.timeout is appropriately lower than your main Prebid.js timeout.
  • Analyze the network requests made to Prebid Server to ensure they are successful and returning bids.

How to approach troubleshooting

  1. Enable Debugging: Start with the basics. Add ?pbjs_debug=true and ?googfc to your URL.
  2. Inspect Prebid.js: Check the browser console for Prebid logs. Use the Professor Prebid extension for a clear overview of the auction timeline and bids.
  3. Inspect the Bidder's Response: Check the network tab for the actual bid request to the SSP and the corresponding response. If there is no response, the issue may be with the bidder itself or your network settings.
  4. Inspect GAM: Use the Google Publisher Console to verify that the key-values from Prebid were correctly passed to GAM.
  5. Review Settings: If the issue is persistent, double-check your Prebid.js and GAM configurations for typos, mismatched IDs, or other common mistakes.