Note, this article refers to the DevTools Console which is separate to the Contentsquare Console (used for the back-office management of your Contentsquare project/s). For more information about the Contentsquare Console visit this article instead.
About the DevTools Console
The DevTools Console is a developer tool available on web browsers, commonly used to understand what's happening in your website's code. It displays messages logged by the browser, or added by web developers themselves, which help to identify and troubleshoot problems, such as errors or network issues.
In Error Analysis you can view the console messages added by developers, to help you find and resolve any issues more quickly.
Console message log levels
Each message is assigned a log level, to help understand its importance. There are 5 log levels that can be tracked with console messages in Contentsquare:
- Error: used to record critical errors that can prevent a website from working as expected. It's recommended that these are investigated and resolved promptly.
- Warning: used to record anomalies that can lead to future problems. It's recommended that these are reviewed periodically to prevent issues.
- Info: used to record general information about a website's operation. These are useful to understand the normal flow of activities and behavior.
- Log: often used to record information that is not necessarily critical, but useful for debugging and tracing.
- Debug: typically used during development for debugging purposes. These logs are temporary and are expected to be removed from production code.
How to find and analyze console messages on the errors table
Use the errors table to locate and prioritize console messages.
1. From the main menu, click ‘Analyze > Error Analysis’.
2. From the top, set your Analysis Context to narrow down your analysis by device, date range and users.
3. Scroll down to the errors table.
4. From the errors table, narrow down the error list to find any console messages by using the ‘Filter’ button and selecting ‘Custom errors’.
5. Console messages are identifiable as ‘custom errors’, and include the following labels:
- A ‘CST’ error (custom error) type label.
- The log level (Warning, Error, Debug, Info, Log).
- The console message, for example: “The device orientation events are blocked by a permissions policy”.
How to view and act on console message details from the error side panel
As with all error types, you can find additional details and take further action from the error side panel.
1. From the errors table, click the ‘>’ arrow icon.
2. The error side panel will open where you can view the individual error details:
- Error type and log level.
- Grouped error ID.
- Console message.
From the error details you can:
- See the general error details.
- Dismiss the error (admin or expert user roles only).
- Send to JIRA (admin users only) or view the Jira ticket if one has already been created.
- Use the ‘...’ three dot menu to copy the error details or set up additional details.
- Use the ‘See Replays’, ‘See Impact’ and ‘See Journey Analysis’ buttons to dig deeper into the impact of the error.
How to view and act on console messages in Session Replay
1. Navigate to the error side panel of a console error and click the ‘See Replays’ button.
2. Session replay will open and you’ll be able to watch a replay where the error occurred.
3. The error details will be visible in the event stream, and in the timeline event icon tooltip.
4. Click the timeline tooltip and use the ‘Quantify’ button to further analyze the impact of the error.
FAQs
Why do I see errors/warnings coming from the tag?
To track arguments passed to console functions, the tracking tag needs to monkey patch these functions. Monkey patching is a known technique to extend the code of functions without altering the original source code. In doing so, the tracking tag will appear in the stack trace even if it's not the origin of the call. The tracking tag will never call the console to log errors.