How to Add Asyntai AI Chatbot to WordPress
Step-by-step guide for WordPress 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: Choose Installation Method
There are several ways to add the chat widget to WordPress. Choose the method that works best for you:
Method 1: Using a Plugin (Recommended)
The easiest way to add the chat widget is by using a plugin like "Insert Headers and Footers" or "WPCode".
Using WPCode (Free)
- Go to Plugins → Add New in your WordPress admin
- Search for "WPCode" and install it
- Activate the plugin
- Go to Code Snippets → Header & Footer
- Paste your Asyntai embed code in the "Footer" section
- Click "Save Changes"
Using Insert Headers and Footers
- Go to Plugins → Add New in your WordPress admin
- Search for "Insert Headers and Footers" by WPBeginner
- Install and activate the plugin
- Go to Settings → Insert Headers and Footers
- Paste your Asyntai embed code in the "Scripts in Footer" box
- Click "Save"
Why use a plugin? Using a plugin ensures your code stays in place even when you update or change your WordPress theme.
Method 2: Edit Theme Files
You can add the code directly to your theme files. The location of the Theme File Editor depends on your WordPress version and theme type.
For Classic Themes
- Go to Appearance → Theme File Editor in your WordPress admin
- Select your active theme from the dropdown (if not already selected)
- Find and click on footer.php in the file list on the right
- Scroll to the bottom and find the closing
</body>tag - Paste your Asyntai embed code just before the
</body>tag - Click "Update File"
For Block Themes (FSE Themes)
If you're using a block-based theme (like Twenty Twenty-Four or other Full Site Editing themes), the Theme File Editor has moved:
- Go to Tools → Theme File Editor in your WordPress admin
- Select your active theme from the dropdown
- Look for footer.php or footer.html in the file list
- Add your Asyntai embed code before the closing
</body>tag - Click "Update File"
Note: Some block themes don't have a footer.php file. In that case, use the plugin method (WPCode) which works with all theme types.
Important: Theme updates will overwrite your changes. For a permanent solution, use a child theme or the plugin method instead.
Method 3: Using Elementor
If you're using Elementor, you can add the code through Elementor's custom code feature.
Elementor Pro
- Go to Elementor → Custom Code
- Click "Add New"
- Give it a name like "Asyntai Chatbot"
- Set Location to "Before </body> End"
- Paste your Asyntai embed code
- Set Display Conditions to "Entire Site"
- Click "Publish"
Elementor Free
If you're using the free version of Elementor, use the plugin method described above, as custom code injection requires Elementor Pro.
Step 3: Verify Installation
After adding the code, visit your website in a new browser tab or incognito window. You should see the chat widget button in the bottom right corner of your site. Click it to make sure it opens and works correctly.
Not seeing the widget? Clear your browser cache and any WordPress caching plugins. If you're using a caching plugin like WP Rocket or W3 Total Cache, purge the cache after adding the code.