How to Add Asyntai AI Chatbot to e107

Step-by-step guide for e107 CMS websites

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 to Theme Template (Recommended)

The recommended way to add the chatbot is by editing your e107 theme template file directly:

  1. Navigate to your e107 theme folder: e107_themes/yourtheme/
  2. Open the theme's main template file (usually theme.php or theme.html)
  3. Find the closing </body> tag
  4. Paste your Asyntai embed code just before the </body> tag:
<script async src="https://asyntai.com/static/js/chat-widget.js" data-asyntai-id="YOUR_WIDGET_ID"></script> </body>

Tip: If your theme uses theme.php, look for the section where the footer HTML is rendered. The embed code should be placed after all other content but before the closing body tag.

Alternative Method 1: Using e107 Custom Header/Footer

You can add the chatbot script through the e107 admin panel without editing theme files:

  1. Log in to your e107 admin panel
  2. Go to Admin > Preferences > Site Preferences
  3. Look for the "Custom Footer" or "Footer Scripts" section
  4. Paste your Asyntai embed code into the footer scripts text area
  5. Click "Save" to apply the changes

Note: This method is the easiest if you want to avoid editing theme files directly. The script will be included on every page of your e107 site automatically.

Alternative Method 2: Using e107 Plugin

For a more modular approach, you can create a simple plugin or use the plugin hook system to inject the chatbot script:

  1. Create a simple plugin or use the "Custom Pages" plugin
  2. Add the script via e107's plugin hook system by creating an e_footer.php file in your plugin directory
  3. Inside e_footer.php, output your embed code:
<?php // e_footer.php - Asyntai Chatbot Plugin Hook echo '<script async src="https://asyntai.com/static/js/chat-widget.js" data-asyntai-id="YOUR_WIDGET_ID"></script>'; ?>

Tip: The plugin hook approach keeps your chatbot integration separate from the theme, so it will persist even if you switch themes.

Alternative Method 3: Using e107 Menus System

You can use e107's built-in Menus system to add the chatbot script to the footer area:

  1. Log in to your e107 admin panel
  2. Go to Admin > Menus
  3. Create a custom HTML menu
  4. Paste your Asyntai embed code into the menu content
  5. Assign the menu to the footer area of your template
  6. Save the menu configuration

Important: When using the Menus system, make sure the menu area you assign to supports raw HTML/script output. Some menu areas may strip script tags for security. If the script is removed, use one of the other methods instead.

Step 3: Verify Installation

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

Not seeing the widget? Try clearing your e107 cache from the admin panel under Admin > Cache. Also try clearing your browser cache or viewing in an incognito window. Make sure your embed code is correctly placed and contains your unique widget ID from the Dashboard.