Help · Add the chat to your site

Add the chat to Shopify

Updated

The chat widget is one line of code. Here's where it goes on a Shopify site, so the chat button appears in the corner of every page.

For more detail, other options and cookie consent, see our guide How to add a custom AI chatbot to your Shopify store.

1. Copy the code

Open your project and go to Settings. Under Widget integration code, choose Copy snippet. Use the code from your own dashboard: it contains your project's ID.

<script src="https://…/pixe-widget.js" data-project-id="…" data-api="…" async></script>

Settings → Widget integration code, with the snippet and its copy button

2. Paste it into Shopify

  1. In your Shopify admin, go to Online Store → Themes.
  2. Next to your live theme, open … and choose Duplicate, to keep a copy to go back to.
  3. On the live theme, open … and choose Edit code.
  4. In Layout, open theme.liquid, paste the code just above the closing </body> tag and choose Save.

When you update your theme to a new version or switch themes, paste the code into the new theme's theme.liquid too. The chat appears on your storefront, not on Shopify's checkout.

3. Check your domains

The widget only runs on your project's allowed domains, in Settings. Add your yourstore.myshopify.com address too if you view the store there, and a theme preview's address while you test a theme.

The chat button doesn't appear

  • Check you edited the live theme, the one at the top of Online Store → Themes.
  • Check the code is in theme.liquid, not in a section or snippet.
  • Check the page's domain is one of the project's allowed domains in Settings.
  • Check the widget isn't turned off in Chat → Widget.
  • Open the browser's console (right-click, Inspect, Console): the chat leaves a short message there when it doesn't load.

Let your website answer for you.

We set up your assistant and site with you, usually within a day. Then your first 2 weeks are free, with real visitors.