Setup
Add the session recorder to your website
Copy the script tag
Add this script tag to your website's HTML, just before the closing </body> tag:
<script src="https://static.sessionreplay.space/session-recorder.js?id=YOUR_SCRIPT_ID"></script>Verify installation
After adding the script, visit your website and perform some actions. Your sessions will appear in the dashboard within a few minutes.
How to verify:
Open your website in a new browser tab
Open the browser's developer console (F12)
Look for the message: [SessionRecorder] Recording started
Navigate around your site, click buttons, fill forms
Close the tab or navigate away
Check back here - your session should appear!
Advanced configuration (optional)
Customize the recorder behavior by adding a configuration object before the script tag:
<script>
window.SESSION_RECORDER_CONFIG = {
// Enable debug mode to see logs in console
debug: true,
// Mask all input values for privacy
maskAllInputs: false,
// CSS class to block recording specific elements
blockClass: 'rr-block',
// CSS class to ignore specific elements
ignoreClass: 'rr-ignore',
};
</script>
<script src="https://static.sessionreplay.space/session-recorder.js?id=YOUR_SCRIPT_ID"></script>Framework integrations
The script works with any framework. Here are some specific examples:
Add the script to your index.html or use a Script component:
// In your layout or _app.js
import Script from 'next/script'
export default function Layout({ children }) {
return (
<>
{children}
<Script
src="https://static.sessionreplay.space/session-recorder.js?id=YOUR_SCRIPT_ID"
strategy="afterInteractive"
/>
</>
)
}Need help?
If you're having trouble setting up the session recorder, we're here to help!