rrweb event

An rrweb event is one entry in a recording's event stream: a JSON object with a numeric `type`, a type-specific `data` payload, and a millisecond `timestamp`. The typed format is stable across versions by design, so a recording made today replays the same way later and third-party tools can parse it.

How it works

The event types are: 0 DomContentLoaded, 1 Load, 2 FullSnapshot, 3 IncrementalSnapshot, 4 Meta, 5 Custom, and 6 Plugin. A minimal mouse-move event looks like:

JSON
{
  "type": 3,
  "data": {
    "source": 1,
    "positions": [{ "x": 320, "y": 180, "id": 42, "timeOffset": -50 }]
  },
  "timestamp": 1716220801456
}

Type 3 events carry a source field naming the change kind (see incremental source); the events documentation lists the event types and payloads, and node references use the numeric ids assigned at serialization. Because so many products store rrweb events, the format functions as a de facto interchange standard for behavioral data.

Where you encounter it

Anywhere recordings are stored or exported: PostHog exports, Sentry replays, and rrweb Cloud all speak this format. This page defines the event shape; downstream tools can parse the JSON event array directly.