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 AdMob support, providing the precise information about AdMob 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
- Capture your HTTP network session (generate a HAR file)
- Interpret your HAR file for ad troubleshooting
- What to do after you capture and interpret
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
orCmd+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
orCtrl+Shift+I
orCmd+Option+I
), right-click on the refresh button next to the address bar, and selectEmpty 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:
-
Open Chrome Developer Tools
- Navigate to the webpage where the ad issue is occurring.
- Right-click anywhere on the page and select Inspect.
-
Go to the "Network" tab
- In the Developer Tools panel, click on the Network tab.
- In the Developer Tools panel, click on the Network tab.
-
Ensure recording is active
- 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.
- Ensure the "Preserve log" checkbox is selected. This ensures that the log isn't cleared when you navigate to different pages or refresh.
- The "Disable cache" checkbox can also be helpful, especially if you didn't do a "hard reload" initially.
- 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.
-
Reproduce the ad issue
- 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).
- 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.
-
Save the HAR file
- Once you've reproduced the issue and captured the relevant network traffic, click the "Export HAR" button.
- Choose a location on your computer to save the ".har" file and give it a descriptive name (for example,
ad-blank-example.har
).
- Once you've reproduced the issue and captured the relevant network traffic, click the "Export HAR" button.
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.
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
or404 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 AdMob or modifying your code.
Provide the following information to your AdMob support team:
- 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.
- Any IDs that you suspect are involved.
- Any initial findings from your HAR file analysis.