Shopify

How to add an AI chatbot to your Shopify store

Paste one line of code into your theme and Apex Bot answers your shoppers' questions from your own store pages, in Turkish and English.

Before you start

Copy your embed code from Dashboard → Widget → Install & security. It has your own site key filled in and looks like this:

<script src="https://api.apexbot.eu/widget.js" data-site-key="apex_pk_…" async></script>

Editing theme code is safe, but it's good practice to duplicate your theme first (… → Duplicate) so you have a copy to go back to.

Add it to your theme

  1. In your Shopify admin, go to Online Store → Themes.
  2. Next to your current theme, click … and choose Edit code.
  3. Under Layout, open theme.liquid.
  4. Find the closing </body> tag near the end of the file and paste the embed code just above it.
  5. Click Save and open your store in a new tab. The chat launcher appears on every page.

Allow your store's domains

Under Allowed websites add every address your store is reached on: your own domain with and without www, and your your-store.myshopify.com address if visitors or you use it. The widget only runs on the addresses listed.

What to give it

Add your store's address as a knowledge source. Apex reads your sitemap and the pages it links to, up to your page limit. Check that your shipping, refund and payment policies and your FAQ page are included; Shopify's policy pages live under /policies/. Add a text source for anything not on your store yet. More ideas in Apex for e-commerce.

Good to know

  • Checkout. Shopify doesn't load theme code on its checkout pages, so the chat appears on your store pages but not during checkout.
  • Changing themes. The snippet lives in the theme. If you publish a different theme, paste it into that theme's theme.liquid too.
  • Orders. Apex answers from your pages and has no access to your Shopify admin, so it can't look up orders. For order questions it can offer hand-off to your team by email.
  • Hiding it. To keep the chat off certain pages, add their paths under Behavior → Hide on these pages.

If the launcher doesn't appear, see troubleshooting.