Session Replay 101

Session Replay records what real users do in your product and plays it back like a DVR, with a synced dev tool panel showing console logs, network requests, and errors at the exact moment they happened.

Anatomy of a replay

When you head to Session Replay in PostHog, you'll be greeted with a player Fig. 1 with all your recordings. You'll spend a lot of time here, so let's go on a tour.

The session replay page: the list of recordings on the left, the player in the middle, the event list on the right
Fig. 1The replay page: pick a session on the left, watch it in the middle, read what happened on the right.Hover over the figure to learn about each element.

Select a session on the left and it plays back in the middle, with everything PostHog knows about it on the right. That context is what makes PostHog's Session Replay powerful.

Session context

The right-hand inspector lets you watch replays in context of your PostHog data. They add context so you can answer the who, what, when, where, and how of each replay. You can follow from replay to persons, events, logs, errors, and more.

You'll find them all on the right of the player Fig. 2.

A session playing back on the left, with the inspector's event list beside it
Fig. 2The player up close: the session on the left, everything PostHog recorded about it on the right.Hover over the figure to learn about each element.

What's actually recorded

Recordings come from your PostHog SDKs. Session Replay is supported by the JavaScript web, React Native, iOS, Android, and Flutter SDKs.

These replays are not videos on the web. The SDK takes a full snapshot of the page's DOM, then records only what changes – clicks, scrolls, mutations – and the player rebuilds the page from that stream. This helps keep cost low and minimize performance implications.

SDKWhat it records
JavaScript webThe DOM, rebuilt in the player
Android, iOSA wireframe of the view hierarchy, rather than the real look and feel, unless you turn on screenshot mode
React Native, FlutterAlways screenshot mode

Install and turn it on

None of it works until a PostHog SDK is in your app. The wizard installs and configures one for you, or you can install it yourself.

npx @posthog/wizard

Recording is a project setting as well as an SDK one, so switch it on in project settings before you expect to see anything. We'll go over configuration decisions in the next page.