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:

Your website HTML
<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:

Download the plugin

Get the plugin from tahc.ai/wordpress or search for "tahc" in the WordPress plugin directory.

Install and activate

Go to Plugins > Add New > Upload Plugin and activate after installing.

Enter your workspace ID

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:

app/layout.tsx
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

Create new tag

In GTM, go to Tags > New.

Choose Custom HTML

Select Custom HTML as the tag type.

Add the script

Paste the full script tag including the <script> wrapper.

Set trigger

Use All Pages trigger or customize as needed.

Publish

Submit and publish your container.

Verifying Installation

After adding the code:

  1. Visit your website in a private/incognito browser window
  2. Look for the chat bubble in the bottom-right corner
  3. Click it and send a test message
  4. Check your tahc dashboard to see the conversation
Success!

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:

html
<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?