What you need
- A Feedbot bot. Sign up free, create a bot from your store URL and copy the bot id from Dashboard → Bot → Install.
- Access to your Shopify admin with permission to edit themes.
- Five minutes. No developer needed, though you’ll touch theme code once.
The snippet:
<script src="https://w.feedbotai.com/v1/feedbot.js" data-bot-id="YOUR_BOT_ID" async></script>How to add a chatbot to Shopify
Shopify recommends duplicating your theme before you edit code, so you can roll back. Then:
- In your Shopify admin, go to Online Store → Themes.
- Next to your current theme, click the … menu and choose Edit code.
- In the file list, open Layout → theme.liquid.
- Find the closing
</body>tag near the bottom (use Ctrl+F or Cmd+F). - Paste the snippet on the line just above
</body>. - Click Save.
- Open your storefront in a private window and send a test message. The conversation shows up in the Feedbot inbox.
On mobile the path is Sales channels → Online Store → Manage themes → … → Edit code.
Alternative: a Custom Liquid section
If you’d rather not edit files, Online Store 2.0 themes let you add a Custom Liquid section in the theme editor. Add it to the footer group so it appears on every page, and paste the snippet. This is easier to undo, but some themes don’t offer a footer section group, and the chat only appears where the section is placed.
Where the chatbot can and can’t run
| Page | Chat shows? | Why |
|---|---|---|
| Home, collections, products, blog, pages | Yes | They use theme.liquid |
| Cart page and cart drawer | Yes | Part of the theme |
| Checkout | No | Shopify controls checkout; theme code doesn’t load there |
| Thank you and Order status | No | Script tags there are no longer supported |
| Password page (before launch) | Usually no | It uses layout/password.liquid; paste there too if you want it |
Show it only on some pages
Liquid lets you load the script conditionally. For example, only on product and cart pages:
{% if template.name == 'product' or template.name == 'cart' %} <script src="https://w.feedbotai.com/v1/feedbot.js" data-bot-id="YOUR_BOT_ID" async></script>{% endif %}To hide it on one page instead, use unless and the page handle.
Identify logged-in customers
If customers sign in, you can tell the bot who they are. Shopify’s Liquid has an hmac_sha256 filter that runs on Shopify’s servers, so the hash is computed before the page reaches the browser:
{% if customer %}<script> window.Feedbot = window.Feedbot || function () { (Feedbot.q = Feedbot.q || []).push(arguments) }; Feedbot("identify", { userId: "{{ customer.id }}", email: {{ customer.email | json }}, name: {{ customer.first_name | json }}, hash: "{{ customer.id | append: '' | hmac_sha256: 'YOUR_IDENTITY_SECRET' }}" });</script>{% endif %}The secret doesn’t reach shoppers, but anyone with theme-edit access can read it. If that is a concern, skip identification: the bot can still ask for an email when it matters. See Identify users.
Troubleshooting
| Symptom | Cause | Fix |
|---|---|---|
| No chat button | You edited a theme that isn’t published | Edit the live theme, or publish the edited copy |
| Chat disappeared after a theme update | Code edits don’t carry over to the new version | Paste the snippet into the new theme.liquid |
| Two chat buttons | Another chat app is still enabled | Disable its app embed under Customize → App embeds |
Works on *.myshopify.com, not on your domain |
Allowed domains lists only one of them | Add both in Bot → Install → Allowed domains |
| Button overlaps a “back to top” or cookie banner | Same corner | Set data-position="bottom-left" |
Train it on your store
Shoppers mostly ask about shipping times, returns, sizing, stock and discounts. From the Starter plan you can import your store by URL or sitemap.xml (Shopify serves one at /sitemap.xml), which covers product and policy pages. On Free, paste your shipping and return policies as text and FAQ. Feedbot doesn’t re-crawl automatically, so click Refresh website after you change prices or policies. More in Knowledge base.
When another tool fits better
We make Feedbot, so be skeptical. If you mainly need order tracking, cart recovery or product recommendations tied to your catalog, a Shopify-native app reads store data directly and will do those jobs better. Feedbot fits when you want one bot that answers from your content, captures leads, hands off to you in Telegram or Slack, and costs a flat fee. Compare it with a popular Shopify option in Feedbot vs Tidio.
Next steps
- What store bots should handle: Ecommerce chatbot.
- Get notified and reply live: Human handoff.
- Plans and limits: Pricing.