home / skills / jeremylongshore / claude-code-plugins-plus-skills / implementing-real-user-monitoring

This skill helps you implement real user monitoring by guiding platform choice, metrics definition, and tracking code for Core Web Vitals and custom events.

npx playbooks add skill jeremylongshore/claude-code-plugins-plus-skills --skill implementing-real-user-monitoring

Review the files below or copy the command above to add this skill to your agents.

Files (5)
SKILL.md
3.6 KB
---
name: implementing-real-user-monitoring
description: Implement Real User Monitoring (RUM) to capture actual user performance data including Core Web Vitals and page load times. Use when setting up user experience monitoring or tracking custom performance events. Trigger with phrases like "setup RUM", "track Core Web Vitals", or "monitor real user performance".
version: 1.0.0
allowed-tools: "Read, Write, Edit, Grep, Glob, Bash(npm:*), Bash(rum:*)"
license: MIT
author: Jeremy Longshore <[email protected]>
---
# Real User Monitoring

This skill provides automated assistance for real user monitoring tasks.

## Overview

This skill streamlines the process of setting up Real User Monitoring (RUM) for web applications. It guides you through the essential steps of choosing a platform, defining metrics, and implementing the tracking code to capture valuable user experience data.

## How It Works

1. **Platform Selection**: Helps you consider available RUM platforms (e.g., Google Analytics, Datadog RUM, New Relic).
2. **Instrumentation Design**: Guides you in defining the key performance metrics to track, including Core Web Vitals and custom events.
3. **Tracking Code Implementation**: Assists in implementing the necessary JavaScript code to collect and transmit performance data.

## When to Use This Skill

This skill activates when you need to:
- Implement Real User Monitoring on a website or web application.
- Track Core Web Vitals (LCP, FID, CLS) to improve user experience.
- Monitor page load times (FCP, TTI, TTFB) for performance optimization.

## Examples

### Example 1: Setting up RUM for a new website

User request: "setup RUM for my new website"

The skill will:
1. Guide the user through selecting a RUM platform.
2. Provide code snippets for implementing basic tracking.

### Example 2: Tracking custom performance metrics

User request: "I want to track how long it takes users to complete a purchase"

The skill will:
1. Help define a custom performance metric for purchase completion time.
2. Generate JavaScript code to track the metric.

## Best Practices

- **Privacy Compliance**: Ensure compliance with privacy regulations (e.g., GDPR, CCPA) when collecting user data.
- **Sampling**: Implement sampling to reduce data volume and impact on performance.
- **Error Handling**: Implement robust error handling to prevent tracking code from breaking the website.

## Integration

This skill can be used in conjunction with other monitoring and analytics tools to provide a comprehensive view of application performance.

## Prerequisites

- Access to web application frontend code in {baseDir}/
- RUM platform account (Google Analytics, Datadog, New Relic)
- Understanding of Core Web Vitals metrics
- Privacy compliance documentation (GDPR, CCPA)

## Instructions

1. Select appropriate RUM platform for requirements
2. Define key metrics to track (Core Web Vitals, custom events)
3. Implement tracking code in application frontend
4. Configure data sampling and privacy settings
5. Set up dashboards for metric visualization
6. Define alerts for performance degradation

## Output

- RUM implementation code snippets
- Platform configuration documentation
- Custom event tracking examples
- Dashboard definitions for key metrics
- Privacy compliance checklist

## Error Handling

If RUM implementation fails:
- Verify platform API credentials
- Check JavaScript bundle integration
- Validate metric collection permissions
- Review privacy consent configuration
- Ensure network connectivity for data transmission

## Resources

- Core Web Vitals measurement guide
- RUM platform documentation
- Privacy compliance best practices
- Performance monitoring strategies

Overview

This skill helps you implement Real User Monitoring (RUM) for web applications to capture actual user performance data, including Core Web Vitals and page load times. It focuses on practical steps: choosing a platform, defining metrics, and installing lightweight tracking code. The goal is actionable outputs like code snippets, dashboard definitions, and a privacy checklist.

How this skill works

I guide platform selection by matching requirements to common RUM providers (Google Analytics, Datadog RUM, New Relic). I help design the instrumentation: which Core Web Vitals and custom events to collect, sampling strategy, and consent handling. I generate the JavaScript snippets and integration tips to embed in your frontend and explain how to configure dashboards and alerts for real-time visibility.

When to use it

  • Setting up RUM for a new website or web app
  • Tracking Core Web Vitals (LCP, FID/INP, CLS) across real users
  • Measuring page load metrics (FCP, TTI, TTFB) in production
  • Adding custom performance events like checkout time or signup latency
  • Validating performance improvements after frontend changes

Best practices

  • Respect user privacy: implement consent flows and minimize PII collection
  • Use sampling to limit overhead and storage costs while retaining signal
  • Keep the tracking script asynchronous and minimal to avoid adding latency
  • Validate metrics in staging before rolling to production
  • Add robust error handling and fallback so monitoring never breaks the user experience

Example use cases

  • Setup RUM for a new single-page application and track LCP, CLS, and FCP
  • Add a custom metric to measure time from 'add to cart' to completed checkout
  • Configure Datadog or New Relic to visualize Core Web Vitals and trigger alerts on regressions
  • Instrument a marketing landing page to compare real user load times across regions
  • Implement consent-aware sampling to remain GDPR/CCPA compliant

FAQ

What platforms do you recommend for RUM?

Choose based on your needs: Google Analytics for general analytics, Datadog or New Relic for integrated observability with tracing and APM; prioritize vendor SLA, data retention, and privacy features.

How do I limit performance impact of RUM scripts?

Load scripts asynchronously, apply client-side sampling, send minimal payloads, and use batching to reduce network requests; profile the bundle to ensure sub-millisecond overhead.