Skip to main content

Five-minute browser integration

Prerequisites​

Obtain a provisioned survey's trackingKey, collectorApiUrl, and embedScriptUrl. They are returned by the provision survey endpoint.

Add the script​

Place this snippet on each survey page, using the returned values. Replace the example UUID with the response reference your platform generates.

<script>
window.ramonConfig = {
sessionId: '11111111-1111-4111-8111-111111111111',
interviewId: '11111111-1111-4111-8111-111111111111',
redactKeyboardInput: true,
redactPageUrl: true
};
</script>
<script
src="https://embed.getramon.com/ramon.js?key=YOUR_TRACKING_KEY&url=https://api.getramon.com"
defer
></script>

sessionId must be a UUID when you provide it. interviewId is optional and is useful when a survey response has a stable external reference. With both set to the same response UUID, a later session lookup and deletion can use that UUID.

Verify​

Open a test survey, interact with it, and then use POST /sessions/lookup with the reference. A row with captured: true confirms that a session summary exists. Details are in Verify the integration.

Production checklist​

  • Use HTTPS and production URLs.
  • Do not put the private integration key in browser code.
  • Add the required script-src and connect-src CSP sources.
  • Enable the privacy options appropriate to your survey page.