Incremental source

The incremental source is the field inside an rrweb incremental snapshot that identifies what kind of change the event records, distinguishing DOM mutations from mouse movement, clicks, scrolls, viewport resizes, input changes, and other interaction types. It is how consumers of the event stream filter for the changes they care about.

How it works

Type 3 events carry data.source as a numeric enum. The events documentation lists the event sources and payloads. The common values are: 0 Mutation, 1 MouseMove, 2 MouseInteraction (clicks and similar), 3 Scroll, 4 ViewportResize, 5 Input, 6 TouchMove, 7 MediaInteraction, 8 StyleSheetRule, 9 CanvasMutation, 10 Font, 11 Log, 12 Drag, 13 StyleDeclaration, 14 Selection, 15 AdoptedStyleSheet, and 16 CustomElement. The split matters for analysis: counting source: 2 events with repeated targets finds rage clicks without ever rendering a replay.

Where you encounter it

In every pipeline that processes recordings programmatically: storage tiering (drop mousemove, keep mutations), analytics (clicks, scrolls), and AI summarization all branch on the source field.