Example file
01-minimal.html
The dashboard's paste-in snippet on its own.
To try this page, download it, replace the placeholders and put it on a test page of your website. Opening the file from your computer won't work, because the embeds check the website address they're on.
<!--
The smallest install: one script tag with your agent's id. Replace
YOUR_AGENT_ID below. Paste the tag just before </body> on every page where
you want the chat.
-->
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Webchat: minimal snippet</title>
</head>
<body>
<h1>Minimal snippet</h1>
<p>
One script tag with your agent's id. A chat button appears in the bottom-right corner once the agent has
loaded. Open it and say hello. The conversation shows up in your Subcontext inbox.
</p>
<p>
No chat button after a few seconds? Look for a <code>[Subcontext.Webchat]</code> line in the browser
console. It says why.
</p>
<!-- YOUR_AGENT_ID: your agent's id. In the dashboard, go to Agents and open your agent. The id is in the
address bar, and in the snippet under Channels, Web, Configure, "Add to your website".
Keep id="webchat-embed-script". It helps the script find its own data-* settings. -->
<script
id="webchat-embed-script"
src="https://js.subcontext.com/webchat-latest.js"
data-agent-id="YOUR_AGENT_ID"></script>
</body>
</html>