How to Add Asyntai AI Chatbot to e107
Step-by-step guide for e107 CMS websites
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:
- Navigate to your e107 theme folder:
e107_themes/yourtheme/ - Open the theme's main template file (usually theme.php or theme.html)
- Find the closing
</body>tag - 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:
- Log in to your e107 admin panel
- Go to Admin > Preferences > Site Preferences
- Look for the "Custom Footer" or "Footer Scripts" section
- Paste your Asyntai embed code into the footer scripts text area
- 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:
- Create a simple plugin or use the "Custom Pages" plugin
- Add the script via e107's plugin hook system by creating an e_footer.php file in your plugin directory
- 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:
- Log in to your e107 admin panel
- Go to Admin > Menus
- Create a custom HTML menu
- Paste your Asyntai embed code into the menu content
- Assign the menu to the footer area of your template
- 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.
Weebly