Skip to main content

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.
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 the InfiniteWatchProvider for automatic tracking.
The provider should wrap your entire app so all pages are tracked.

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.