SDK
SDK Quickstart
Add the TinyReplay recorder to any website - script tag or npm.
The SDK is a thin wrapper around rrweb that records the page and flushes batches
to your server. It never calls any third party - only config.endpoint.
Install
<script src="https://your-server.example.com/sdk/tinyreplay.umd.js"></script>
<script>
TinyReplay.init({
endpoint: 'https://your-server.example.com',
projectId: 'my-project',
})
</script>The UMD bundle is served by your own TinyReplay server at
/sdk/tinyreplay.umd.js, so same-origin sites can use a relative endpoint of
location.origin.
Minimum config
Only two fields are required:
TinyReplay.init({
endpoint: 'https://your-server.example.com', // your server, no trailing slash
projectId: 'my-project', // any identifier string
})Safe to call once
init() is a no-op if a recording is already active, and it never runs during
server-side rendering. Call it once, as early as you can on the client.
Stopping
await TinyReplay.stop() // stops recording and flushes buffered eventsYou rarely need this - recording stops automatically on page unload and after
maxDurationMs (30 minutes by default).