---
title: Error Analysis - WebView
description: How to use Contentsquare Error Analysis in webviews within your mobile app
lastUpdated: 22 January 2026
source_url:
  html: https://docs.contentsquare.com/en/webview-tracking-tag/error-analysis/
  md: https://docs.contentsquare.com/en/webview-tracking-tag/error-analysis/index.md
---

Note

This feature is part of [Experience Monitoring ↗](https://contentsquare.com/platform/experience-monitoring/), which is only available on Enterprise plans or as an add-on to Pro plans. Contact your Customer Success Manager or [sales ↗](https://contentsquare.com/request-a-demo/) to learn more.

Contentsquare allows you to collect similar error types as in a web project: JS errors, API errors and Custom errors.

## WebView error tracking prerequisites

In order to collect WebView errors, Error Analysis needs to be set up on the native side. See the dedicated documentation: [iOS](https://docs.contentsquare.com/en/ios/error-analysis/) and [Android](https://docs.contentsquare.com/en/android/error-analysis/).

## How WebView error tracking works

Similar to analytics events and Session Replay, once set in WebView mode, the web tracking tag will collect errors and pass them to the native SDK, which will then send them to the dedicated Apps project.

Each error type has a collection setting that needs to be enabled by your Contentsquare Implementation manager.

## JS errors

Similar to web context, JS errors are collected out of the box if the collection is enabled in the web project associated with the tracking tag loaded in the page.

Find more information on how Contentsquare handles JS errors in our [JavaScript errors Help Center article ↗](https://support.contentsquare.com/hc/en-us/articles/37271820978449).

## API errors

Similar to web context, API errors are collected out of the box if the collection is enabled in the web project associated with the tracking tag loaded in the page.

Find more information on how Contentsquare handles API errors in our [Analyzing API errors Help Center article ↗](https://support.contentsquare.com/hc/en-us/articles/37271807561873).

### Removing Personal Data in request URL path

By default, the API errors feature collects the URL path of the failed API requests. To prevent the collection of Personal Data in the URL path, you can rewrite the request URL path. Follow the web documentation dedicated section: [Removing Personal Data in API errors](https://docs.contentsquare.com/en/web/personal-data-handling/#removing-personal-data-in-api-errors).

### API Troubleshooting Details

Note

This is an on-demand feature. Reach out to your Contentsquare contact to enable it.

API errors troubleshooting details enables you to collect more information about API errors so you can troubleshoot errors faster.

With this feature you will be able to see three types of additional API error details in the Event Stream of Session Replay.

* The HTTP headers of the request and the response.
* The body (the data sent by the request or received in the response).
* The query parameters for the URL of the requested endpoint.

#### Where to configure API troubleshooting details

Similar to the collection settings, the Tag loaded in WebView mode will apply the API troubleshooting details rules inherited from the configuration defined in the associated web project.

See [API Troubleshooting Details ↗](https://support.contentsquare.com/hc/en-us/articles/37271885035537) for more details.

Warning

The encryption used for WebView API errors will be the one from the mobile project.

## Custom errors

Follow the web documentation section to implement custom error collection: [Sending custom errors](https://docs.contentsquare.com/en/web/sending-custom-errors/).

Find more information on how Contentsquare handles Custom errors in our [Custom errors Help Center article ↗](https://support.contentsquare.com/hc/en-us/articles/37271964822417).

## Validate WebViews error collection

If in-app features are enabled, you will be able to see the WebView errors collected as events in the SDK Logs and Log Visualizer. See [iOS Debugging and Logging](https://docs.contentsquare.com/en/ios/in-app-features/#debugging-and-logging) and [Android Debugging and Logging](https://docs.contentsquare.com/en/android/in-app-features/#debugging-and-logging) sections for more details about debugging and logging.

### WebView errors in SDK Logs

Check out SDK logs to validate WebView errors are properly collected:

* Android

  ```kotlin
  CSLIB: API Error (from WebView) - GET 401 https://api.client.com
  CSLIB: JS Error (from WebView) - <Error name> - <Message>
  CSLIB: Custom Error (from WebView): <Message> - Attributes: [key:value, key:value...]
  ```

* iOS

  ```swift
  CSLIB ℹ️ Info: API Error (from WebView) - GET 401 https://api.client.com
  CSLIB ℹ️ Info: JS Error (from WebView) - <Error name> - <Message>
  CSLIB ℹ️ Info: Custom Error (from WebView): <Message> - Attributes: [key:value, key:value...]
  ```

### WebView errors in Log Visualizer

Use [Log Visualizer ↗](https://support.contentsquare.com/hc/en-us/articles/37271699876625) from the Experience Analytics project to validate WebView errors are properly collected and received.
