Session replay
Record user sessions for replay in Screeb, and start or stop the recording from your code when the workspace settings are not enough.
Session replay records what users see and do in your app, Screeb surveys and messages included, so you can watch the session in the Screeb admin. Once the SDK is installed, you turn it on and choose when recording starts in the workspace settings: see Configure session replay recording. No code is needed for that.
Write code only when the start conditions of the settings cannot express your case, for example to record a checkout flow from its first step.
Start and stop the recording
Section titled “Start and stop the recording”Starting the recording fails when session replay is off in the workspace settings.
import { Component } from "@angular/core";import { Screeb } from "@screeb/sdk-angular";
@Component({ selector: "app-checkout-replay", template: ` <button (click)="start()">Start recording</button> <button (click)="stop()">Stop recording</button> `,})export class CheckoutReplayComponent { constructor(private screeb: Screeb) {}
async start() { await this.screeb.sessionReplayStart(); }
async stop() { await this.screeb.sessionReplayStop(); }}Privacy
Section titled “Privacy”Mask or exclude sensitive elements with the Privacy helpers, and see Session replay privacy for the workspace options.