---
title: Capture targeted sessions
description: "Focus your Session Replay quota on sessions matching events, properties, or page URLs you define instead of capturing all sessions or random sampling."
product: session-replay
lang: en
token_estimate: 1785
---
# Capture targeted sessions

> For AI agents: a documentation index is available at [/docs/llms.txt](/docs/llms.txt). Append `.md` to any page URL for markdown, or send `Accept: text/markdown`.

Targeted Replay Capture (TRC) focuses your Session Replay quota on sessions that match criteria you define, such as events, event properties, user properties, or page URLs, rather than capturing all sessions or relying on random sampling. Use TRC when you need to observe specific behaviors or high-value segments; if you only need broad session coverage, [configure a global sample rate](https://amplitude.com/docs/session-replay/configure-sampling) instead.

Configure TRC by adding conditions to the _Sampling_ control in your project's Session Replay settings. Each condition can match events, event properties, user properties, or page URLs, and you can combine conditions 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.

## Plan availability

Targeted Replay Capture is available as an add-on on the Growth and Enterprise plans. Go to [Amplitude pricing](https://amplitude.com/pricing) for plan details.

| Plan | Allowance | How to access |
| --- | --- | --- |
| Free | Not included | [Upgrade your plan](https://amplitude.com/pricing) |
| Plus | Not included | [Upgrade your plan](https://amplitude.com/pricing) |
| Growth | Not included | Available as an add-on. |
| Enterprise | Not included | Available as an add-on. |

_Availability reflects the latest Amplitude plans. If your organization is on an older plan, your access may differ. Check your plan under [Plans & Billing in your organization settings](/docs/admin/account-management/account-settings#organizational-settings), or contact your Amplitude account representative._

## 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 `/checkout` or any URL matching a pattern.
- **Combinations**: Combine these criteria with `OR` logic.

### Configuration and quota management

Manage TRC through the [Session Replay settings page](https://amplitude.com/docs/session-replay/session-replay-settings) 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.
- Capture sessions on specific pages or flows, such as checkout or onboarding.
- Reduce noise and cost by avoiding unnecessary replay capture.

## Configure Targeted Replay Capture

You need [permissions to manage Session Replay settings](https://amplitude.com/docs/admin/account-management/user-roles-permissions) and an SDK that supports your condition type. Check the [SDK support matrix](#sdk-support) before configuring conditions.

Configure TRC per project:

1. Navigate to _Settings > Organizational Settings > Session Replay Settings_. For more information, refer to the [Session Replay settings page](https://amplitude.com/docs/session-replay/session-replay-settings).
2. Select the project you want to configure.
3. In the _Sampling_ section, select **Add Condition** to create a new targeting condition.
4. 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.

> **Note:**
>
> You must capture and send events, event properties, and user properties to Amplitude during the session for event- and property-based targeting conditions to work. Page URL conditions evaluate the user's current URL directly and don't require a matching event.

## Page URL targeting

Page URL targeting captures replays only when users visit specific pages or URL patterns. This capability is in beta for web Session Replay.

Check [SDK support](#sdk-support) for the minimum plugin and standalone versions.

To add a Page URL condition:

1. In the _Sampling_ section, select **Add Condition** and open the condition editor.
2. Add a **Page URL** condition.
3. Select an operator and enter a URL or pattern.
4. Set the sample rate for the condition and save.

Supported operators:

| Operator | Matches when |
| --- | --- |
| is | The current page URL exactly matches the value you enter. |
| is not | The current page URL doesn't exactly match the value you enter. |
| contains | The current page URL includes the text you enter. |
| does not contain | The current page URL doesn't include the text you enter. |
| glob match | The current page URL matches a glob pattern. For example, `https://example.com/checkout/*` matches any checkout subpath. |

> **Tip:**
>
> Use Page URL targeting to focus replay capture on high-value flows such as checkout, onboarding, or account settings without capturing every session.

### How Page URL targeting evaluates

For URL evaluation and capture start behavior, go to [Evaluation timing](#evaluation-timing).

## SDK support

| Condition type | Browser plugin | Browser standalone SDK |
| --- | --- | --- |
| Events, event properties, and user properties | `@amplitude/plugin-session-replay-browser@1.22.0` or higher, with the Amplitude Browser Analytics SDK | Unsupported |
| Page URLs | `@amplitude/plugin-session-replay-browser@1.26.2` or higher | `@amplitude/session-replay-browser@1.32.2` or higher |

Event- and property-based targeting requires the [Session Replay Browser SDK Plugin](https://amplitude.com/docs/sdks/session-replay/session-replay-plugin) with the Amplitude Browser Analytics SDK. The standalone SDK supports Page URL targeting only.

## Evaluation timing

The SDK fetches targeting configuration at session start. Event-, property-, and user-based conditions use that configuration throughout the session, including when a matching event occurs later. Updates to targeting rules apply only to new sessions.

The SDK evaluates Page URL conditions against the current browser URL and re-evaluates when the URL changes, including single-page app navigation. After a session meets targeting conditions, capture continues for the remainder of the session.

> **Note:** Capture timing
>
> Capture starts when the targeting condition triggers. For event-based conditions, capture starts when the matching event fires. For Page URL conditions, capture starts when the URL matches. TRC has no lookback period: replays don't include activity before the condition triggers.

