Skip to content

How to add live chat to a Shopify theme

A chat widget can help shoppers ask about an item while they are still looking at it. On Shopify, HTchat is installed with a script in your theme; it is not a Shopify App Store integration.

By the HTchat team · Practical guide

Online store packing desk with a laptop showing a conceptual product page and chat
An illustrative store scene with a conceptual chat panel; no actual merchant, Shopify store or sales result is depicted.

Plan the installation

Shopify's theme code is separate from its checkout. Do not assume a theme script will appear on every checkout or post-purchase screen.

Get your own snippet

Create an HTchat account and copy the installation snippet from your business settings. The widget key in that snippet belongs to your business; do not use a screenshot or example key.

Back up your theme

Duplicate your theme before editing. Shopify recommends making a copy so you can revert changes if needed, and notes that code changes may not transfer to an updated theme.

Add the script and test

Install once in the layout, not separately on every product page.

Edit theme.liquid

In Online Store → Themes, choose Edit code on the theme you want to change. Open layout/theme.liquid and place the snippet immediately before the closing body tag. Save your change.

Use a private browser window

Open a product page and a collection page as a visitor. Send a test chat and confirm it arrives in your HTchat inbox. Check phone width and a consent banner if your store uses one. Our ecommerce live chat solution page covers what stores can expect.

Know the boundary

A support widget is not an order-management integration.

No automatic order lookup

With live visitor tracking, the team can see the page the shopper is viewing and what they type, but HTchat does not automatically pull Shopify order or customer records into the conversation.

Checkout needs separate verification

Shopify's checkout has different customization rules. Test your own plan and checkout flow; do not promise the chat bubble will appear there solely because you installed it in the theme.

The takeaway

The meaningful test is a real message sent from your storefront and received in the inbox. Keep the theme backup and record where the snippet was added.

Further reading

After your Shopify chat is live

Train the assistant

Add your shipping, returns and sizing pages to the AI agent so it can answer shoppers at night.

Common questions about HTchat

What visitor data do you collect?
Current page, referrer, browser, operating system, device type and approximate location (country/city), plus whatever name and email the visitor chooses to share. We never collect form contents, passwords or payment details.
How do I reset my password?
On the sign-in page click "Forgot password?" and we'll email you a reset link.
How much does HTchat cost?
Pricing is coming soon. All features are free while HTchat is in beta.
Can I change the widget colour and greeting?
Yes — Settings → Widget lets you set the colour, greeting text and left or right position, with a live preview.

Keep exploring HTchat

  • Live visitors

    See who is on your website right now, which page they're reading and where they came from — with privacy by design: no query strings or form data stored.

  • Wix live chat

    Add HTchat live chat to a Wix site through Settings → Custom Code. Answer visitors from a shared inbox with page and source context.

  • Live Visitors

    See who is chatting right now. A live view of visitors active in conversations, with the page they're on and where they came from.

  • Your first conversation

    Install the widget, send a test message and answer it from the inbox.

  • Using the shared inbox

    Open, closed and all conversations, unread counts and replies.

  • Email, browser and sound alerts

    Choose which alerts you receive.

  • Messages aren't arriving

    What to check if replies or messages seem stuck.

  • When should an AI chat agent hand off to a person?

    Set practical boundaries for an AI support agent: use approved answers, recognize uncertainty, hand off difficult questions and review outcomes.

  • Chat widget

    A chat widget you can brand: your logo, colour, greeting, name and position, with online/offline wording. Full-screen on phones, floating on desktop.

  • WordPress live chat

    The HTchat WordPress plugin adds live chat to your site and connects it to your HTchat inbox with a one-time code — no passwords stored on your site.