How to Add Asyntai AI Chatbot to Ghost

Step-by-step guide for Ghost 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: Using Code Injection (Recommended)

Ghost has a built-in Code Injection feature that makes adding custom scripts very easy:

  1. Log in to your Ghost Admin Panel
  2. Click the gear icon (Settings) in the bottom left corner
  3. Scroll down to "Advanced" section
  4. Click on "Code injection"
  5. In the "Site footer" section, paste your Asyntai embed code
  6. Click "Save" in the top right corner

Tip: Adding JavaScript to the Site Footer (rather than Site Header) ensures it loads after the page content, which is recommended for chat widgets and won't slow down your page loading.

Alternative: Page-Specific Code Injection

If you only want the chatbot on specific pages or posts:

  1. Open the post or page you want to add the chatbot to
  2. Click the settings icon (gear) in the top right corner
  3. Scroll down to find "Code injection"
  4. Expand the section and paste your Asyntai embed code in the "Post footer" field
  5. Click outside the field to save, then publish/update your post

Note: Page-specific code injection is useful if you want the chatbot only on certain pages rather than your entire site.

Alternative: Edit Theme Files (For Self-Hosted)

If you're self-hosting Ghost and prefer to edit theme files directly:

  1. Access your Ghost installation files via FTP or file manager
  2. Navigate to your theme folder: content/themes/your-theme/
  3. Open the default.hbs file (the main layout file)
  4. Find the closing </body> tag
  5. Paste your Asyntai embed code just before the </body> tag
  6. Save the file
  7. Restart Ghost or clear the cache

Important: Editing theme files directly is not recommended unless necessary. Changes may be overwritten when updating your theme. The Code Injection method is preferred as it survives theme updates.

Step 3: Verify Installation

After saving your changes, visit your Ghost site 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? Make sure you clicked "Save" after adding the code in Code Injection. Try clearing your browser cache or viewing in an incognito window. If using Ghost(Pro), changes should appear immediately. For self-hosted Ghost, you may need to restart the Ghost service.