Targeted Replay Capture
Targeted Replay Capture (TRC) is a per-project feature in Amplitude Session Replay that captures session replays based on specific criteria, rather than capturing all sessions or relying on random sampling. Focus your replay quota on the most important user behaviors, workflows, or segments.
Configure Targeted Replay Capture by adding conditions to the Sampling control in your project's Session Replay settings. Customize capture criteria with conditions like multiple events, event properties, or user properties. Combine criteria within a single filter or across filters with OR logic. The Session Replay SDK fetches targeting configurations from a remote config service and evaluates them at runtime to decide whether to capture a session.
Key capabilities
TRC defines the criteria that Amplitude uses to decide whether to capture a session, and helps you manage your Session Replay quota more efficiently.
Custom capture criteria
Define rules that capture replays based on:
- Specific events: For example,
Checkout Started. - Event properties: For example,
plan = Pro. - User properties: For example,
country = US. - Page URLs: For example, capture only sessions on
/checkoutor any URL matching a pattern. - Combinations: Combine these criteria with
ORlogic.
Configuration and quota management
Manage TRC through the Session Replay settings page by adding conditions to the Sampling control. Add, edit, and remove targeting conditions for each project. The UI estimates how much quota each condition uses based on historical traffic. Set different sample rates for different conditions to control which sessions Amplitude captures and how much quota each condition uses.
Use cases
- Capture replays only for users who encounter errors or drop off at key points.
- Focus on high-value user segments or critical product flows.
- Reduce noise and cost by avoiding unnecessary replay capture.
Prerequisites
Before you configure Targeted Replay Capture, ensure you meet these requirements:
- You're using the Session Replay Browser SDK Plugin version
@amplitude/plugin-session-replay-browser@1.22.0or higher. TRC doesn't work with the standalone SDK except for URL matching. - URL matching requires one of the following:
- Plugin:
@amplitude/plugin-session-replay-browser@1.26.2or higher. - Standalone SDK:
@amplitude/session-replay-browser@1.32.2or higher.
- Plugin:
- You have the appropriate permissions to manage settings in your org and project. For more information, refer to Manage Session Replay and Heatmap settings.
Configure Targeted Replay Capture
You configure Targeted Replay Capture per project. To configure it:
- Navigate to Settings > Organizational Settings > Session Replay Settings. For more information, refer to the Session Replay settings page.
- Select the project you want to configure.
- In the Sampling section, select Add Condition to create a new targeting condition.
- Define your targeting criteria for the condition.
Add multiple conditions and combine them with OR logic. Each condition can include:
- Event types.
- Event properties.
- User properties.
- Page URLs.
You must capture and send events, event properties, and user properties to Amplitude during the session for targeting conditions to work.
SDK support
TRC requires the Amplitude Browser Analytics SDK with the Session Replay Browser SDK Plugin version @amplitude/plugin-session-replay-browser@1.22.0 or higher. Integrate both the Amplitude Browser Analytics SDK and the Session Replay Plugin into your setup to use TRC.
URL matching support requires one of the following:
- Plugin:
@amplitude/plugin-session-replay-browser@1.26.2or higher. - Standalone SDK:
@amplitude/session-replay-browser@1.32.2or higher.
Standalone SDK not supported
Targeted Replay Capture doesn't support the standalone SDK. Use the Session Replay Browser SDK Plugin instead.
Evaluation timing
The SDK fetches the targeting configuration at session start and uses that configuration for the entire session. If an event matches later in the session, the SDK evaluates the event against that original configuration. Updates to targeting rules apply only to new sessions.
Capture timing
Session replay capture begins only after the target event occurs. TRC has no "lookback" period. Replays don't capture events before the targeting condition triggers. The replay starts when the target event triggers, not at the beginning of the session.
Was this helpful?