Install the Chat Widget on Shopify

Vaishali

Vaishali

May 13, 2026

Adding the SparrowDesk chat widget to your Shopify store lets customers reach your team while they browse or shop.

This involves editing your store's theme code. If that sounds unfamiliar, ask someone on your team to help.

Copy Your Widget Code

  1. In SparrowDesk, go to Settings → Chat Widget → Installation
  2. Click Copy Code to copy the snippet to your clipboard

Image

Add the Code to Your Shopify Store

  1. Log in to your Shopify Admin
  2. Go to Online Store → Themes
  3. Click Edit code on your active theme (this may appear under a menu or directly as a button, depending on your theme)

Image

  1. In the left panel, open the Layout folder and click theme.liquid

Image

  1. Find the closing </body> tag near the bottom of the file

Image

  1. Paste the SparrowDesk code on the line directly above </body>
  2. Click Save

Image


The widget will appear on every page of your store. The theme.liquid file acts as the site-wide layout, so you only need to add the code once.

Tip: Not sure if you found the right spot? The snippet is a <script> tag. It should sit directly above </body> with nothing between them.

Check the Installation

  1. Open your store in a browser- the chat widget should appear in the corner

Image

  1. Go back to Settings → Chat Widget → Installation in SparrowDesk
  2. If the widget is detected, you'll see Widget Installed

Image

Restrict Your Widget to Your Store (Recommended)

By default, your widget code works on any website. To lock it to your store only:

  1. Go to Settings → Chat Widget → Make your Chat Widget Secure
  2. Add your store's domain — e.g. yourstore.myshopify.com or www.yourstore.com
  3. If you use both a Shopify domain and a custom domain, add both separated by a comma
  4. Click Save

Image

  • Leave out https:// and any trailing slash
  • Use *.yourstore.com to cover all subdomains at once
  • There is no limit on how many domains you can add

Troubleshooting

Widget not showing after saving?
Check that the snippet is placed before </body> in theme.liquid and that the file was saved. Unsaved files show a dot or asterisk next to the filename in Shopify's editor.

Widget showing on some pages but not others?
The snippet is in the right file- theme.liquid covers every page. If a page is missing the widget, it may be using a separate layout file. Check with your theme developer.

Can't find the Edit code option?
Some Shopify plans restrict code editing. Check your plan or contact Shopify support.

FAQ

  1. Do I need a Shopify developer account to do this?
    No. Any Shopify store owner or staff member with theme permissions can edit the theme code. If you're unsure about your permissions, check under Settings → Users in your Shopify Admin.
  2. Will this slow down my store?
    The widget script loads asynchronously, meaning it doesn't block your pages from loading. Your store speed is not affected.
  3. Can I add the widget to only one page, like the product page?
    Yes, but it requires editing a page-specific template instead of theme.liquid. Ask your theme developer to place the snippet in the correct template file for that page.
  4. What if I switch Shopify themes later?
    You'll need to add the snippet again to your new theme's theme.liquid file. The widget code itself stays the same - just repeat adding the code.
  5. Can I use the same widget code on another website too?
    Yes. The same code works across multiple sites. If you've allowlisted domains, add the new domain to your list in Settings → Chat Widget → Make your Chat Widget Secure.


Powered By SparrowDesk