Add the RoutMe chat widget to a Shopify theme
To add the RoutMe chat widget to Shopify, create a widget in RoutMe, duplicate your theme, open Edit code, and paste the script tag into theme.liquid before the closing body tag. It takes about fifteen minutes. This covers storefront theme pages, and is written from Shopify and RoutMe documentation.
- 1
Create a chat widget in RoutMe
In the RoutMe dashboard open Chat widget, choose Add widget, name it, and list your allowed origins exactly, including the scheme. Add your primary domain, the www variant and your myshopify.com domain.
- 2
Copy the embed snippet
Copy the script tag shown in the dashboard. It loads asynchronously and carries your public widget key.
- 3
Duplicate your live theme
In Shopify admin go to Online Store, Themes, and duplicate the theme you will edit, as Shopify recommends, so you can discard changes if needed.
- 4
Open the theme code
On the duplicate, open the menu and choose Edit code.
- 5
Paste the snippet in theme.liquid
Open layout/theme.liquid, the default layout every theme includes, and paste the RoutMe script tag just before the closing body tag. Save.
<script src="https://cdn.routme.io/widget.js" data-widget-key="YOUR_WIDGET_KEY" async ></script> - 6
Preview, then publish
Preview the duplicate, confirm the launcher appears and a test message gets an answer, then publish the theme.
Next, connect store data so the assistant can answer order questions. Read the Shopify API options and the guide to looking up order status safely.
Sources
Frequently asked questions
Why duplicate the theme first?
Shopify recommends duplicating a theme before customizing it so you have a backup copy and can discard changes easily.
Which file do I edit?
layout/theme.liquid. Shopify documents theme.liquid as the default layout file that every theme must include.
The widget does not appear. What should I check?
Check that the page origin exactly matches an allowed origin on the widget, including https and the www variant. A request from an origin that is not listed is refused with a 403. Also confirm you are viewing a page rendered by the theme you edited.
Can I do this without editing code?
RoutMe has no Shopify app today, so the theme snippet is the supported route. An agency or developer can do it in a few minutes.