---
title: "Add an AI chatbot to Shopify — Dazza help"
description: "Add Dazza’s AI chat to a Shopify store: paste one line into theme.liquid before </body>, or a Custom Liquid section, then check it’s live and fix issues."
url: https://dazza.io/help/install-shopify
updated: 2026-10-27
---

# Add the chat to Shopify

Paste one line into your theme’s theme.liquid, or into a Custom Liquid section in the theme editor, then check it’s working.

*3 min read · Updated 27 Oct 2026 · 7 sections*

To add an AI chatbot to Shopify, paste Dazza’s one line of code into your theme’s `theme.liquid` file, just before `</body>`. If you’d rather not open the code editor, a Custom Liquid section in your theme’s footer works too.

## Before you start

- **Copy your line.** It’s in **Settings → Install** in Dazza, with your agent’s key already in it:

```
<script src="https://app.dazza.io/widget.js" data-agent="dz_…" async></script>
```

- **Publish your agent.** The chat button only appears once your agent has a published version.
- **Duplicate your theme.** Shopify recommends a backup copy before you edit theme code. In **Online Store → Themes**, click **…** next to your theme, then **Duplicate**.

## Paste it into theme.liquid

1. In your Shopify admin, go to **Online Store → Themes**.
2. Next to your current theme, click the **…** button, then **Edit code**.
3. Under **Layout**, open `theme.liquid`.
4. Find `</body>`, near the end of the file. Use Ctrl+F, or Cmd+F on a Mac.
5. Paste your line on a new line just above `</body>`.
6. Click **Save**.

The chat now loads on every page that uses your theme’s layout: the home page, collections, products, cart and your own pages.

## Or use a Custom Liquid section

Shopify’s free themes, and many others, have a **Custom Liquid** section, which takes code without opening the code editor. Put it in the footer, which appears on every page.

1. Go to **Online Store → Themes** and click **Customize**.
2. In the sidebar, find your footer and click **Add section** inside it.
3. Choose **Custom Liquid**. If your theme doesn’t list it, use `theme.liquid` instead.
4. Paste your line into the Liquid box and click **Save**.

## Check it’s working

1. Open your store in a new private window and refresh.
2. Look for the chat button in the bottom corner, and ask it a question.
3. In Dazza, **Settings → Install** shows **Installed** and the address the chat was last seen on.

## Common problems

| What you see | What to do |
| --- | --- |
| No chat button anywhere | Publish your agent in **Agent**. Settings → Install says so if it isn’t live yet. |
| No chat on your myshopify.com address | If you’ve listed **Allowed websites** in Settings → Install, add `your-store.myshopify.com` as well as your own domain. Subdomains are included. |
| No chat in checkout | Expected. Shopify’s checkout doesn’t load theme code, so the chat appears on your storefront pages only. |
| No chat on the password page | Your password page uses its own layout. The chat appears once the store is open, or once you’re past the password. |
| The code shows as text on the page | It was pasted into a text block. Use `theme.liquid` or a Custom Liquid section. |
| The chat disappeared after a theme change | Code lives in each theme. Add it again to the new theme, and check after theme updates. |
| Nothing loads and the code looks odd | Pasting through some apps turns straight quotes into curly ones. Copy the line again from Settings → Install. |

## Order questions

The chat answers delivery, returns and sizing questions from your store’s pages straight away. To look up and track a customer’s order, check stock, or cancel or redirect an order that hasn’t been sent, connect your shop in **Connections** (Growth and above). Shopify is built in, so there’s no Zapier or MCP server in between. See [Connect Shopify](https://dazza.io/help/shopify) and [order tracking](https://dazza.io/use-cases/order-tracking).

## Next

- [Verify your customers](https://dazza.io/help/verify-customers) before Dazza shares anything about an order.
- [Add the chat to your website](https://dazza.io/help/install-chat) covers the options, such as opening the chat from your own button.
