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.comaddress, for examplehttps://example.com,https://www.example.comandhttps://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
- In Shopify admin, go to Online Store > Themes.
- Next to your live theme, click the ... button, then Edit code.
- Under Layout, open
theme.liquid. - Find
</body>near the end of the file. - 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
- Go to Online Store > Themes and choose Edit theme next to your live theme. Some stores still label the button Customize.
- In the sidebar, find the Footer area and choose Add section.
- Choose Custom Liquid and paste the line into its box.
- If the section has top and bottom padding settings, set both to 0 so it adds no gap above the footer.
- 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
- Editing theme code
- Layouts and
theme.liquid - Adding sections in the theme editor
- Duplicating a theme
- Staff permissions
- Checkout and theme code
Related
Add chat to your website
Turn website chat on, make a key for your site, paste one line on every page and check the agent answers. Start to finish, with screenshots.
Chat on WordPress
Add the website chat line to a WordPress site with a header and footer plugin, or in a classic theme's footer, on self-hosted WordPress and WordPress.com.