Overview
The@infinitewatch/react SDK provides a React provider component that wraps your app and automatically handles session recording.
Step 1: Installation
Step 2: Environment Variables
Create an environment file with your organization ID.- Vite
- Create React App
Add to your
.env file:Replace
YOUR_ORGANIZATION_ID with your actual organization ID. You can find this in your InfiniteWatch dashboard.Step 3: Basic Setup
Wrap your app with theInfiniteWatchProvider for automatic tracking.
- Vite
- Create React App
Identify Users
After the provider is set up, you can associate sessions with specific users:Call
identify() after the user logs in. The external_id is persisted in a cookie so it carries across page reloads and sessions.