On this page

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:

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?