Embed the chat with an iframe

Place the Askocto chat inside a page of your site as an iframe, for a support page or a full-page chat, and size it for desktop and phones.

Working draft. These docs are illustrative: names, endpoints and examples describe the intended behaviour and can change before launch.

The iframe embed puts the chat directly in the layout of a page instead of floating over it. Use it for a dedicated support page, a help section next to your contact details or an app screen where a bubble would get in the way.

Add the iframe

  1. Open your agent and go to Channels > Website widget.
  2. Choose Embedded iframe and select Copy snippet.
  3. Paste the snippet where the chat should appear on the page.
<iframe
  src="https://embed.askocto.co/chat/agt_123"
  title="Support chat"
  width="100%"
  height="640"
  style="border: 0; border-radius: 12px;"
  allow="microphone"
></iframe>

You should see the chat fill the frame with the agent's greeting. Visitors can type right away, with no launcher to open first.

Attributes

Attribute Purpose
src The embed address of your agent. Copy it from the dashboard so the agent id is correct.
title A short description for screen readers. Keep it, and make it specific.
width, height The size of the frame. A height between 500 and 700 pixels suits most layouts.
allow="microphone" Lets the visitor use voice in the frame. Leave it out if the agent has no voice channel.

Make it responsive

Fixed pixel heights work on desktop but can be tall on phones. Give the frame a flexible box in your own CSS:

<div style="max-width: 720px; margin: 0 auto; height: min(80vh, 700px);">
  <iframe src="https://embed.askocto.co/chat/agt_123"
          title="Support chat" width="100%" height="100%" style="border: 0;"></iframe>
</div>

Iframe or chat bubble

Chat bubble Iframe
Placement Floats over every page Sits inside one page
Install Script tag Frame tag
JavaScript API Yes, through window.askocto The frame is separate from your page script
Best for Site-wide help A support page or app screen

For site-wide help with page context and identity, use the chat bubble. If you want a full help center with its own address, see Custom domains.

Note: The Allowed domains list in Channels > Website widget applies to frames too. Add your site's domain, including any staging domain, or the frame stays blank.

Troubleshooting

  • The frame is blank. Check Allowed domains, and check that your site's content security policy allows frames from embed.askocto.co.
  • The chat looks cut off. Increase the height or let the frame fill a flexible container.
  • Voice does not start. Add allow="microphone" and make sure the agent has Voice turned on under Channels.

Something unclear or missing? Tell us and we will fix the page.