Installation
Add the tahc chat widget to your website in minutes with our simple embed code.
Adding tahc to your website takes just a few minutes. Follow these instructions for your platform.
Universal Installation
For any website, add this code just before the closing </body> tag:
<script src="https://app.tahc.ai/widget.js" data-workspace-id="YOUR_WORKSPACE_ID"></script>Replace YOUR_WORKSPACE_ID with your actual workspace ID from Settings > Widget in your dashboard.
Platform-Specific Instructions
WordPress
We offer a dedicated WordPress plugin for the easiest installation:
Get the plugin from tahc.ai/wordpress or search for "tahc" in the WordPress plugin directory.
Go to Plugins > Add New > Upload Plugin and activate after installing.
Go to Settings > tahc and paste your workspace ID.
See the full WordPress guide for advanced options.
Next.js / React
For single-page applications, add the script to your main layout:
import Script from 'next/script';
export default function RootLayout({ children }) {
return (
<html lang="en">
<body>
{children}
<Script
src="https://app.tahc.ai/widget.js"
data-workspace-id="YOUR_WORKSPACE_ID"
strategy="lazyOnload"
/>
</body>
</html>
);
}Google Tag Manager
In GTM, go to Tags > New.
Select Custom HTML as the tag type.
Paste the full script tag including the <script> wrapper.
Use All Pages trigger or customize as needed.
Submit and publish your container.
Verifying Installation
After adding the code:
- Visit your website in a private/incognito browser window
- Look for the chat bubble in the bottom-right corner
- Click it and send a test message
- Check your tahc dashboard to see the conversation
If you see the widget and your test message appears in the dashboard, installation is complete.
Troubleshooting
Widget doesn't appear
- Check that the script is placed before
</body> - Verify your workspace ID is correct
- Make sure your domain is whitelisted in Settings > Widget > Allowed Domains
- Check browser console for errors
Widget appears but doesn't work
- Ensure your domain is added to the allowed domains list
- Check that your workspace has active subscription or trial
- Try clearing your browser cache
Conflicts with other scripts
If the widget conflicts with other JavaScript on your page:
<script
src="https://app.tahc.ai/widget.js"
data-workspace-id="YOUR_WORKSPACE_ID"
defer
></script>The defer attribute ensures the script loads after the page is parsed.
Next Steps
Was this helpful?