Skip to content

How to Enable Real User Monitoring


Introduction

In the era of universal internet access, users are spending increasing amounts of time accessing the web, mini-programs, Android, iOS, and other media. With more applications competing for user attention and frequent updates to products and services, understanding in detail where users come from, which pages they viewed, how long they stayed, and how quickly they accessed content—not only helps uncover the real needs behind each user's behavior but also stabilizes and improves the conversion rate of existing traffic. It further contributes to optimizing both products and services, achieving genuine user growth and improved performance.

TrueWatch provides real user monitoring for Web, Android, iOS, and mini-program platforms. After completing application integration, you can quickly view and analyze various types of user browsing behaviors and related performance metrics on the "Real User Monitoring" dashboard in your workspace, helping measure the end-user experience of websites and applications.

Prerequisites

Procedure

DataKit supports real user monitoring data collection by default.

Step1: Create a Task

  1. Log into TrueWatch console, navigate to the "Real User Monitoring" page, click "Create Application" at the top left corner, and enter an "Application Name" and "Application ID" in the new window.

  2. Select the "Application Type" and follow the prompts under "SDK Configuration" to integrate data.

  3. Click "Create" to enable real user monitoring for the relevant application.

Step2: Configure Application Integration

Taking the "Synchronous Load" configuration for a web application as an example, the steps are as follows:

a. Copy the code from the current page and modify the required configuration information in the code according to the instructions. For example, change the script’s datakitOrigin address to the DataKit address (the host address where DataKit is installed).

b. Access the target application being monitored and add the copied code to the first line of the corresponding HTML page.

c. Save and exit after making changes.

For more details, refer to the following documents:

Step3: View Real User Monitoring Data

In TrueWatch workspace, go to "Real User Monitoring," then click any application to view its associated user access behaviors, sessions, page performance, resource performance, errors, and more.

Advanced References

Data Sampling

TrueWatch supports customizing data sampling rates to control the volume of data reporting, optimizing data storage and collection efficiency. During application integration, you can customize the percentage of collected data through resourceSampleRate (resource data sampling rate) and sampleRate (metrics data sampling rate).

For more details, please refer to the document How to Configure Real User Monitoring Sampling.

Generate Metrics

To help you design and implement new technical indicators based on your needs, TrueWatch supports generating new metric data based on existing data within the current workspace. Use the "Generate Metrics" function under "Real User Monitoring."

For more details, please refer to the document Real User Monitoring - Generate Metrics.

Sourcemap

When applications are deployed into production environments, files are often transformed and compressed during the packaging process to prevent code leakage and other security issues. A sourcemap acts as an information file that records the original source code locations corresponding to the processed code, serving as a bridge between pre-processed and post-processed code to simplify bug location in production environments. TrueWatch provides sourcemap functionality for web applications, supporting de-obfuscation of minified code to facilitate debugging in the source code when troubleshooting errors, helping users resolve issues faster.

For more details, please refer to the document Sourcemap Conversion.

Self-created Tracing

TrueWatch allows you to create custom tracing tasks via "Real User Monitoring" to monitor custom tracing paths in real-time. By defining tracing paths in advance, you can centrally filter trace data, precisely query user experience, and promptly detect vulnerabilities, anomalies, and risks.

For more details, please refer to the document Self-created Tracing.