Troubleshoot web ad requests

Capture and interpret HTTP network sessions with Chrome Developer Tools

This article walks you through capturing HTTP network sessions using Chrome Developer Tools to troubleshoot live web ad requests. By understanding how to capture and interpret this data, you can significantly expedite issue resolution time by identifying problems.

If you need to escalate to Google Ad Manager support, providing the precise information about Google Ad Manager interactions that you'll learn how to find here is invaluable.

Note: This guide is specific to web session traffic. If you need information about mobile, you can learn about capturing mobile session traffic.

In this article

Best practices for an effective capture

Before you begin capturing network traffic, following these best practices will help ensure your HAR file contains clean, relevant data for accurate troubleshooting:

  • Use Incognito mode: Open a new Incognito window in Chrome (Ctrl+Shift+N or Cmd+Shift+N). This minimizes interference from browser extensions, cached data, and existing login sessions, providing a cleaner environment for ad loading.
  • Clear browser cache and cookies: Even in Incognito mode, it's good practice to ensure a clean slate. While in the Incognito window, open Developer Tools (F12 or Ctrl+Shift+I or Cmd+Option+I), right-click on the refresh button next to the address bar, and select Empty Cache and Hard Reload.
  • Disable ad blockers and other interfering extensions: Temporarily disable any browser extensions that might block ads, modify page content, or interfere with network requests (for example, ad blockers, VPNs, security extensions). These can prevent ads from loading or alter network traffic, skewing your troubleshooting data.
  • Reproduce the issue reliably: Before you start recording, ensure you can consistently reproduce the ad issue you're trying to diagnose. This might involve refreshing the page multiple times, navigating to specific sections, or interacting with the page in a certain way.

Capture your HTTP network session (generate a HAR file)

A HAR (HTTP Archive) file is a JSON-formatted archive file that contains a log of a web browser's interaction with a site. It captures all requests and responses, providing a detailed timeline of network activity.

To capture a HAR file in Chrome:

  1. Open Chrome Developer Tools

    1. Navigate to the webpage where the ad issue is occurring.
    2. Right-click anywhere on the page and select Inspect.
  2. Go to the "Network" tab

    • In the Developer Tools panel, click on the Network tab.Example of where to select the "Network" tab in Chrome Developer Tools
  3. Ensure recording is active

    1. Look for a circular "Record" button (often red or gray). If it's gray, click it once to start recording. A red circle indicates recording is active.Example of where to click to record a session in Chrome Developer Tools
    2. Ensure the "Preserve log" checkbox is selected. This ensures that the log isn't cleared when you navigate to different pages or refresh.Example of where to select "Preserve log" in Chrome Developer Tools
    3. The "Disable cache" checkbox can also be helpful, especially if you didn't do a "hard reload" initially.Example of where to select "Disable cache" in Chrome Developer Tools
  4. Reproduce the ad issue

    1. With Developer Tools open and recording, perform the actions that cause the ad issue to occur (for example, refresh the page, scroll down, click a button).
    2. Allow the page to load completely and the ad to attempt to render (or fail to render). Continue recording for a few seconds after the issue has manifested.
  5. Save the HAR file

    1. Once you've reproduced the issue and captured the relevant network traffic, click the "Export HAR" button.Example of where to click to download a HAR file in Chrome Developer Tools
    2. Choose a location on your computer to save the ".har" file and give it a descriptive name (for example, ad-blank-example.har).

Interpret your HAR file for ad troubleshooting

Capturing the HAR file is the first step; interpreting it is where you can truly diagnose ad issues. This section will help you identify common patterns and key data points.

Common ad-related request patterns to investigate

Google Publisher Tag (GPT) Requests

Look for requests to googletagservices.com/tag/js/gpt.js. This is the core library that fetches ads. Ensure it loads with a 200 OK status.

Learn more about Google Publisher Tags.

Ad server calls

Identify requests to your Google Ad Manager ad server, typically starting with securepubads.g.doubleclick.net/gampad/ads or securepubads.g.doubleclick.net/gampad/ad.

