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.
Analyzing console messages in Error Analysis
Console messages are identifiable as ‘custom errors’ in Error Analysis. When filtering to custom errors, both console messages and custom errors will be shown, as they share the same infrastructure.
Each error includes 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”.
Good to know: Console messages and Error Analysis performance
Depending on your site, you may experience a high volume of console messages. This can impact how quickly Error Analysis can load the data and metrics.
To help you focus on other errors, you can exclude console messages from Error Analysis anytime. This does not exclude them for any other users on your project and only affects that particular project.
Simply go to Error Analysis, click the 'Settings' button (top right) and enable the 'Ignore console messages' toggle.
How to filter console messages from the Error Explorer
Dive deeper into all console messages using the Error Explorer - apply advanced filtering, sort columns and search for specific errors.
- From Error Analysis, on the 'Search errors' widget click 'Search'.
-
Select 'Custom errors' and click 'Apply'.
-
Open 'Advanced filters'.
- Click on '+add custom attributes' and enter 'csLogLevel' in the key:
- use the "exists" operator to view all log levels
- use the "equals" operator to filter on a specific log level and enter one of the following values: Error / Warning / Info / Log / Debug
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 Error Analysis, click on a console message to open the error's side panel.
2. From the side panel, 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. From the error's side panel 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.