How to Add Asyntai AI Chatbot to Google Sites

Step-by-step guide for Google Sites

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 Code Using Embed Feature

Google Sites uses an embed feature to add custom HTML and JavaScript code:

  1. On a computer, open your site in Google Sites
  2. Navigate to the page where you want to add the chatbot
  3. Click "Insert" in the right sidebar (or from the top menu)
  4. Select "Embed" from the options
  5. Click the "Embed code" tab at the top
  6. Paste your Asyntai embed code into the text box
  7. Click "Next" to preview how it will look
  8. Click "Insert" to add the code to your page
  9. Click "Publish" in the top right to make your changes live

Tip: Google Sites wraps embeds in an iframe, so the chatbot will appear inside the embed area rather than fixed to the browser corner. For the best experience, place the embed element at the very bottom of your page content so the chatbot button is easy to find.

Adding to Multiple Pages

To add the chatbot to multiple pages on your Google Site:

  1. Repeat the embed process for each page where you want the chatbot
  2. Alternatively, add the embed to a header or footer section if your template supports it
  3. For sites with many pages, consider adding it to your main landing pages first

Note: Unlike some other platforms, Google Sites doesn't have a single "site-wide" code injection point. You'll need to add the embed code to each page where you want the chatbot to appear, or use a custom header/footer if your theme supports it.

How Google Sites Handles Embedded Code

Understanding how Google Sites processes your code:

  • Google Sites wraps your code in an <iframe> element in a sandboxed environment
  • JavaScript must be within <script> tags (which your Asyntai code already includes)
  • You can reference external JavaScript files (like the Asyntai widget)
  • The embed feature is less restrictive than classic Google Sites' HTML Box
  • Embedded code does not get indexed in site search

Important: Due to Google Sites' iframe sandboxing, some advanced features may behave differently than on traditional websites. The Asyntai chatbot is designed to work within these constraints.

Step 3: Verify Installation

After publishing your changes, visit your Google Site in a new browser tab or incognito window. You should see the chat widget button in the bottom right corner. Click it to ensure it opens and functions correctly.

Not seeing the widget? Make sure you've published your site (not just saved). Try viewing in an incognito window to bypass any caching. Check the browser console (F12) for any errors. Ensure the embed was inserted correctly by editing the page and checking the embed element.