Session Replay for Laravel
Record what a person did in the browser with rrweb, keep the recording on your own disk and database, and watch it inside your own app behind a gate you define. One Blade directive records; nothing has to be built or published. Free and open source (MIT).
- Repository: github.com/packstub/session-replay
- Packagist: packstub/session-replay
- Support: GitHub issues
In a Filament panel, Filament Session Replay puts the sessions, the player and the masking macros on top of this package.
Features
- One Blade directive:
@sessionReplaybefore</body>records the page, with nothing to build or publish. - Private by default: every input masked, no IP address stored, consent and an anonymous mode when you need them.
- Recordings stay with you: gzip chunks on any filesystem disk (local, S3, R2), the index in five tables on your connection.
- Markers on the timeline: errors, failed Livewire requests, web vitals, rage clicks, page views and your own moments.
- Only when something goes wrong: keep the last minute in the browser and upload it on an error, after asking if you like.
- Small recordings: stylesheets stored once, unused attributes dropped, batches gzipped in the browser.
- A gate decides who watches:
viewSessionReplayguards the list, the player and every file behind them. - Identity without a session: who is signed in travels in a signed token, so any guard and any tenancy setup works.
- A link in every log line: the recording's id and URL in Laravel's
Context.
Guides
| Guide | What it covers |
|---|---|
| Installation | Requirements, the install command, the directive, the gate, the scheduler, the routes |
| Recording | The directive and its options, who is recorded, sessions and sampling, markers, the browser API, Livewire, CSP, known limits |
| Privacy | What is and is not recorded, masking and blocking, consent, guests, retention, wording for a privacy policy |
| Watching replays | The viewSessionReplay gate, the built-in viewer, the player component, links, models and scopes |
| Storage | Disk layout, the tables, multi-tenant apps, sizes and limits, pruning, S3 |
| Error tracking | The recording in Laravel's Context, and where it shows up |
| Configuration | Every key in config/session-replay.php |