Skip to main content

Datadog RUM

What is Datadog RUM?

Datadog Real User Monitoring (RUM) is a tool that helps you understand and analyze the real user experience on your web applications. It provides insights into user interactions, performance, and errors by collecting data directly from users’ browsers.

Key Features:

  • Tracks user sessions and actions (clicks, page loads, custom events).
  • Monitors application performance (load times, rendering, etc.).
  • Detects JavaScript errors and performance bottlenecks.
  • Integrates seamlessly with other Datadog products for end-to-end monitoring.

How Datadog RUM Works

  1. RUM SDK Integration: Install the Datadog RUM SDK in your application to start collecting data. Arc web setup
  2. Data Collection: The SDK collects information on user sessions, actions, errors, and network requests.
  3. Data Analysis: Use Datadog’s web interface to filter and analyze user behavior and performance metrics.

Session Analysis

Datadog RUM groups user activities into sessions to provide a holistic view of user interactions.

Key Metrics:

  • Session Duration: Total time a user spends on the application.
  • User Actions: Clicks, navigation, custom actions.
  • Errors: JavaScript errors during a session.
  • Performance Metrics: Page load times, rendering performance, etc.

Steps to Analyze Sessions:

  1. Open the RUM Explorer in Datadog.
  2. Use filters like Session ID, User, or Location to narrow down the session data.
  3. Drill down into specific sessions to view detailed information about user actions, errors, and network requests.

Implementing UX monitoring in a project

Datadog RUM can track user interactions with specific elements on your web page by using HTML selectors. This can be very useful to track user interactions that were made in the past. Using the Product Analytics > HeatMaps, we can get the HTML selectors for most clicked elements.

What are HTML Selectors?

HTML selectors are patterns used to identify elements on a web page (e.g., id, class, or data-* attributes).

Tracking Clicks on Specific Elements

To monitor clicks on specific elements:

  1. Define the Selector: Identify the element using CSS selectors.
    • Example: A button with the ID #submit or a class .checkout-button.
  2. Set Up a Custom Action: Use the RUM SDK to track clicks programmatically.
    DD_RUM.addAction('custom_click', {
    element: 'Submit Button',
    selector: '#submit',
    });
    In the session explorer we can track these actions by the action name and/or the data we added.

Datadog RUM Data Retention Policy

warning

Datadog RUM data is retained for a maximum of 60 days.

For more detailed information, please refer to the Datadog Data Collection, Resolution, and Retention documentation.