Embed Script

Add your chatbot to any website with a simple script tag.

Embed Script

The simplest way to add your ChatNexus chatbot to any website. Just add one line of code.

Quick Start

  1. Navigate to Deploy in the left sidebar
  2. Copy the generated embed code
  3. Paste it before the closing </body> tag of your website
<script
    src="https://embed.chatnexus.io/scripts/embed.js"
    data-chatbot-id="YOUR_CHATBOT_ID">
</script>

Configuration Options

The embed script supports these data attributes:

AttributeDescriptionDefault
data-chatbot-idYour chatbot's unique ID (required)
data-positionWidget position: left or rightright

How It Works

  • The script loads asynchronously — it won't slow down your page
  • Resources are lazy-loaded — the chat widget only loads when needed
  • All communication uses HTTPS encryption
  • The widget is fully responsive and works on mobile devices

Tip:

Test your embed in a staging environment before deploying to production. This lets you verify styling and functionality without affecting live users.