One script tag. Works on any website. Paste it before your closing </body> tag and you're done.
Looking for platform-specific guides? See our integration guides for step-by-step instructions for WordPress, Shopify, React, and more.
<script
src="https://www.botembed.ai/widget.js?botId=YOUR_BOT_ID"
data-theme="light"
data-position="bottom-right"
data-display-text="Chat with us"
></script>Replace YOUR_BOT_ID with your actual bot ID from the dashboard.
The simplest method. Add the script tag to any HTML page right before the closing body tag.
<!DOCTYPE html>
<html>
<head>
<title>My Website</title>
</head>
<body>
<!-- Your site content -->
<script
src="https://www.botembed.ai/widget.js?botId=YOUR_BOT_ID"
data-theme="light"
data-position="bottom-right"
></script>
</body>
</html>This works for any static site — plain HTML, GitHub Pages, Netlify, or any hosting provider.
Use a header/footer plugin (recommended) or paste directly into your theme files.
footer.php</body><script
src="https://www.botembed.ai/widget.js?botId=YOUR_BOT_ID"
data-theme="light"
data-position="bottom-right"
></script>Tip: Use a child theme if editing theme files directly, so updates don't overwrite your changes.
Add the script to your theme's main layout file.
theme.liquid</body> tag <script
src="https://www.botembed.ai/widget.js?botId=YOUR_BOT_ID"
data-theme="light"
data-position="bottom-right"
></script>
</body>Use Squarespace's built-in code injection feature.
<script
src="https://www.botembed.ai/widget.js?botId=YOUR_BOT_ID"
data-theme="light"
data-position="bottom-right"
></script>Note: Code injection requires a Squarespace Business plan or higher.
Add custom code through the Wix dashboard.
<script
src="https://www.botembed.ai/widget.js?botId=YOUR_BOT_ID"
data-theme="light"
data-position="bottom-right"
></script>Add the script in your project's custom code settings.
<script
src="https://www.botembed.ai/widget.js?botId=YOUR_BOT_ID"
data-theme="light"
data-position="bottom-right"
></script>Add to your HTML file directly, or load dynamically with a hook.
<script
src="https://www.botembed.ai/widget.js?botId=YOUR_BOT_ID"
data-theme="light"
data-position="bottom-right"
></script>
</body>import { useEffect } from 'react';
export function ChatWidget() {
useEffect(() => {
const script = document.createElement('script');
script.src = 'https://www.botembed.ai/widget.js?botId=YOUR_BOT_ID';
script.dataset.theme = 'light';
script.dataset.position = 'bottom-right';
document.body.appendChild(script);
return () => {
document.body.removeChild(script);
};
}, []);
return null;
}Render <ChatWidget /> once in your app root.
Use the built-in Script component for optimized loading.
import Script from 'next/script';
export default function RootLayout({ children }) {
return (
<html lang="en">
<body>
{children}
<Script
src="https://www.botembed.ai/widget.js?botId=YOUR_BOT_ID"
strategy="afterInteractive"
data-theme="light"
data-position="bottom-right"
/>
</body>
</html>
);
}Works with both the App Router and Pages Router. Place in your root layout or _app.tsx.
Add to your HTML entry point or load dynamically in a component.
<script
src="https://www.botembed.ai/widget.js?botId=YOUR_BOT_ID"
data-theme="light"
data-position="bottom-right"
></script>
</body>export default defineNuxtConfig({
app: {
head: {
script: [
{
src: 'https://www.botembed.ai/widget.js?botId=YOUR_BOT_ID',
'data-theme': 'light',
'data-position': 'bottom-right',
body: true,
},
],
},
},
});Add to your index.html or inject programmatically.
<script
src="https://www.botembed.ai/widget.js?botId=YOUR_BOT_ID"
data-theme="light"
data-position="bottom-right"
></script>
</body>import { Component, OnInit, Renderer2, Inject } from '@angular/core';
import { DOCUMENT } from '@angular/common';
@Component({
selector: 'app-root',
template: '<router-outlet></router-outlet>',
})
export class AppComponent implements OnInit {
constructor(
private renderer: Renderer2,
@Inject(DOCUMENT) private doc: Document
) {}
ngOnInit() {
const script = this.renderer.createElement('script');
this.renderer.setAttribute(script, 'src',
'https://www.botembed.ai/widget.js?botId=YOUR_BOT_ID');
this.renderer.setAttribute(script, 'data-theme', 'light');
this.renderer.setAttribute(script, 'data-position', 'bottom-right');
this.renderer.appendChild(this.doc.body, script);
}
}Control the widget's appearance with these data attributes on the script tag.
| Attribute | Values | Default | Description |
|---|---|---|---|
data-theme | "light" | "dark" | "light" | Widget color theme |
data-position | "bottom-right" | "bottom-left" | "top-right" | "top-left" | "bottom-right" | Widget placement on the page |
data-display-text | Any string | none | Text label shown next to the chat bubble |
<script
src="https://www.botembed.ai/widget.js?botId=YOUR_BOT_ID"
data-theme="dark"
data-position="bottom-left"
data-display-text="Need help?"
></script>Sign up, create a bot, and get your embed code in under a minute.
Get Your Embed Code