Session Replay Demo
This guide demonstrates how to instrument a web application for session replay using the ClickStack Browser SDK. Unlike other sample datasets that load pre-generated data, this demo provides an interactive application where you generate session data through your own interactions.
The demo application is a documentation explorer that showcases real-world session replay use cases, including search behavior, navigation patterns, and user interactions with code examples.
Time required: 10-15 minutes
Overview
This demo shows how session replay captures user interactions in web applications. Session replay is valuable for:
- Debugging issues - See exactly what a user experienced when encountering an error
- Understanding user behavior - Analyze how users navigate and interact with your application
- Improving UX - Identify friction points and drop-off patterns
- Support - Visually understand customer issues without lengthy descriptions
The demo application requires minimal instrumentation: one script tag and one initialization call. All user interactions are captured automatically.
Prerequisites
- Docker and Docker Compose installed
- Ports 3000, 4317, 4318, and 8080 available
Demo Steps
The demo consists of:
- ClickStack - The all-in-one observability stack (HyperDX UI, OTel Collector, ClickHouse)
- Demo Application - An instrumented documentation explorer built with vanilla JavaScript
- ClickStack Browser SDK - Captures all user interactions automatically
Clone the demo repository
Start ClickStack
Get your API key
- Open HyperDX at http://localhost:8080
- Create an account or log in if needed
- Navigate to Team Settings → API Keys
- Copy your Ingestion API Key
- Set it as an environment variable:
Start the demo application
Ensure you run this command in the same terminal where you exported the CLICKSTACK_API_KEY variable.
Open http://localhost:3000 in your browser and interact with the app.
All interactions are automatically captured by the ClickStack Browser SDK.
View your session replay
Return to HyperDX at http://localhost:8080 and navigate to Client Sessions from the left sidebar.
You should see your session listed with its duration and event count. Click the play button to replay it.
Switch between Highlighted and All Events modes to adjust timeline detail.
The instrumentation
The demo application shows how minimal session replay instrumentation can be. View the code in the cloned repository:
Include the SDK (app/public/index.html line 11):
Initialize ClickStack (app/public/js/app.js lines 1-17):
Everything else is standard application code. The SDK automatically captures all user interactions, console logs, network requests, and errors.
Using session replay in your application
Apply the same pattern to your web application:
- Include the ClickStack Browser SDK
- Initialize it with your configuration
- All user interactions are captured automatically
For framework-specific examples and configuration options, see the Browser SDK documentation.