Skip to content
Channels4 min read

Add the chat to Shopify

Put your bot's website chat on a Shopify store with the embed snippet, as a bubble on every page or inside one page, from the theme editor.

Shopify needs no plugin: the website chat snippet goes into a Custom Liquid section in the theme editor. You paste it once. Everything about how the chat looks and what it says stays in Meerlume. The bot takes bookings and answers the questions in your flow; it can't look up orders, stock or products.

Before you start

  • Website chat connected to your bot, and the bot published. Connect website chat walks through it; it is on every plan, Free included.
  • Access to your store's Online Store settings, on an Online Store 2.0 theme such as Dawn or Horizon. On an older (vintage) theme, use the theme.liquid route below. Shopify's Starter plan only lets you change a few theme settings, not add sections or code, so the snippet can't go on a Starter store.
  • Shopify suggests duplicating your theme before you change it: in Online Store, open the ⋯ menu next to the theme and choose Duplicate.

Copy the snippet

In Meerlume, open your bot's settings and the Website chat tab. Switch the preview to Bubble for a chat on every page, or to In the page for a chat inside one page, and press Copy code.

Bubble on every page

A Custom Liquid section in the footer loads on every page of the store.

1

Open the theme editor

In your Shopify admin, go to Online Store and press Edit theme on your current theme.

2

Add a Custom Liquid section to the footer

In the sidebar, under Footer, press Add section and choose Custom Liquid. Your theme's own documentation says where it is if the name differs.

3

Paste and save

Paste the Bubble snippet into the Liquid code box and press Save. Open your store in a new tab and the bubble is in the corner.

Prefer editing code?

You can paste the snippet just before </body> in layout/theme.liquid instead, from Online Store → ⋯ → Edit code. Shopify keeps theme editor sections when a theme updates, but if your code edits conflict with an update it can't carry them over and you have to copy them in again, so the Custom Liquid section is the safer place.

Chat on one page

For a Book now page, give that page its own template with the chat inside it.

1

Create a page template

In the theme editor, open the template drop-down at the top (it starts on Home page), choose Pages, and press Create template. Name it, for example booking.

2

Add the chat

In the new template, press Add section, choose Custom Liquid, paste the In the page snippet and press Save.

3

Use the template on your page

In Online Store → Pages, open the page, set Theme template to the one you created, and save.

The chat grows with the conversation. Add data-height="600" to the script tag to pin it to a fixed height instead.

How it looks

Theme, brand colour, bubble position and greeting are set in Meerlume, in the bot's Website chat tab, not in Shopify. The chat reads them every time it loads, so you never edit the snippet again. How it looks, in Connect website chat, covers each setting.

If the chat doesn't appear

  • Check that the bot is published and Website chat is connected. Until both are true the bubble is not shown, and a chat inside a page tells visitors the business isn't taking messages right now.
  • Switching to another theme leaves the section behind in the old one. Add the Custom Liquid section to the new theme too.
  • If you edited theme.liquid and then updated the theme, check the new version still has the snippet, and paste it again if not.
  • A store still behind its password page shows visitors that page, without the chat. Preview the store from the theme editor, or check again once the password is off.
  • The chat doesn't show in Shopify's checkout, which doesn't run theme scripts. It shows on every other page, cart included.

To remove the chat, delete the Custom Liquid section, or the snippet from theme.liquid. Your conversations, contacts and bookings stay in Meerlume.

Related guides

Continue with the next part of the setup once this step is stable.