For AI agents: a documentation index is available at /docs/llms.txt. Append .md to any page URL for markdown, or send Accept: text/markdown.
Self-host Session Replay SDKs
Self-hosting serves browser SDK files and routes API calls through your own domain. Use it to avoid requests that ad blockers prevent or to meet requirements for routing data through your infrastructure before it reaches Amplitude.
Choose either or both independent tasks:
| Task | Use when |
|---|---|
| Self-host the browser script | You load the SDK through a <script> tag and want to serve the file from your CDN or static server. Bundled npm installations skip this task. |
| Proxy replay requests | You want browser replay ingestion and configuration requests to pass through your server. |
Mobile Session Replay plugins don't support custom proxy URLs. Their serverZone option selects Amplitude's US or EU data center; requests still go directly to Amplitude.
Part 1: Self-host the SDK script
Go to Self-host the browser Session Replay script.
Get the SDK file
Go to Get the SDK file for pinned download examples.
Serve the file
Go to Serve the file to update script tags and caching.
Part 2: Proxy API calls
Go to Proxy Session Replay requests.
How the proxy works
Go to How the proxy works for forwarding and response requirements.
Analytics SDKs
Go to Proxy Analytics SDK requests if your implementation also needs to proxy Analytics traffic.
Remote config proxy (Browser SDK 2 only)
Go to Remote config proxy for the separate Browser SDK 2 configuration request.
Session Replay: Browser (Plugin and Standalone SDK)
Go to Browser replay proxy configuration for ingestion and configuration endpoints.
Session Replay: Mobile (Android, iOS, React Native)
Go to Mobile routing for the serverZone setting and proxy restrictions.
Content Security Policy (CSP)
Configure script hosting CSP for your file-serving domain and proxy CSP for network endpoints.
Was this helpful?