Session replay triggers: keep the replays that matter
Keep a session's replay only when an error, a custom event, or a screen you choose happens in it, and let the device delete the rest
November 28, 2026
Jump to section
Vexo replay triggers keep a session's replay only when something you choose happens in it: an error or crash, one of your custom events, or a visit to one of your screens. The device deletes every other replay without uploading it, so it never counts toward your replay allowance. Replay triggers need vexo-analytics 1.16.0 or later, and you set them on your app's Settings page, under Mobile Tracking, with no code change.
Why keep only some session replays
Every Vexo plan includes 1,000 session replays a month. If most of your sessions go fine, the replays you open are the few where something went wrong. Without triggers, a session where someone browses for a minute and leaves uses your allowance the same way as a session that explains a bug.
With replay triggers, the allowance goes to the sessions that answer a question you have: the ones with an error, a checkout_failed event, or a visit to your Checkout screen. Because the device deletes the other recordings before they're uploaded, fewer recordings of your users leave their phones, and the replays list holds the sessions worth watching.
Your analytics don't change. The Vexo SDK records the events, screens, taps, and errors of every session either way, so funnels, retention, and error counts still cover everyone. Triggers decide only which session replays Vexo keeps.
How Vexo decides which replays to keep
With any trigger set, each device still records every session it would have recorded before. As it records, the Vexo SDK notes the errors, custom events, and screens in the session, including the screen the session opened on. The Vexo SDK decides whether to keep the replay when the recording ends:
- When the app goes to the background.
- 5 seconds before the replay length limit. The recording engine stops and uploads a replay on its own at the limit, so the SDK decides just before. Vexo mobile replays run up to 5 minutes on the Free plan and 15 minutes on paid plans.
At that moment:
- If a trigger fired, the device uploads the replay as usual. The replay covers the whole session up to the length limit, including what happened before the trigger, so you see how the person got there.
- If no trigger fired, the device deletes the replay. The replay is never uploaded or stored, and Vexo doesn't count it: Vexo counts a replay toward your allowance only when a device uploads it.
With no trigger set, every recorded session keeps its replay, as before.
Example: keep the replays behind failed checkouts
Say some purchases in your app fail, and your code sends a custom event named checkout_failed when the payment step returns an error. You want to watch those sessions, and you don't need replays of people who browse and leave.
On your app's Settings page, under Mobile Tracking, you go to Replay triggers, select An error or crash happens, and add checkout_failed under One of these custom events is sent. Then you click Save tracking settings.
From then on, on devices with vexo-analytics 1.16.0 or later, a session keeps its replay when the person hits an error or a failed payment. That replay starts when the session started, so you watch the person add items, enter a card, and reach the failure, with the session's taps and network requests alongside. A session where the person only browses ends with its replay deleted on the device. Your monthly replays go to the sessions that show why checkout fails.
If you later want to compare failed checkouts with successful ones, add Checkout under One of these screens is visited, and every session that reaches the checkout screen keeps its replay.
Set up replay triggers
Replay triggers need:
- SDK:
vexo-analytics1.16.0 or later. Earlier versions ignore triggers and keep every replay. - A new native build: triggers are JavaScript only, but 1.16.0 also adds native code for other features, so run
pod installand rebuild, or make a new development or EAS build with Expo. - Expo: Development builds and EAS Build. Doesn't run in Expo Go.
- Plan: any. Replay triggers work on every Vexo plan.
npm install vexo-analytics@latestThen set the triggers in the Vexo dashboard:
- Open your app's Settings page, and go to Mobile Tracking.
- Under Replay triggers, set any of these:
- An error or crash happens: a handled error, an unhandled error, or a crash.
- One of these custom events is sent: the exact names of custom events, such as
checkout_failed. - One of these screens is visited: the exact screen names your app reports, such as
Checkout. Use the original name, not a display name you set under Screen names.
- Type a name and press Enter, or select Add. The field suggests your app's custom events and recent screens, and each list holds up to 50 names.
- Click Save tracking settings.
Devices read the triggers from your app's server config, so there's nothing to change in your code.
Limits of Vexo replay triggers
- Triggers only drop replays. Enable session replays,
sessionReplaySampleRate, andsessionReplay: falsestill decide whether a session records at all. If you sample replays in your code, triggers keep only the sampled sessions that match, so to keep every session with an error, don't sample. - A late trigger doesn't count. A trigger that fires in the last 5 seconds before the replay length limit, or after it, doesn't keep the replay.
- The next recording can start late. A session that starts within 3 seconds of a deleted replay starts recording up to 3 seconds late, while the engine finishes deleting.
- The first moments of a launch can't be deleted. Before a device first syncs with Vexo, it can't delete a replay yet, so that replay is uploaded and counts toward your allowance.
For every option, see Replay triggers in the Vexo docs.