live chat on shopify that doesn't slow your store

A Shopify store lives on its product pages, and every shopper pays for every script on them. This guide adds Spookat to a Shopify theme with one tag, shows how to tell your team which customer is writing, and covers the things that are specific to Shopify: theme updates, checkout, markets and the performance report.
what you’re adding
One script tag. It loads the launcher from our CDN, under 4 kb gzipped, with the look you picked inside. It makes 0 requests to our API until a shopper clicks it, and never sets a cookie. Then the chat panel loads, and the message lands in your Slack thread, or in our inbox and its phone app.
What you’re not adding: an app that injects its own scripts into every page, a tracking pixel that reports every visit, or a panel that loads for shoppers who never open it. The pillar guide goes into why that matters for any site.
before you start
Add the store in the Spookat dashboard with the domain shoppers use, for example yourshop.com. The chat connects only from that domain and its subdomains, so if you also serve the store on yourshop.myshopify.com, the launcher shows there but the chat won’t connect. The install page gives you the snippet:
<script src="https://cdn.spookat.com/s/YOUR_SITE_KEY.js" async></script>
add it to the theme
In your Shopify admin:
- Go to Online Store, then Themes.
- On your current theme, open the menu and pick Edit code.
- Open
layout/theme.liquid. - Find the closing
</body>tag near the end of the file, and paste the snippet on the line above it. - Save.
theme.liquid wraps every page of the storefront: home, collections, products, cart, pages, blog, account. One tag there puts the chat everywhere. Keep async: the store renders without waiting for the chat.
We’ve also built a Spookat app embed for Shopify’s theme editor, where you’d switch the chat on and the app fills in your site key, instead of editing code. Until you find it in the Shopify App Store, the tag in theme.liquid is the way, and it’s what the embed does anyway.
theme updates
Here’s the Shopify catch: when you install an updated version of your theme, Shopify adds it as a new theme, and your code edits don’t come along. After a theme update, open theme.liquid in the new version and paste the tag again, before you publish it.
Two ways to make this less likely to bite:
- Write it down. A line in whatever notes you keep for the store: “after a theme update, re-add the Spookat tag to theme.liquid.”
- Check after every publish. Open the store in a private window and look for the launcher. Ten seconds.
the look
The look you publish in the Spookat dashboard travels inside the launcher, so the tag above is all Shopify needs. Pick a style that fits your theme (8 of them), set your brand color as the accent, and choose which corner. If your theme puts something in the bottom right on mobile (a sticky add-to-cart bar, a back-to-top button, a cookie settings icon), move the launcher to the left.
If you’d rather keep settings in the theme, set window.Spookat above the tag:
<script>
window.Spookat = { style: "clean", accent: "#2F6FEB", side: "left", lang: {{ request.locale.iso_code | json }} };
</script>
<script src="https://cdn.spookat.com/s/YOUR_SITE_KEY.js" async></script>
lang from request.locale makes the widget speak the language of the market the shopper is browsing, if it’s one of the widget’s 12. Otherwise it follows the shopper’s browser, then English.
markets on several domains
Shopify Markets can serve each country from a subfolder (yourshop.com/de), a subdomain (de.yourshop.com) or its own domain (yourshop.de). The first two are covered by one Spookat site registered as yourshop.com. A separate domain is a separate Spookat site, with its own key, and the tag in theme.liquid has to pick the right key per domain:
{% if request.host contains 'yourshop.de' %}
<script src="https://cdn.spookat.com/s/YOUR_DE_SITE_KEY.js" async></script>
{% else %}
<script src="https://cdn.spookat.com/s/YOUR_SITE_KEY.js" async></script>
{% endif %}
Pay for those sites through Spookat and, once one pays full price, every other one is 30% off. A site billed through our Shopify app pays Shopify instead, with no discount. If one team answers every market, one Slack channel can take all of them. On agency, one site can also route chats to different channels by language, page or country, so German questions go to the people who read German.
who is writing: logged-in customers
On pro and above, you can pass the signed-in customer’s id. Your team then sees logged in as 7493021 on the chat’s card in Slack and can look the customer up in Shopify without asking for an email or an order number. The id is signed with a secret, so nobody can pose as another customer.
Liquid can sign it on Shopify’s side, before the page reaches the browser, with the hmac_sha256 filter:
{% if customer %}
{% assign spookat_id = customer.id | append: '' %}
<script>
window.Spookat = { user: { id: {{ spookat_id | json }}, sig: {{ spookat_id | hmac_sha256: 'YOUR_IDENTITY_SECRET' | json }} } };
</script>
{% endif %}
<script src="https://cdn.spookat.com/s/YOUR_SITE_KEY.js" async></script>
Make the identity secret on the dashboard’s install page. The secret sits in your theme code: shoppers never see it, because Liquid renders on Shopify’s servers and only the signature reaches the page. Staff who can edit the theme can see it, so treat theme access accordingly, and rotate the secret in the dashboard if someone leaves. Rotating makes every old signature wrong at once, which is the point.
If you set the look in code too, merge both into one window.Spookat.
checkout
Shopify’s checkout doesn’t run your theme’s code, so the chat isn’t there. Most questions come earlier anyway: on product pages (sizes, stock, delivery times) and in the cart (shipping costs, discount codes). The order status page after checkout is also Shopify’s own.
If you want a way to reach you from the checkout, a line in your checkout settings or order confirmation pointing to your contact page works; the chat is on that page.
the performance report
Shopify’s web performance report tracks your storefront’s Core Web Vitals, measured on real visits. Scripts that load and run before any interaction are what move those numbers. The launcher is 2 kb and does nothing until clicked, so it shouldn’t show up there.
You can check it yourself without waiting for the report:
- Open a product page in a private window with DevTools.
- Network, “Disable cache”, reload, filter
spookat: one request, the launcher fromcdn.spookat.com. Two, both fromcdn.spookat.com, if your code sets a style inwindow.Spookatthat isn’t the one you published. Nothing toapi.spookat.com. - Application: no cookies from Spookat. Shopify sets its own cookies; none of them are ours.
- Run Lighthouse in mobile mode a few times with and without the tag, and compare the medians.
what shoppers see
A small button in the corner of every storefront page, in your colors. Nothing moves, nothing pops up. When they click, the panel opens with your greeting and a line that a person answers. They type their question on the product page they’re looking at, and they can keep browsing: the chat stays with them from page to page, and when they come back tomorrow on the same device. A reply they missed is waiting when they open the chat again.
answering
Connect Slack in the dashboard. Each shopper gets their own thread, and the card shows the page they’re on, so “is this in stock” arrives with the product URL attached. The Slack guide covers replying, taking and closing chats.
When a shopper leaves before you reply and gave an email, pro and up send them your reply by email, in the widget’s language, with a link back to the chat. For a store, that gives an abandoned question a second chance: the answer reaches them after they closed the tab.
headless stores
If your storefront is a custom front end on Shopify’s APIs (Hydrogen or your own framework), there is no theme.liquid. Add the tag to your app’s root layout instead, the same way as any React app; the Next.js guide shows the pattern, including signing the customer’s id on the server.
a few store habits
- Put your shipping and returns facts in the greeting only if they fit in a sentence. Otherwise keep the greeting short and answer in the thread.
- Answer from your phone. The Slack app on it gets the ping, and a reply typed on the bus reaches the shopper like any other.
- Use internal notes for order lookups.
// order #1042 shipped yesterday, tracking in Shopifyhelps whoever picks the chat up next.
checklist
- The tag above
</body>inlayout/theme.liquid, withasync. - The store’s real domain registered in the dashboard.
- Optional: the look and the signed-in customer in
window.Spookat. - Re-add the tag after every theme update.
- Checked on a product page: one request before a click (two, both from
cdn.spookat.com, if your code sets a style you didn’t publish), no Spookat cookies. - Slack connected.
It costs $4.99 a month per store on starter, and the trial is 14 days with no card.