Adding a chatbot to your website requires one line of code. Copy. Paste. Done.
Average installation time: under 60 seconds.
Get Your Embed Code
In Kya:
- Go to Settings → Installation
- Copy your embed code
It looks like this:
<script src="https://widget.meetkya.com/chatbot.js?id=your-unique-id"></script>
Now install it on your platform.
WordPress Installation
Option A: Plugin Method (Recommended)
- Install WPCode (free plugin)
- Go to Code Snippets → Add Snippet
- Choose Add Your Custom Code
- Paste your embed code
- Set location to Site Wide Footer
- Activate and Save
This method survives theme updates.
Option B: Theme Editor
- Go to Appearance → Theme File Editor
- Select footer.php from sidebar
- Find the
</body>tag - Paste embed code right before it
- Click Update File
Warning: Theme updates may overwrite this.
Shopify Installation
Via Theme Settings (Easiest)
- Go to Online Store → Themes
- Click Customize on current theme
- Click Theme Settings (gear icon)
- Find Custom Scripts or Additional Scripts
- Paste embed code
- Save
Via Theme Code
- Go to Online Store → Themes
- Click Actions → Edit Code
- Find
theme.liquidin Layout folder - Scroll to find
</body> - Paste embed code right before it
- Save
Wix Installation
- Go to Wix Editor
- Click Settings (gear icon)
- Select Custom Code
- Click Add Custom Code
- Paste embed code
- Name it "Chatbot"
- Set placement to Body - End
- Apply to All Pages
- Publish
Squarespace Installation
- Go to Settings → Advanced → Code Injection
- Scroll to Footer section
- Paste embed code
- Save
Note: Requires Business plan or higher.
Webflow Installation
- Open Project Settings
- Go to Custom Code tab
- Paste embed code in Footer Code section
- Publish your site
Next.js / React Installation
Next.js
Add to your _app.js or layout component:
import Script from 'next/script'
export default function App({ Component, pageProps }) {
return (
<>
<Component {...pageProps} />
<Script
src="https://widget.meetkya.com/chatbot.js?id=your-unique-id"
strategy="afterInteractive"
/>
</>
)
}
React
Add to public/index.html before </body>:
<script src="https://widget.meetkya.com/chatbot.js?id=your-unique-id"></script>
Or load dynamically:
useEffect(() => {
const script = document.createElement('script');
script.src = 'https://widget.meetkya.com/chatbot.js?id=your-unique-id';
document.body.appendChild(script);
}, []);
Google Tag Manager Installation
- Log into Google Tag Manager
- Create New Tag
- Tag type: Custom HTML
- Paste embed code
- Trigger: All Pages
- Save and Publish
Advantage: Manage chatbot without touching website code.
Any Custom Website
Find </body> tag in your HTML and paste before it:
<!-- Your page content -->
<script src="https://widget.meetkya.com/chatbot.js?id=your-unique-id"></script>
</body>
</html>
For multi-page sites, add to every page or use a shared footer include.
Verify Installation
After adding code:
- Clear browser cache (Ctrl+Shift+R or Cmd+Shift+R)
- Refresh the page
- Look for widget (bottom-right corner by default)
- Send test message
If widget appears and responds—done.
Troubleshooting
Widget doesn't appear?
- Check browser console (F12 → Console) for errors
- Verify code placement (should be before
</body>) - Try incognito mode (bypasses cache)
- Check if script loads (F12 → Network → filter for "kya")
Widget appears but doesn't work?
- Verify chatbot ID is correct
- Check if chatbot is active in dashboard
- Look for JavaScript errors in console
Widget blocks other elements?
- Adjust position in Settings → Chat Widget → Position
- Check for z-index conflicts in CSS
Specific Page Installation
Only want chatbot on certain pages?
WordPress
Use WPCode with conditional logic, or add to specific page templates only.
Shopify
Edit specific template files (e.g., only product.liquid).
JavaScript Conditional
<script>
if (window.location.pathname.includes('/support')) {
var script = document.createElement('script');
script.src = 'https://widget.meetkya.com/chatbot.js?id=your-unique-id';
document.body.appendChild(script);
}
</script>
Widget Control Methods
Kya's widget exposes JavaScript methods:
// Open the chat
window.Kya.open();
// Close the chat
window.Kya.close();
// Toggle open/closed
window.Kya.toggle();
Use for custom buttons:
<button onclick="window.Kya.open()">Chat with us</button>
Multiple Chatbots
Different bots for different pages:
<script>
var chatbotId = window.location.pathname.includes('/support')
? 'support-bot-id'
: 'sales-bot-id';
var script = document.createElement('script');
script.src = 'https://widget.meetkya.com/chatbot.js?id=' + chatbotId;
document.body.appendChild(script);
</script>
Performance
Kya's widget:
- Under 20KB (gzipped)
- Loads asynchronously (doesn't block page)
- Cached by browsers
- No meaningful impact on page speed scores
Common Mistakes
- Pasting in header instead of footer — Should be before
</body>, not in<head> - Forgetting to publish — Theme changes need publishing
- Cache issues — Always clear cache after changes
- Wrong chatbot ID — Double-check ID matches your chatbot
- Multiple installations — Remove old code before adding new
Getting Started
Start free with Kya — takes 60 seconds.
- Create your chatbot (point at your website)
- Grab embed code from Settings → Installation
- Follow platform-specific instructions above
- Refresh site and test
From signup to live chatbot: under 5 minutes.
One line of code.
That's all between your website and 24/7 AI support.
Copy. Paste. Done.


