---
title: Troubleshoot AJAX data collection
source: https://docs.newrelic.com/docs/browser/new-relic-browser/troubleshooting/troubleshoot-ajax-data-collection
---

## Problem

You are not seeing [AJAX data](https://docs.newrelic.com/docs/browser/new-relic-browser/browser-pro-features/ajax-page-identifying-time-consuming-calls) for your browser app.

## Solution

If your application is instrumented with [browser monitoring](https://docs.newrelic.com/docs/browser/new-relic-browser/installation-configuration/troubleshooting-browser-monitoring-installation) and is correctly collecting data for other [Pro features](https://docs.newrelic.com/docs/browser/new-relic-browser/browser-pro-features), follow these steps:

## Verify the page is instrumented [#verify-page-intrum]

If you are using XMLHttpRequest, use your browser's dev console to verify page has been correctly instrumented. Enter `XMLHttpRequest` and/or `fetch` into the console. If instrumentation failed, you will see something like:

````js
// XMLHttpRequest
ƒ XMLHttpRequest() { [native code] }
```

If you see anything else, then the verification has succeeded.


````

## Verify AJAX instrumentation is enabled [#verify-instrum]

AJAX instrumentation is not included in the lite agent.

To verify AJAX instrumentation:

1.  Open your browser console dev tool and check the `newrelic.initializedAgents` object. This object contains an entry for every agent running on the page. There is typically only one agent on a page.

2.  Inspect the initialized agent object for a `runtime` object. This object contains information about the running agent like `loaderType`. If `loaderType` is `lite`, AJAX instrumentation is not included in the agent being used.

3.  If the `loaderType` is not `lite`, you can also check the initialized agent for `config` and `features`
    objects.

    -   The `config` object will contain runtime configuration of the agent, including an `ajax` object with an `enabled` boolean.
    -   The `features` object should contain an entry for each feature initialized by the agent, including an `ajax` entry.

4.  Verify this AJAX object contains a boolean `enabled` of `true` and `featAggregate` entry.

If any of these items are not true, the AJAX instrumentation may not have initialized due to a configuration change in New Relic on the browser entity or possibly a manual change to the `NREUM.init` object that was copied and pasted into the HTML.

> #### ⚠️ IMPORTANT
>
> `newrelic.initializedAgents` is the accepted property to check for agent existence on a page, unless you are using an old or an unsupported agent version.

## Verify the deny list configuration [#verify-deny-list]

The agent can be configured to ignore certain domains and paths when creating [AjaxRequest Events](/attribute-dictionary/?event=AjaxRequest).

Use your browser's dev console to check the current AJAX deny list rules by running `newrelic.init`. Look for a property `ajax` containing an array called `deny_list`.

If you see entries in the deny list that are unfamiliar or causing AJAX calls to be filtered, review the [Filter AjaxRequest Events](https://docs.newrelic.com/docs/browser/new-relic-browser/configuration/filter-ajax-request-events/) documentation for further guidance.

## Verify network access [#verify-network-access]

If the object is properly instrumented, try triggering an AJAX call in your application while monitoring network traffic in the browser's developer tools. Wait up to one minute, and look for a call to `bam.nr-data.net/jserrors` with an `xhr` parameter. If the call fails, check for network issues. Alternatively, look for a request to `bam.nr-data.net/events` with a payload that starts with `bel.7;2`.

If you don't see this call, if it fails with an error not related to network access, or if it succeeds but you still aren't seeing data, continue through the troubleshooting documentation.

## Review how JSONP affects requests [#jsonp]

If your requests use [JSONP](https://en.wikipedia.org/wiki/JSONP), these requests will not appear on the [AJAX UI page](https://docs.newrelic.com/docs/browser/new-relic-browser/browser-pro-features/ajax-page-identifying-time-consuming-calls).

However, you can view them as assets within [session traces](https://docs.newrelic.com/docs/browser/new-relic-browser/browser-pro-features/session-traces-exploring-webpages-life-cycle).

If you're using SPA monitoring, you can view them on the **AJAX** tab of the **Page views** page.

Requirements for JSONP to be recognized:

-   Each JSONP request must use a unique callback function. Most popular libraries (like jQuery) generate a unique callback function dynamically for each request.
-   The query string containing the callback function name must be named `"callback"` or `"cb"` in order to be recognized by New Relic. This is the default behavior in most popular libraries.

## Troubleshoot payload capture issues [#payload-capture-issues]

If you see basic AJAX data but payload capture isn't working as expected, check these common issues:

**Payloads not appearing**

If you've enabled payload capture but don't see the new attributes in your `AjaxRequest` events:

1.  **Verify the capture mode**: Ensure `capture_payloads` is set to `failures` or `all` (not `none`).
2.  **Check agent version**: Confirm you're running browser agent version 1.317.0 or higher. You can check this in the agent configuration or via the `agentVersion` attribute on your telemetry.
3.  **Review deny list**: If the endpoint is on the deny list, no data (including payloads) will be captured. Check your deny list configuration in the browser app settings.
4.  **Check for GraphQL error signature**: For `failures` mode with 200 status codes, the agent looks for error indicators in the response body. If your GraphQL API uses a non-standard error format, payloads may not be captured.

**Payloads are truncated**

All payload attributes are hard-capped at 4096 bytes. When data is truncated:

-   The agent replaces the last 4 bytes with ` …` (ellipsis with a space) to indicate truncation
-   You can still query and search the captured portion
-   For full payloads exceeding 4KB, consider logging them separately or using session replay to see the full network activity

**Sensitive data is visible in payloads**

If sensitive information appears in captured payloads:

1.  **Add obfuscation rules**: Create regex patterns in the [obfuscation settings](https://docs.newrelic.com/docs/browser/new-relic-browser/configuration/obfuscate-browser-agent-data) to mask the data before ingest.
2.  **Use out-of-the-box patterns**: The browser agent includes default patterns for credit cards and SSNs that apply to `AjaxRequest` events.
3.  **Update the deny list**: For endpoints that should never be captured, add them to the deny list to exclude them entirely.

**Performance impact**

Payload capture adds data to each `AjaxRequest` event, which can increase:

-   **Network bandwidth**: Payloads are sent to New Relic as part of the harvest payload.
-   **Data ingest costs**: More event data results in higher data consumption.
-   **Agent overhead**: Serializing and obfuscating payloads adds minimal CPU time.

To minimize impact:

-   Start with `failures` mode to capture only error cases.
-   Use obfuscation rules to reduce payload size. Avoid excessive or complicated obfuscation patterns.
-   Monitor your data ingest dashboard to track volume changes.

**Content-type filtering**

Payload bodies are captured only for human-readable content types. Supported types include:

-   `text/*` (e.g., `text/html`, `text/plain`)
-   `application/json`
-   `application/xml`
-   `application/xhtml+xml`
-   `application/ld+json`
-   `application/yaml`
-   `application/x-www-form-urlencoded`

    Binary content types (images, videos, PDFs) are excluded automatically. If you're not seeing a payload for a specific request, check the `Content-Type` header to ensure it's in a supported format.

> #### 💡 TIP
>
> If any of these troubleshooting steps fails or you are still having issues with missing AJAX data, get support at [support.newrelic.com](https://support.newrelic.com).
