Install the chatbot on Shopify
Add an AI chatbot to your Shopify store to answer your customers about products, shipping and returns.
1 min readThis guide shows you how to add your chatbot's widget to your Shopify store by pasting one line of code into your theme.
Before you start
- Your chatbot must be live: in the Deploy tab, click Deploy.
- Copy the embed code: Deploy → Widget tab, Copy button. See Install the widget on your website.
Tip: before editing your theme, make a backup copy: on the Themes page, click … then Duplicate.
Open the theme code
- In the Shopify admin, go to Online Store → Themes.
- On your current theme, click … then Edit code.
Paste the code before `</body>`
- In the layout folder, open the
theme.liquidfile. - Find the
</body>tag, at the very bottom of the file. - Paste the embed code right before that tag.
- Click Save.
The widget now shows on every page of your store.
Check on your store
Open your store in a private browsing window: the chat bubble should appear in the corner chosen in Settings.
Good to know
- The code belongs to the theme. If you switch themes, paste the code again into the new theme's
theme.liquid. - Checkout pages are handled separately by Shopify: the widget doesn't show there.
- To let the chatbot know your products and policies, import your store's pages: see Train the chatbot on your website.
The widget doesn't show?
- Check that you edited the current theme (the one marked "Current theme").
- Allowed sites: if you filled them in, add your domain and, if customers use it, your
.myshopify.comaddress. - Check that the chatbot is Live in the Deploy tab.
Was this guide helpful?
Next guideInstall the chatbot on Wix