Shopify
Adding the snippet
- From your Shopify admin, go to Online Store → Themes
- On your current theme, click ⋯ → Edit code
- Under Layout, open
theme.liquid - Scroll to the bottom and find the closing
</body>tag - Paste your snippet immediately before
</body> - Click Save
The widget now appears on every page of your storefront.
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.
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
- Confirm you edited the published theme, not a draft
- View the page source and search for
ChatbotConfig - Hard-refresh (
Ctrl+Shift+R) - Check your store's domain is in the key's
allowed domains — remember that a
myshopify.comaddress and a custom domain are two different hostnames, so list both if you use both