IntroductionSection titled Introduction
PrerequisitesSection titled Prerequisites
Contentsquare SDK is includedSection titled Contentsquare SDK is included
Update to the latest SDK versionSection titled Update to the latest SDK version
In order to enable Error Analysis in your app and get the most stable version, it is required to upgrade the SDK to its latest version.
Screen tracking implementedSection titled Screen tracking implemented
Tracking will start at the 1st screenview event, it is required to have screen tracking implemented. Make sure to follow the Flutter Track screens sections.
Reminder about User consentSection titled Reminder about User consent
If you are in the process of implementing the SDK for the 1st time (or choose to take this update as an opportunity to review your Privacy related implementation), make sure to follow the Flutter Privacy section and use the Opt-in API to get the user consent, otherwise no data will be collected.
Get StartedSection titled Get Started
Start the SDKSection titled Start the SDK
You do not need to do anything to start the Error Analysis SDK, it will start itself with Contentsquare SDK.
Validate SDK integrationSection titled Validate SDK integration
When the SDK starts, you should see a log like this one:
API ErrorsSection titled API Errors
Automatic network inspectionSection titled Automatic network inspection
API Errors automatically collects failed network requests.
Removing Personal Data in request URL pathSection 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 with the
Contentsquare.setURLMaskingPatterns SDK API.
Simply replace a step of the path - meaning between two slashes (/) - containing Personal Data with a variable:
- becomes CS_ANONYMIZED_USER_ID
- becomes CS_ANONYMIZED_ADDRESS
ExampleSection titled Example
ResultSection titled Result
|URL before anonymization||URL after anonymization|
Debugging and LoggingSection titled Debugging and Logging
If in-app features are enabled, a info log should appear with the details of the event (see Flutter Debugging and Logging section):
How API Errors worksSection titled How API Errors works
InitializationSection titled Initialization
The way our SDK works is by auto-starting with the application launch and automatically collects failed network requests.
ConfigurationSection titled Configuration
Once started, our SDK fetches its config from our servers. It will start collecting data from network events if the API Errors setting is enabled in the config (this is handled by the Contentsquare team).
TrackingSection titled Tracking
The SDK monitors only the API Errors with response code 400 and above, and generates analytics data. These events are then locally stored, and eventually sent to our servers in batches.
Sending dataSection titled Sending data
For each network error, a new event will be sent in analytics and Session Replay data. Check the following sections to learn more about how data is processed and sent:
API Troubleshooting DetailsSection titled API Troubleshooting Details
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 of the request endpoint (of the URL of the information you request for).
See API Troubleshooting Details for more details.
Collected data pointsSection titled Collected data points
Only network calls in error (response code 400 and above) will be collected.
Here the exhaustive list of data collected:
- URL (without query strings)
- HTTP method
- Response code
- Timestamp of the request
- Timestamp of the response
- HTTP headers of the request
- HTTP headers of the response
- HTTP body of the request
- HTTP body of the response
- Query parameters of the request endpoint
Known limitations and recommendationsSection titled Known limitations and recommendations
Conflict with Firebase Performance MonitoringSection titled Conflict with Firebase Performance Monitoring
AndroidSection titled Android
Contentsquare Error Analysis is not compatible with Firebase Performance Monitoring auto-collection. Only one of the two will log events, and usually, the events will be automatically logged by the Contentsquare Error Analysis. To log events to Firebase Performance Monitoring, we suggest logging it manually.
Contentsquare Error Analysis is compatible with Firebase Performance auto-collection, but the HTTP body from the response won’t be collected by the Error Analysis SDK.
Contentsquare Error Analysis may not be compatible with other network auto-collection tools.