Skip to main content

Shopify

Adding the snippet

  1. From your Shopify admin, go to Online Store → Themes
  2. On your current theme, click ⋯ → Edit code
  3. Under Layout, open theme.liquid
  4. Scroll to the bottom and find the closing </body> tag
  5. Paste your snippet immediately before </body>
  6. Click Save

The widget now appears on every page of your storefront.

Duplicate the theme first

Before editing code, use ⋯ → Duplicate to keep a copy of the working theme. If anything goes wrong you can publish the duplicate and be back to normal in seconds.

Checkout pages

Shopify's checkout is not rendered by theme.liquid, so the widget does not appear there. On most plans this is not configurable — and it is usually the right outcome anyway. Chat during payment tends to distract more than it helps.

What to train it on

A store's most valuable chatbot content is rarely the product catalogue — product pages change constantly and prices go stale in the index. Focus instead on the things customers ask that never change:

  • Shipping destinations, costs and timescales
  • Returns and exchanges
  • Size guides and material information
  • Order tracking and what to do when something is wrong
  • Warranty and care instructions

Crawl those policy pages, and add a pasted text source for anything your site implies but never states plainly.

Be careful indexing prices and stock

Content is indexed when you crawl it, not read live. If prices or availability change frequently, an indexed answer will eventually be wrong. Either exclude those pages or set a daily auto-refresh, and consider adding a system prompt line directing shoppers to the product page for current pricing.

Theme updates

Updating your theme can overwrite theme.liquid and remove the snippet. After any theme update, load your storefront and check the chat bubble is still there.

It is not showing up

  1. Confirm you edited the published theme, not a draft
  2. View the page source and search for ChatbotConfig
  3. Hard-refresh (Ctrl+Shift+R)
  4. Check your store's domain is in the key's allowed domains — remember that a myshopify.com address and a custom domain are two different hostnames, so list both if you use both

Widget troubleshooting