Documentation
Learn how to use Asyntai
How to Add Asyntai AI Chatbot to Shopify
Step-by-step guide for Shopify stores
Weebly
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 to Your Shopify Theme
Follow these steps to add the chatbot to your Shopify store:
- Log in to your Shopify Admin panel
- Go to Online Store → Themes
- Find your current theme and click the "..." button (three dots)
- Select "Edit code" from the dropdown menu
- In the left sidebar, under Layout, click on theme.liquid
- Scroll down to find the closing
</body>tag - Paste your Asyntai embed code just before the
</body>tag - Click "Save" in the top right corner
Tip: Use Ctrl+F (Windows) or Cmd+F (Mac) to quickly search for </body> in the theme.liquid file.
Alternative: Using Shopify App
If you prefer not to edit code, you can use a Shopify app to add custom scripts:
- Go to the Shopify App Store
- Search for "Custom Script Injector" or "Header & Footer Scripts"
- Install the app of your choice
- Use the app to add your Asyntai embed code to the footer section
Step 3: Verify Installation
After saving your changes, visit your Shopify store in a new browser tab or incognito window. You should see the chat widget button in the bottom right corner of your store. Click it to make sure it opens and works correctly.
Not seeing the widget? Shopify may cache your theme files. Try opening your store in an incognito/private browser window, or wait a few minutes and refresh the page.
Shopify Plus Users
If you're on Shopify Plus, you can also add the script through the checkout.liquid file to display the chatbot on checkout pages. However, note that most stores only need it on the main storefront pages.
Adding the AI Search Bar
The AI Search Bar is a separate widget with its own code. Add it as well as the chat widget, or on its own. It needs the Standard plan or higher: on a lower plan the bar appears but never returns results.
Add the data-replace attribute to the script tag and the bar takes the place of the one your theme already has. Paste it into theme.liquid just before the closing body tag, the same file as the chat code. Your theme keeps its own search results page, so pressing Enter still works exactly as before.
<script src="https://widget.asyntai.com/static/js/search-widget.js" data-asyntai-id="YOUR_WIDGET_ID" data-replace="auto" async></script>