theme.liquid is the layout that wraps every storefront page. You paste the widget snippet into it.
Before you start
- A website widget with your store on its Allowed origins list, for example
https://yourstore.myshopify.comand your custom domain. Copy its snippet from Install → Embed snippet.
Add the widget
Open the theme code editor
In Shopify admin, go to Online Store → Themes. On your live theme, open the … menu and choose Edit code.
Paste the snippet before the closing body tag
theme.liquid
YOUR_WIDGET_ID and kl_pk_... with its values.Checkout pages do not use
theme.liquid, so the widget does not appear there.