How to add an AI chatbot to Shopify

To add an AI chatbot to Shopify, open Online Store, choose Edit code on your theme, and paste one script tag just before </body> in layout/theme.liquid. Feedbot isn't a Shopify app, so there is nothing to install from the App Store and no app permissions to grant.

  • Setup: 5 minutes
  • Store owner or staff with theme editing permission
  • Free plan, no card
  • Updated

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:

  1. In your Shopify admin, go to Online Store → Themes.
  2. Next to your current theme, click the … menu and choose Edit code.
  3. In the file list, open Layout → theme.liquid.
  4. Find the closing </body> tag near the bottom (use Ctrl+F or Cmd+F).
  5. Paste the snippet on the line just above </body>.
  6. Click Save.
  7. 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

Questions

Can't find an answer? Ask the bot in the corner, or write to us.

Is Feedbot a Shopify app?

No. You add it by pasting one script tag into your theme's theme.liquid file. It doesn't request access to your store data, and it isn't listed in the Shopify App Store.

Does the chatbot show on Shopify checkout?

No. Checkout, Thank you and Order status pages don't use your theme layout, and Shopify no longer allows custom script tags there. The chat runs on your storefront: home, collection, product, cart and content pages.

Can the chatbot check order status?

Not out of the box. Feedbot answers from your pages and policies. On Pro you can add an HTTP Action that calls an endpoint you build on top of the Shopify Admin API. If order tracking is your main need, an order-aware app like Shopify Inbox may fit better.

Will the chatbot survive a theme update?

Not automatically. Shopify notes that code edits can be lost when you update a theme to a new version, so paste the snippet again into the new theme's theme.liquid after updating.

Can I use it as Shopify live chat?

Yes. The AI answers first, and when a shopper asks for a person you get a Telegram, Slack, Discord or email notification and can reply live. If the shopper has left, your reply continues by email.

How much does a Shopify chatbot cost with Feedbot?

There is a free plan with 50 conversations a month. Paid plans are $5, $19 and $49 a month with flat conversation limits and no per-resolution fees.

Keep exploring

Put one agent on your site today

Start on the free plan. Upgrade when conversations grow.