Quickstart: chat on your website
Before you start
Section titled “Before you start”- A published agent or use case. See Quickstart: build an agent.
- A publishable key (
vcx_pk_…) that lists your website. See API keys.
1. Copy the snippet
Section titled “1. Copy the snippet”Open the agent (or use case) in the console and go to Deploy → Website widget. The console shows the snippet with your ids filled in. It looks like this:
<script src="https://studio.nuacem.dev/widget/vcx-chat.js" defer data-key="YOUR_PUBLISHABLE_KEY" data-agent="agt_xxxxxxxx" data-gateway="https://api.nuacem.dev/voice-gw" data-title="Chat with us"></script>To reach a use case instead of a single agent, use data-use-case="uc_xxxxxxxx" in place of data-agent. The use
case’s entry agent answers.
Designed your chat window in Design Studio? The Chat window design tab gives a one-line snippet for that design instead. See Website widget.
2. Paste it before </body>
Section titled “2. Paste it before </body>”Add the snippet to every page where the chat should appear, just before the closing </body> tag. Replace
YOUR_PUBLISHABLE_KEY with your key.
3. Open your site
Section titled “3. Open your site”A chat button appears in the corner. Open it and say hello.
Make it yours
Section titled “Make it yours”- Design Studio (Agent → Deploy → Website widget) sets colours, logo, fonts, launcher and greeting, and can match your website’s look.
- Snippet attributes add a pre-chat form, languages, a privacy notice, proactive teasers and more. See Website widget.
- Tell the agent who a signed-in user is with signed identity.