How to Record a HAR File for Troubleshooting

Overview

When troubleshooting tracking or data discrepancies, the Elevar Support team may ask you to provide a HAR file. Follow this guide to learn more about HAR files and how to record them for troubleshooting any issues.

Understanding HAR Files:

A HAR file (HTTP Archive) captures all network activity between your browser and your website, including requests made by scripts, pixels, and APIs.

The data from a HAR file can be used to identify network-level issues such as:

  • Events not appearing in the Server Events Log.
  • Failed requests to destinations like Facebook, Google Ads, or Klaviyo.
  • Missing data layers or delayed network responses.

🚧

NOTE: Sharing HAR Files

Before sharing a HAR file, review it in a text editor or use a HAR sanitizer tool to remove sensitive data such as customer information, emails, or payment details.

How to Record a HAR File

The process differs slightly depending on which browser you use. Follow the instructions below for your specific browser.

Google Chrome:

  • Begin by navigating to the page where the specific issue occurs.
  • Locate and click the on the â‹® (three dots) button located in the top-right corner of the browser. An additional drop-down menu will appear, click on the "More Tools" tab. Then, click on the "Developer Tools" tab.
  • Once in the Developer Tools panel, locate and click on the "Network tab".
    • Ensure the Record button (red circle) is active. If this button is gray, click it once to start recording. Once recording, reproduce the issue or refresh the page.
  • When done, click the Export HAR icon (⇩) that is lcoated at the top of the Network tab and ensure that you save the file (e.g.,elevar_debug.har).

📘

NOTE: Pop-Up Window Issues

If your issue occurs in a pop-up window (e.g., authentication or checkout), click the "Settings" button or gear icon located in the Network tab. Then locate and click on the "Global" button and enable "Auto-open DevTools" for popups.

Mozilla Firefox

Firefox HAR exports are not sanitized by default. Review the file before sending.

  • Begin by navigating to the specific page wehre the issue occurs.
  • Locate and click the ☰ (three lines) menu located in the top-right hand corner of the browser. An additional drop-down menu will appear, click on the "More Tools" tab. Then, click on the "Web Developer Tools" tab.
  • Once in the Web Developer Tools, open the "Network" tab.
    • Enable Disable Cache, then click the trash icon to clear old logs.
    • Open the "Settings" by clicking on the icon and enable "Persist Logs".
    • Then, reproduce the issue.
  • When done, right-click any request and click on the "Save All As HAR" button and save your HAR file.

Microsoft Edge

  • Begin by navigating to the specific page wehre the issue occurs.
  • Locate and click the ⋯ (three dots) menu. An additional drop-down menu will appear, click on the "More Tools" tab. Then, click on the "Developer Tools" tab.
  • Once in the Developer Tools, locate and click on the "Network" tab.
    • Ensure the Record button (red circle) is active and then reproduce the issue or reload the page.
    • Once captured, click the Export HAR icon and save the file.

Safari

Safari does not automatically sanitize HAR files. Review before sending.

  • Begin in your Safari browser, and access your settings. Once in the Safari settings, click on the "Advanced" option.
  • Locate and click on "Show features" for web developers.
  • Navigate to the menu bar and click on the "Develop" button. Then locate and click on the "Show Web Inspector" button.
    • Open the Network tab and click the trash icon to clear old logs. Then, reload or reproduce the issue that is occuring on the page.
    • Once loaded, click Export in the top-right corner and save your HAR file.