Skip to main content
Security notice: The Life Inside platform is not affected by the PHP vulnerabilities CVE-2026-109618 and CVE-2026-109619. No action is required for your use of Life Inside. Assessed 23 October 2026. Questions: legal@lifeinside.io

Shopify AI chatbot: how to add one to your store

A Shopify AI chatbot earns its place when it answers the questions that stop a purchase: will it fit, when will it arrive, can I return it. Life Inside's AI Chat Agent answers from your product pages, size guides and delivery and returns policies, and you add it to your theme with one snippet.

This guide covers both ways to add it: theme code in theme.liquid, and the theme editor route Shopify prefers. For what the agent does in retail, see e-commerce. For other platforms, see all install guides. Prefer help? Book a demo and Life Inside can install it with you.

What you need

  • Access to Online Store in your Shopify admin and permission to edit themes.
  • If you edit code: a purchased theme. Shopify only lets you edit a paid theme's code after you buy it, not while you are trying it.
  • A backup. Shopify recommends duplicating your theme before you edit its code.
  • Your Life Inside snippet with your own widget ID, sent by Life Inside when your agent is set up.
  • A Life Inside AI Agent plan. See the pricing page.

Add the Life Inside snippet to Shopify

Your snippet, with your own widget ID, comes from Life Inside when your agent is set up. It looks like this:

<script>
  (function () {
    var s = document.createElement("script");
    s.src = "https://widget.lifeinside.io/loader/latest/widget";
    s.charset = "UTF-8";
    s.async = true;
    s.onload = function () {
      WidgetWrapper.mount({ id: "YOUR_WIDGET_ID" });
    };
    document.body.appendChild(s);
  })();
</script>
  1. From your Shopify admin, go to Online Store.
  2. Next to your theme, click the horizontal menu (...) and choose Edit code.
  3. In the layout folder, open theme.liquid. This is the theme's default layout, which your store's pages are rendered through.
  4. Search the file with Ctrl + F (Command + F on a Mac) for the closing body tag near the end.
  5. Paste the Life Inside snippet on the line just above the closing body tag.
  6. Click Save.

Add chatbot to Shopify without editing code

Shopify's own advice is to edit theme code only when you can't make the change with an app or the theme editor. If your theme includes a Custom Liquid section, which takes HTML, you can paste the snippet there instead. In the theme editor, the footer area is shared by every page of the store, so a section added there loads everywhere.

  1. From your Shopify admin, go to Online Store and click Edit theme next to your theme.
  2. In the sidebar, under the footer, click Add section and choose Custom Liquid. If it is not in the list, your theme does not offer it; use theme.liquid instead.
  3. Paste the Life Inside snippet into the section, then click Save. If you are editing your published theme, click Publish to make the change live.

theme.liquid or Custom Liquid: which to choose

The difference shows up when your theme updates. Shopify copies changes made in the theme editor, such as a Custom Liquid section, to the updated theme. Code edits are carried over only if they don't conflict with the update; if they do, the theme card says the code edits could not be included, and you paste the snippet into theme.liquid again.

So: Custom Liquid if your theme has it, theme.liquid if it does not or if a developer already maintains your theme code. Either way the snippet ends up near the end of the page, where it can add the widget to the page body.

What a Shopify chatbot should answer

Shoppers ask what product pages answer only halfway: the difference between two models, how a size runs, whether something ships to their country. The agent answers from the content you approve and guides the shopper to the right product or collection page. Questions about a specific order go to your customer service: the agent points the shopper to the right contact instead of guessing.

  • Product video in the chat: the agent can present the right interactive video in the same window, such as a product demo or an expert explaining, and the shopper keeps chatting. Lyko connects buyers with experts through interactive video.
  • Cross-border stores: answers in more than 60 languages, in the language the shopper writes in.
  • What shoppers ask before buying: AgentLoop shows topics, drop-offs and knowledge gaps with suggested fixes, which often point to product copy worth rewriting. It can also send events to GA4.

Keep the chatbot off some pages

Site-wide placement suits most stores. If you want the agent only on certain pages, add the Custom Liquid section to the template area of those templates, such as product pages, instead of the shared footer. With theme.liquid, a developer can wrap the snippet in a Liquid condition based on the page template.

Check that it works

  1. Open your store in a private browser window, on a computer and on a phone.
  2. Look for the Life Inside widget in a bottom corner of the page.
  3. Ask about a product, a delivery time and your returns policy, then something your content does not cover. The last answer should say it does not know and point to customer service.
  4. Confirm the conversations appear in AgentLoop.

Frequently asked questions

No. Life Inside installs with one snippet, either in a Custom Liquid section in the theme editor or in theme.liquid just above the closing body tag. Life Inside can install it with you.

Not if you used a Custom Liquid section: Shopify copies theme editor changes to the updated theme. Code edits in theme.liquid carry over only if they don't conflict with the update. If Shopify says the code edits could not be included, paste the snippet in again.

The agent answers from the content you approve, such as product pages and delivery and returns policies. Questions about a specific order go to your customer service: the agent points the shopper to the right contact.

The snippet loads the widget script asynchronously, so the browser keeps loading your store while the widget loads. It sits near the end of the page rather than in the head.

No. The Life Inside website widget sets no cookies. Conversation data is hosted in the EU, encrypted at rest and in transit, and covered by a data processing agreement.

Yes. The agent answers in more than 60 languages, in the language the shopper writes in, from the same approved content.

Pasting the snippet takes a few minutes. Life Inside builds the knowledge base with you from your store content, and most agents go live within a day.

Sources

Updated 2026-10-27