Step-by-step instructions for embedding your chatbot into various platforms and frameworks.
Our chatbot can be embedded into any website or web application using a simple JavaScript snippet. The widget is lightweight, responsive, and works across all modern browsers.
For static HTML websites, add the script tag before the closing </head> tag.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Your Website</title>
<!-- Add this before closing </head> -->
<script async
data-chatbot='your-chatbot-id'
src='https://your-widget-url.com'>
</script>
</head>
<body>
<!-- Your website content -->
</body>
</html>For React and Next.js applications, add the script to your main layout or _document.js file.
import Document, { Html, Head, Main, NextScript } from 'next/document'
class MyDocument extends Document {
render() {
return (
<Html>
<Head>
<script
async
data-chatbot='your-chatbot-id'
src='https://your-widget-url.com'
/>
</Head>
<body>
<Main />
<NextScript />
</body>
</Html>
)
}
}
export default MyDocumentimport React from 'react';
import './App.css';
function App() {
return (
<div className="App">
{/* Your app content */}
</div>
);
}
// Add this to your public/index.html
// <script async data-chatbot='your-chatbot-id' src='https://your-widget-url.com'></script>
export default App;For WordPress sites, add the script to your theme's header.php file or use a plugin.
<!-- Add this in header.php before </head> --> <script async data-chatbot='your-chatbot-id' src='https://your-widget-url.com'></script>
Use a plugin like "Insert Headers and Footers" for easier management.
You can customize the chatbot position using CSS variables.
<style>
:root {
--chatbot-position: bottom-right; /* or bottom-left */
--chatbot-z-index: 9999;
}
</style>
<script async data-chatbot='your-chatbot-id' src='https://your-widget-url.com'></script>Load the chatbot only on specific pages or under certain conditions.
<script>
// Only load on specific pages
if (window.location.pathname === '/contact' || window.location.pathname === '/careers') {
const script = document.createElement('script');
script.async = true;
script.src = 'https://your-widget-url.com';
script.setAttribute('data-chatbot', 'your-chatbot-id');
document.head.appendChild(script);
}
</script>Open your browser's developer tools and check the console for any JavaScript errors.
Look for the chatbot script in the Network tab of developer tools to ensure it's loading properly.
Click the chatbot button and test the form submission to ensure everything works correctly.
Add the script to your theme.liquid file in the <head> section.
Use the Code Injection feature in Settings → Advanced.
Add the script using the HTML Embed element in the Wix Editor.
Add the script to the Page Settings → Custom Code section.