On your website

Chat on Shopify

Add the website chat line to a Shopify store's theme, in the code editor or with a Custom Liquid section, and the pages it doesn't reach.

The chat goes in your store's theme, so it shows on every storefront page.

Before you start

  • The line, with your key in it. Steps 1 to 4 of Add chat to your website cover it.
  • A key for every address the store answers on. That's your domain, its www address and the store's own .myshopify.com address, for example https://example.com, https://www.example.com and https://example-store.myshopify.com.
  • Staff permissions. The theme editor needs Themes under Online store. The code editor needs Edit code as well. A paid theme's code can only be edited once you've bought the theme.
  • A backup. Go to Online Store > Themes, click the ... button next to your live theme and choose Duplicate. Shopify names the copy "Copy of" and the theme's name.

In the code editor

  1. In Shopify admin, go to Online Store > Themes.
  2. Next to your live theme, click the ... button, then Edit code.
  3. Under Layout, open theme.liquid.
  4. Find </body> near the end of the file.
  5. Paste the line on its own line just above </body>, then choose Save.

The end of the file then looks like this:

    <script src="https://app.verticalai.com.au/embed/widget.js" data-key="pk_live_xxxxxxxx" async></script>
  </body>
</html>

theme.liquid is the layout every page of the theme is built on, so the button shows on every page. If you edit the store with an AI assistant, ask it to add the line just above </body> in layout/theme.liquid.

In the theme editor, with no code

  1. Go to Online Store > Themes and choose Edit theme next to your live theme. Some stores still label the button Customize.
  2. In the sidebar, find the Footer area and choose Add section.
  3. Choose Custom Liquid and paste the line into its box.
  4. If the section has top and bottom padding settings, set both to 0 so it adds no gap above the footer.
  5. Choose Save.

The footer is shared by every page of the store, so the line loads everywhere.

What it doesn't reach

  • Other themes. The line lives in this theme only. When you publish a different theme, add the line to it too.
  • Checkout. Shopify's checkout, Thank you and Order status pages don't run theme code, so the chat button isn't on them.
  • The password page. While the store is password protected, visitors see a page built from a different layout file, so the button won't show until the store opens.

The cart drawer

When the cart drawer, the mobile menu or the search opens and stops the page scrolling, the chat button steps aside so it never covers the drawer's Check out button. It comes back when the drawer closes.

Check it

Open the store in a private window and follow Check it works. If the panel says chat isn't available, the address in your browser is probably missing from the key: see When it doesn't work.

Shopify's own help

On this page