How to Add Asyntai AI Chatbot to Google Sites
Step-by-step guide for Google Sites
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>(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>
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:
- On a computer, open your site in Google Sites
- Navigate to the page where you want to add the chatbot
- Click "Insert" in the panel on the right
- Select "Embed" from the options
- Click the "Embed code" tab at the top
- Paste your Asyntai embed code into the text box
- Click "Next" to preview how it will look
- Click "Insert" to add the code to your page
- 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:
- Repeat the embed process for each page where you want the chatbot
- For sites with many pages, consider adding it to your main landing pages first
Note: Google Sites has no single place for code that covers the whole site. Add the embed code to each page where you want the chatbot to appear.
How Google Sites Handles Embedded Code
Understanding how Google Sites processes your code:
- Google Sites shows your code inside an <iframe> element
- JavaScript must be within <script> tags (which your Asyntai code already includes)
- You can reference external JavaScript files (like the Asyntai widget)
Important: Because Google Sites shows the code inside an iframe, some features may behave differently than on other websites. The Asyntai chatbot is designed to work inside this iframe.
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 inside the embed area on the page. 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.
Weebly