Back to Dashboard

Documentation

Learn how to use Asyntai

How to Add Asyntai AI Chatbot to Textpattern

Step-by-step guide for Textpattern CMS sites

Get Embed Code

The free Asyntai plugin puts the AI chatbot on every page of your Textpattern site. The chatbot answers visitor questions from your own pages, 24/7, in more than 80 languages. You install it from the Plugins panel: it needs no template edit and it changes no core file. It works on Textpattern 4.8 and 4.9.

Step 1: Install the plugin

  1. Download the plugin: asn_ai_chatbot_v1.0.0.txt
  2. Log in to your Textpattern admin and open Admin > Plugins.
  3. Click Install plugin. Open the downloaded file in a text editor, copy all of its text, paste it into the box and click Upload.
  4. Textpattern shows a preview of the plugin. Click Install.
  5. In the plugin list, find asn_ai_chatbot and click No in the Active column, so that it changes to Yes.

Upload a file instead: on Textpattern 4.8 and 4.9 you can also upload the plugin as a file. Download asn_ai_chatbot.zip, choose it under Install plugin and click Upload. Do not rename the file: Textpattern needs the name asn_ai_chatbot.zip.

Step 2: Enter your Widget ID

Your Widget ID is in your Asyntai Dashboard, under "Embed Code". It looks like asyntai_1a2b3c4d5e6f.

  1. On the Plugins panel, click Options on the asn_ai_chatbot row. You can also open Admin > Preferences > Asyntai AI Chatbot.
  2. Paste your Widget ID into the Widget ID field.
  3. Make sure Show the chatbot on the site is set to Yes.
  4. Click Save.

Note: Nothing loads until you enter a valid Widget ID. Use your own ID, not the one in the example.

Plugin settings

  • Show the chatbot on the site: Shows or hides the chatbot. The default is Yes.
  • Widget ID: Your own Asyntai Widget ID. Nothing loads without it.
  • Sections without the chatbot: Section names, separated by commas, for example contact, about. The chatbot does not load on pages in these sections. Leave the field empty to load the chatbot on every page.

Tip: To hide the chatbot for a while, set Show the chatbot on the site to No, or set the plugin to inactive on the Plugins panel. Your settings stay saved, so you do not have to delete the plugin.

Alternative: Add the code to your page template

If you prefer not to use the plugin, you can add the embed code to your page template:

  1. In your Textpattern admin, open Presentation > Pages.
  2. Open the page template that your sections use, usually default.
  3. Paste your Asyntai embed code just before the closing </body> tag:
    <script>(function(){var l=function(){var s=document.createElement("script");s.src="https://widget.asyntai.com/static/js/chat-widget.js";s.async=true;s.setAttribute("data-asyntai-id","YOUR_WIDGET_ID");document.head.appendChild(s)};if(document.readyState==="complete"){l()}else{window.addEventListener("load",l)}})();</script>
  4. Click Save. Repeat this for each page template that your sections use.

Important: A template edit is lost when you switch or update your theme. The plugin does not have this problem, so use the plugin when you can.

Step 3: Verify the installation

Open your site in a new tab or in a private window. The chat button is in the bottom corner. Click it and make sure it opens and answers.

Not seeing the chatbot? Check three things. The plugin shows Yes in the Active column. Show the chatbot on the site is set to Yes. The page you are on is not in a section from the Sections without the chatbot list. Then clear your browser cache.

Uninstall

  1. Open Admin > Plugins in your Textpattern admin.
  2. Select the asn_ai_chatbot row. Under With selected, choose Delete and confirm.
  3. The plugin and its three settings are removed. No other site data is touched.