HTTP status codes:

  • 200 OK: The request was successful, and an ad or a blank response (no ad filled) was returned.
  • 204 No Content: Often indicates a successful request but no ad was served (for example, no fill, targeting issues).
  • 302 Found or 307 Temporary Redirect: Indicates a redirect. Follow the redirect chain to see where the request ultimately landed.
  • 4xx Client Error (for example, 400 Bad Request, 404 Not Found): Indicates an issue with the request from the client side. This often points to incorrect ad unit IDs, targeting parameters, or invalid network configurations.
  • 5xx Server Error: Indicates an issue on the ad server's side.

Headers: In the "Headers" tab of the request, check "Request URL", "Method", "Status code". In "Request headers", look for parameters like iu (ad unit), sz (size), and correlator to ensure they match your expected setup.

Response: In the "Response" tab, inspect the content returned by the ad server. For successful ad calls, you might see HTML for the creative, VAST XML for video ads, or a blank response if no ad filled. Look for error messages within the response if the ad failed.

Creative asset loading

  • After an ad server call, look for subsequent requests to load the actual creative assets (images, JavaScript, third-party trackers, video files). These requests will typically originate from the ad server's response.
  • Common sources include pagead2.googlesyndication.com, various CDN URLs, or third-party ad technology vendors.
  • Check their "Status" codes and "Time" (latency). High latency or failed creative loads (404 for an image, for example) can cause blank or slow-loading ads.

Common ad troubleshooting scenarios and what to look for in the HAR file

Scenario 1: Ad slot is blank/empty
  • Check GPT calls: Ensure gpt.js loads correctly.
  • Check ad server calls (g.doubleclick.net/gampad/ads)
    • Is there a request for the specific ad unit?
    • Is the status 204 No Content? This usually means no ad was found to fill the slot (targeting, inventory, or pricing issues).
    • Is the status a 4xx error? This indicates a problem with the request itself (for example, incorrect ad unit path).
  • Check response: If a 200 OK response occurs, inspect the "Response" tab. Is it empty? Does it contain an error message from the ad server or an empty creative?
Scenario 2: Ad is loading slowly
  • Check "Time" column: Sort the network requests by the "Time" column (or "Waterfall" view).
  • Identify slow ad server calls: Are the g.doubleclick.net/gampad/ads calls taking a long time (hundreds of milliseconds or more)?
  • Identify slow creative loads: Are the subsequent calls for creative assets (images, third-party JavaScript) taking excessive time? This could indicate large creative file sizes or slow-loading third-party resources.
Learn more about network waterfall analysis in the Chrome Developer Tools documentation.
Scenario 3: Ad is not displaying correctly (for example, cropped or wrong size)
  • Check ad server call response: Inspect the "Response" tab of the ad server call. Does the returned creative match the expected size and format?
  • Look for JavaScript errors: Check the "Console" tab in Developer Tools for any JavaScript errors related to ad rendering or third-party scripts.
  • CSS conflicts: While not directly in HAR, conflicting CSS on your page can affect rendering. Look at the "Elements" tab and computed styles for the ad slot.

Key columns and what to look for

  • Name: The URL of the requested resource.
  • Status: The HTTP status code of the response (for example, 200 OK or 404 Not Found).
  • Type: The MIME type of the resource (for example, "document", "script", "image", "xhr").
  • Initiator: Which resource or script initiated the request.
  • Size: The size of the transferred resource.
  • Time: The total duration of the request.

What to do after you capture and interpret

Once you've captured and performed an initial review of your HAR file, you can either:

Self-diagnose and resolve: If you've identified a clear issue (for example, a 404 response code on a creative asset, a 204 response code due to specific targeting parameters), you might be able to resolve it yourself by adjusting your ad setup in Google Ad Manager or modifying your webpage code.

Provide the following information to Google Ad Manager support:

  • The HAR file itself.
  • A clear description of the issue: What you expected to happen vs. what actually happened.
  • Steps to reproduce the issue: The exact URL, browser, and actions taken.
  • Timestamp of the issue: Note the exact date and time (including time zone) when the issue occurred in the HAR file. This helps support pinpoint the relevant events.
  • Ad unit IDs, order IDs, line item IDs, or creative IDs that you suspect are involved.
  • Any initial findings from your HAR file analysis.
HAR files can contain sensitive information, including page content, cookies, and authentication tokens. When sharing, be mindful of the data you're providing.

Was this helpful?

How can we improve it?
Search
Clear search
Close search
Main menu
17924407972481237769
true
Search Help Center
true
true
true
true
true
148
false
false
false
false