Session replay plays back real user interactions, masked by default to protect what users typed and saw. Read the docs
Checking for browser agent…
New Relic session replay

Everything's
asterisks.

By default, a session replay shows nothing but asterisks: every word, every input, masked before it ever leaves the browser. This page forces a replay to run, then shows you exactly what stays hidden and what you can choose to reveal.

This app samples only 10% of sessions into full replay recording. newrelic.recordReplay() forces this one into full recording regardless, which is what the first button below does.
// Masked by default: shows as **** **** in a replay
<span>Premium Widget</span>

// Unmasked on purpose
<span class="nr-unmask">Premium Widget</span>

// Excluded entirely: an empty box, not even asterisks
<div data-nr-block>...</div>

// Field stays visible, your typing never does
<input class="nr-ignore">
Your data is tagged as … NR-XXXX Change

Everyone shares one New Relic account, so your activity is tagged as demoUser and demoCode custom attributes (your name is also set as your end-user ID via setUserId()), carried onto whatever gets recorded below.

Write this code down. You will search for NR-XXXX in the queries further down. It stays the same on every page until you click New code or close this tab.

Try it / See the contrast

Force it, then look at it

This page can't read back whether a replay actually started or what it looks like. Only New Relic's own player can show you that. The activity feed on the right only narrates what was called locally. Click Start recording first, work through the rest, then check the queries below.

How replay actually behaves

Masked by default, recorded by luck, unless you force it

Masked by default: every bit of text and every input on this site renders as asterisks in a replay unless explicitly unmasked. This isn't a quirk of this demo, it's New Relic's own recommended default setting. Every replay recorded on this site before this page existed is a wall of asterisks.

recordReplay() / pauseReplay(): this app only samples 10% of sessions into full recording (sampling_rate: 10). recordReplay() forces this session into full recording regardless of that roll, agent v1.240.0+, which is the only reliable way to guarantee this demo produces something to look at.

The lead-up problem: this snippet also has preload: false, so a session waiting on an error (error_sampling_rate: 100) isn't buffering anything beforehand. If an error happens, the replay only starts recording from that moment forward, it can't rewind. Calling recordReplay() up front is the only way to capture what led up to whatever you're about to click.

nr-unmask / nr-block / nr-ignore: three ways to override the default. nr-unmask makes specific text readable again. nr-block excludes an element and its children entirely, an empty box in the replay, not just masked text. nr-ignore keeps an input field visible but never records what you type into it.

1 · Force it to run

recordReplay() / pauseReplay()

Click Start first. It skips the 10% sampling roll for this session. Then try the cards below, then check the queries further down.

Nothing sent yet.

2 · Mask vs unmask

Same text, two outcomes

Both lines below render identically on this page right now. In a replay, only one of them stays readable.

Unmasked (nr-unmask): Premium Widget, SKU NR-9821

Masked (the default, no class at all): Premium Widget, SKU NR-9821

3 · Ignored input

Visible field, invisible value

Type anything below. The field stays visible in the replay. What you type into it never does.

4 · Block vs leave it

One disappears, one doesn't

Both boxes below look identical right now. In a replay, the blocked one is an empty placeholder: nothing recorded, not even masked text.

Blocked
data-nr-block
Not blocked
plain div
Find it / Search the shared account

Find your replay

This step works differently than the other demo pages. There's no SessionReplay event you can query directly. Replays aren't stored as flat rows, they're a recording you open in a player.

Find your session ID

  1. Run this to get the session ID tied to your own replay. hasReplay is true only when a replay actually exists for that event.
  2. Copy the session value from the result.

          
Open New Relic

Open the replay itself

  1. Go to one.newrelic.com, All Capabilities, Browser, and select this app.
  2. In the left-hand menu, click Session replay.
  3. Find the replay matching your session ID from the query above, and open it.

Watch for the contrast from the cards above: one line of text readable, one line all asterisks, an input field visible but empty of your typing, and a box that's simply gone.

Not finding your session?Make sure you clicked "Start recording" first. Without it, this session only had a 10% chance of recording anything at all.
Replay looks empty?Give it a minute or two. Replay data harvests on its own cycle, separate from other events.