How to Add Asyntai AI Chatbot to Bludit

Step-by-step guide for Bludit CMS

Get Embed Code

Step 1: Get Your Embed Code

First, go to your Asyntai Dashboard and scroll down to the "Embed Code" section. Copy your unique embed code which will look like this:

<script async src="https://asyntai.com/static/js/chat-widget.js" data-asyntai-id="YOUR_WIDGET_ID"></script>

Note: The code above is just an example. You must copy your own unique embed code from your Dashboard as it contains your personal widget ID.

Step 2: Add Code Using HTML Code Plugin (Recommended)

The easiest way to add the chatbot to your Bludit site is using the built-in HTML Code plugin:

  1. Log in to your Bludit Admin Panel
  2. Navigate to Plugins in the left sidebar
  3. Find the "HTML Code" plugin (it's usually pre-installed)
  4. If not active, click "Activate" to enable it
  5. Click "Configure" on the HTML Code plugin
  6. In the configuration, you'll see fields for Header and Footer code
  7. Paste your Asyntai embed code in the "Footer" field
  8. Click "Save"

Tip: Adding code to the Footer ensures it loads at the end of your pages, which won't slow down your site's initial loading. This method automatically adds the chatbot to all pages on your site.

Alternative Method 1: Theme File Integration

For more control, you can add the code directly to your theme files:

  1. Connect to your Bludit installation via FTP or File Manager
  2. Navigate to /bl-themes/your-theme-name/
  3. Open the index.php file for editing
  4. Find the closing </body> tag
  5. Paste your Asyntai embed code just before the </body> tag
  6. Save the file
  7. Clear your site cache if applicable

Note: When editing theme files directly, make sure to back up the original file first. Theme updates may overwrite your changes, so document your modifications.

Alternative Method 2: Custom Content in Pages

You can also add the chatbot code directly to specific pages using Bludit's content editor:

  1. Log in to your Bludit Admin Panel
  2. Go to Content and select the page you want to edit
  3. Switch to HTML mode in the editor (if using a visual editor)
  4. Add your Asyntai embed code anywhere in the page content
  5. Click "Save"
  6. Repeat for other pages where you want the chatbot

Important: When adding code directly to page content, you'll need to add it to each page individually. For site-wide installation, use the HTML Code plugin or theme file method instead.

Using Plugin Hooks (Advanced)

For developers creating custom plugins, Bludit provides plugin hooks:

  • siteBodyBegin - Executes at the top of the <body> tag
  • siteBodyEnd - Executes at the bottom, ideal for JavaScript code like the Asyntai widget

You can create a custom plugin that uses the siteBodyEnd hook to inject the chatbot code on all pages.

Step 3: Verify Installation

After saving your changes, visit your Bludit website in a new browser tab or incognito window. You should see the chat widget button in the bottom right corner. Click it to ensure it opens and functions correctly.

Not seeing the widget? Make sure you saved the plugin configuration or theme file changes. Clear your browser cache and Bludit's cache (if enabled). Check the browser console (F12) for any JavaScript errors.