This guide will help you integrate Composite Analytics into your application and start capturing session recordings immediately.
Installation
Install the Composite Analytics SDK using your preferred package manager:Basic Setup
1. Import and Initialize
Initialize the SDK with your API key from the Analytics Dashboard:2. Enable Session Recording
Enable session recording to capture user interactions:3. Track Events
Capture custom events to understand user behavior:4. Identify Users
Connect sessions to specific users for better insights:Complete Example
Here’s a full example for a typical web application:Framework Examples
- React
- Vue
- Next.js
Configuration Options
Here are the most commonly used configuration options:For Chrome Extensions, use
transport: 'chrome-extension' for optimized message passing. See our Chrome Extension Guide.Verify Your Integration
After setting up, you can verify session recording is working:- Open your browser’s Developer Console
- Look for Composite Analytics debug logs (if
debug: true) - Check the Network tab for requests to
prod.alb.us.api.composite.com - Visit your Analytics Dashboard to see session recordings
Best Practices
Initialize Early
Initialize the SDK as early as possible in your app lifecycle to capture all sessions
Identify Users
Always identify logged-in users to connect their sessions across visits
What’s Next?
Event Tracking
Capture custom events and user properties
Session Recording
Set up and configure session recordings
Chrome Extension
Special setup for Chrome Extensions
API Reference
Complete API documentation
Need Help?
If you run into issues:- Check our Troubleshooting Guide
- Email us at founders@composite.com
- Visit the Dashboard for live support