Skip to main content

Embed the xMagic Chatbot

Easily add the xMagic conversational AI to your website in minutes. Follow these steps to embed the chatbot into your site.


Step 1: Make your agent public

Making your agent public:

Go to xMagicAccess control in the bottom-left corner of the sidebar.

After the pop-up appears, under General Access, set your agent to Public .

Public screenshot

Step 2: Get your embed code snippet

How to get your embed code snippet:

Go to xMagicConfigurations in the left sidebar.
Click Embed code in the top-right corner of the page:

Your embed code snippet will look like:

<script defer>
window.xChatEmbed = "https://xmagic.ai/embed?xmagic_id=abcd1234";
</script>
<script defer src="https://downloads.stochastic.ai/xchat/embed-v4.js"></script>

Case1: If you have access to the HTML code, then just paste the above snippet in the <head> tag of your site's HTML.


Case2: If you are using a website builder like Webflow or Wix, please check for their specific intructions below.

Embed chatbot instructions for different website builder

Webflow

Wix

That's All!