Documentation Index
Fetch the complete documentation index at: https://private-7c7dfe99-page-updates.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
TL;DRThis guide walks through instrumenting 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.Time required: 10-15 minutes
Overview
The session replay demo application is a documentation explorer built with vanilla JavaScript. It demonstrates how minimal session replay instrumentation can be — one script tag and one initialization call captures all user interactions automatically. The repository includes two branches:main— fully instrumented and ready to use immediatelypre-instrumented— a clean version without instrumentation, with code comments indicating where to add it
main branch first to see session replay in action, then walks through the instrumentation code so you can apply the same pattern to your own application.
For background on what session replay is and how it fits into ClickStack, see the Session Replay feature page.
Prerequisites
- Docker and Docker Compose installed
- Ports 3000, 4317, 4318, and 8080 available
Running the demo
Clone the 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.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 ▶️ button to replay it.Switch between Highlighted and All Events modes to adjust the level of detail on the timeline.The instrumentation
The demo application shows how little code is needed to enable session replay. Two additions to the application are all it takes: 1. Include the SDK (app/public/index.html):
app/public/js/app.js):
Try it yourself
To instrument the app from scratch, switch to thepre-instrumented branch:
app/public/index.html and app/public/js/app.js indicate exactly where to add the two code snippets above. Once added, restart the demo app and your interactions will begin appearing in ClickStack.
Troubleshooting
Sessions not appearing in HyperDX
- Check the browser console for errors
- Verify ClickStack is running:
docker-compose ps - Confirm the API key is set:
echo $CLICKSTACK_API_KEY - Adjust the time range in the Client Sessions view (try Last 15 minutes)
- Hard refresh the browser:
Cmd+Shift+R(Mac) orCtrl+Shift+R(Windows/Linux)
401 Unauthorized errors
The API key isn’t set correctly. Make sure you:- Exported it in your terminal:
export CLICKSTACK_API_KEY='your-key' - Started the demo app in the same terminal where you exported it
- Got the key from the HyperDX UI (not a randomly generated string)
Cleanup
Stop the services:Learn more
- Session Replay — feature overview, SDK options, and privacy controls
- Browser SDK Reference — full SDK options and advanced configuration
- ClickStack Getting Started — deploy ClickStack and ingest your first data
- All Sample Datasets — other example datasets and guides