Embed Widget
Add the NexaDesk chat widget to your website
The NexaDesk chat widget is a lightweight JavaScript snippet that adds a chat bubble to your website. Visitors click it to start a conversation with your AI chatbot.
Basic Installation
Add this script tag before the closing </body> tag on every page where you want the widget to appear:
html
<script
src="https://chats.nexadesk.ai/widget.js"
data-chatbot-id="YOUR_CHATBOT_ID"
></script>
Replace YOUR_CHATBOT_ID with the ID from your chatbot's Embed tab in the dashboard.
Finding Your Chatbot ID
- Go to Chatbots in the sidebar
- Click on your chatbot
- Navigate to the Embed tab
- Copy the full script snippet or just the chatbot ID
Configuration Options
You can pass additional data attributes to customize the widget:
html
<script
src="https://chats.nexadesk.ai/widget.js"
data-chatbot-id="YOUR_CHATBOT_ID"
data-position="bottom-right"
data-primary-color="#10b981"
data-welcome-message="Hi! How can I help you today?"
data-locale="en"
></script>
| Attribute | Default | Description |
|---|---|---|
data-chatbot-id | Required | Your chatbot's unique identifier |
data-position | bottom-right | Widget position: bottom-right or bottom-left |
data-primary-color | From dashboard | Override the widget accent color |
data-welcome-message | From dashboard | Override the welcome message |
data-locale | en | Widget UI language |
Platform-Specific Guides
Use the official NexaDesk WordPress plugin for easy installation. See WordPress Integration.
- Go to Online Store > Themes > Edit Code
- Open
theme.liquid - Paste the script before
</body> - Save
- Go to Settings > Custom Code
- Click Add Custom Code
- Paste the script
- Set placement to Body - End
- Apply to All Pages
Add the script using the Next.js Script component:
tsx
import Script from "next/script";
export default function Layout({ children }) {
return (
<>
{children}
<Script
src="https://chats.nexadesk.ai/widget.js"
data-chatbot-id="YOUR_CHATBOT_ID"
strategy="lazyOnload"
/>
</>
);
}
Verifying the Installation
After adding the widget:
- Visit your website in a browser
- Look for the chat bubble in the bottom-right corner
- Click it and send a test message
- Check the Conversations tab in NexaDesk to confirm it appears

