Error Analysis

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

WebView errors tracking prerequisites

Section titled WebView errors tracking prerequisites

In order to collect WebView errors, Error Analysis tracking needs to be setup in the main app. See the dedicated documentation: iOS | Android.

How WebView errors tracking works

Section titled How WebView errors 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 main SDK that will send them to the dedicated Apps project.
  • Each error type has a collection setting that needs to be enabled by your Contentsquare Implementation manager.

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

Find more information on how Contentsquare handles JS errors in our JavaScript errors Help Center article.

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

Find more information on how Contentsquare handles API errors in our Analyzing API errors Help Center article.

Removing Personal Data in request URL path

Section titled 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 the API errors.

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

Section titled Where to configure API troubleshooting details

Similar to the collection settings, the Web Tracking Tag loaded in WebView mode will apply the API troubleshooting details rules inherited from the configuration defined in the associated web project. If you have already set up some rules for the web context, they will also be applied in the WebView mode.

See API Troubleshooting Details for more details.

Follow the web documentation section to implement custom error collection: Sending custom errors.

Find more information on how Contentsquare handles Custom errors in our Custom errors Help Center article.

Validate WebViews error collection

Section titled 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 and Android Debugging and Logging sections for more details about debugging and logging.

Checkout SDK logs to validate WebView errors are properly collected:

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...]

WebView errors in Log Visualizer

Section titled WebView errors in Log Visualizer

Use Log Visualizer from the CS Apps project, to validate and WebView errors are properly collected and received.