Watch Shopify Store Visitors Live (One Script Tag)
Updated
To see live visitors on your Shopify store, paste one script tag into layout/theme.liquid just before </body>, then open your store to watch each shopper's cursor, source and approximate city. Shopify runs checkout on its own pages, so no outside script can see them. You'll see visitors on your store pages and cart, up to the moment they start checkout.
Your script
<script src="https://live.whoisbrowsing.com/s.js" data-site="YOUR_SITE_ID" async></script>Replace YOUR_SITE_ID with your script's ID. No script yet? Get your script. Free. No card, and no account needed.
Paste it on every page of your site, in the <head> or anywhere before </body>. On Shopify, that is one paste: layout/theme.liquid is the part every page of your store shares.
Steps
- In Shopify admin, go to Online Store, click the three-dot menu on your theme, then Edit code (Shopify: edit theme code).
- Open
layout/theme.liquid. Press Cmd/Ctrl + P and type the file name if you cannot find it. - Paste your script just above
</body>. - Save.
Shopify recommends duplicating your theme first as a backup. Shopify also says you can edit theme code only after you have purchased the theme, so a trial of a paid theme must be bought first. Shopify's page states no other plan requirement: check your plan if the Edit code option is missing.
What it covers
| Page type | Covered? |
|---|---|
| Home, collection, product, cart, blog | Yes, they use theme.liquid |
| Checkout | No: Shopify runs it on its own pages |
The script runs on every page your theme draws. Checkout is not one of them: Shopify runs it on its own pages, and the only code Shopify lets in there (sandboxed pixels and checkout extensions) cannot show the page (Shopify: web pixels). The last thing you see is a shopper on your cart, or pressing the button that starts checkout. To find where shoppers hesitate, watch your product and cart pages: they are the last steps before checkout.
When whoisbrowsing is not the right tool
It shows people on your site right now. If you need order reports or history, use Shopify's own analytics. What a live view is good for on a store, and what it never captures, is in live visitors for e-commerce stores.
Verify
Before your visitors see it, add whoisbrowsing to your site's privacy policy (a paragraph to paste), and if the law requires your visitors' consent, get it first: see your responsibilities to your visitors.
- Use your live store, not the theme editor's preview. Open your site once. If the panel shows there, you're watching. If it doesn't, press Watch your site live on the home page. The home page shows the website as "Installed" once the script has loaded (or "Live now" while someone is there).
- To see a visitor arrive, open your site in another tab or window, or press Open a visitor window on the home page. That tab shows up as "you, testing". The tab with the panel is your owner view, and it is never counted.
- Move the mouse in the visitor tab. When both tabs are on the same page, its cursor moves in your owner view, and the panel lists it either way.
If you see nothing on Shopify
- Did you edit the published theme? Changes to a theme that is not published do not reach your live store until you publish it.
- Are you testing the live store? Open your store's own domain, not the theme editor's preview.
- Is the tag above
</body>? Open the page source and search forlive.whoisbrowsing.com. - Is this address in your script's list? Your
myshopify.comaddress and your custom domain are two websites. The script runs only on the websites listed for it, so add the one you open on the home page. If it ran on an address that isn't listed, the home page says so and offers to add it. - Is something blocking it? An ad blocker can stop
live.whoisbrowsing.com. So can a Content-Security-Policy, which most Shopify sites don't send: if yours does, allowscript-src https://live.whoisbrowsing.comandconnect-src wss://live.whoisbrowsing.com. Nothing else is needed: the owner panel adds no inline styles. - Testing from the EU/EEA, UK or Switzerland, or with Global Privacy Control on? Visitors in the EU, Norway, Iceland, Liechtenstein, the UK and Switzerland, and browsers that send Global Privacy Control, are never shown or counted. In those countries nothing is shown, and nothing is kept on our servers: the script is empty there, and a visitor's live connection from there is refused. Your owner panel doesn't appear either. With Global Privacy Control on (Brave sends it by default), the panel still opens, but your own test tabs don't show.
See how it works for what is sent, and the privacy page for what is never sent or stored.
Remove it
- Delete the tag from
layout/theme.liquidand save. Visitors stop showing as soon as the change is live. - To turn the script off everywhere at once, delete it: open Site details from your script on the home page (or, if you signed in, the script's page in your dashboard), press Delete this script… and confirm with Yes, delete. If the tag stays on a page, the live server refuses it: nothing is shown, and nothing is kept on our servers.
See who is on your website, right now
Type your website, paste one line, and watch your visitors live. No account needed.
Free · Under 4 KB · No cookies on your visitors · No data stored about your visitors