Add chat to a website
You need an Agent Red administrator to provide the embed code and access to an HTML file, shared template, or custom code setting on your website. Use a preview or test site first if your site editor allows it. You can see an existing installation on the Remaker Digital Contact page.
Copy the embed code
- In Standalone Admin, open Widget configuration and find Installation.
- Under Embed code, select Copy snippet and look for Copied!. If you see No widget key found, review and activate your configuration, then return to Installation.
- Give the full snippet to the person editing the website. Keep administrator sign-in codes and API keys private.
The console fills in the script address, public widget key, and API URL for your account. Here is the shape of the snippet with example values. Paste the snippet you copied from your console.
<script
src="https://agent-red.example/widget.js"
data-widget-key="YOUR_PUBLIC_WIDGET_KEY"
data-api-url="https://agent-red.example"
></script>
Place and publish the script
- Open the HTML for a page where you want chat to appear. If you want chat on a group of pages, open the shared template that those pages use. In a site builder, use the custom code setting that outputs code at the end of the page body.
- Paste the complete snippet once, just before the closing
</body>tag. For example, adding it in a shared template applies it to each page using that template. Avoid also adding a copy to each of those pages. - Save your changes and publish them to the site you plan to test.
Test the published page
- In a new private browser window, open the published page. Confirm that you can open the chat from its launcher.
- Send a sample question covered by an article in your knowledge base. Check that the reply agrees with the article.
- In Standalone Admin, open Inbox in the same account. Match the visitor message and reply to the conversation there. Use Inbox search if needed.
- Repeat the test on a phone or at a narrow browser width. Open the other pages where chat should appear and check the launcher there too.
Troubleshoot the installation
| What you see | What to check |
|---|---|
| The launcher is missing on every page | Check that the site published the script and that the full snippet matches Embed code in the intended account. Check that the configuration is active. If your site restricts external resources, check whether it allows the script and connections from the Agent Red URLs in the snippet. |
| The launcher is missing on some pages | Check which pages use the template containing the script and review any page rules. |
| The chat shows unexpected branding or answers | Compare the deployed snippet with the one in the intended account. Review the active widget configuration and the relevant knowledge article. |
| You cannot find a test conversation | Open Inbox in the account that supplied the snippet. Search for the exact sample message and check the status filter. |
If an administrator rotates the widget key, replace the old embed code wherever it is installed and test those pages again. The old key stops working when it is rotated.
Was this page helpful?