How to track visitors on Shopify.
One toggle in the theme editor. You never touch theme.liquid, and the tracking survives a theme change — which is the usual reason analytics quietly stops working on a Shopify store.
What you need
- • A Shopify store on an Online Store 2.0 theme — Dawn, Refresh, Impulse, Prestige and every current theme qualify.
- • Staff access that can edit themes.
- • A VisitorPing site key, in the form vp_ABC23456 — the prefix vp_ and eight characters. The alphabet leaves out I, O, 0 and 1, so there is nothing to misread when copying it.
Install it
- 1
Install the VisitorPing app
Add VisitorPing from the Shopify App Store to your store. It installs a theme app extension rather than editing your theme.
- 2
Open the theme editor
In Shopify Admin go to Online Store → Themes, then click Customize on your live theme.
- 3
Turn on the app embed
In the left sidebar open the App embeds tab — the icon looks like a puzzle piece. Find VisitorPing Tracker and toggle it on.
Paste your site key into the field that appears, then click Save at the top right.
- 4
Check the live storefront
Open your storefront in a private window and view the page source. The tracking tag should appear in the head on every page — home, collection, product and cart.
<script defer crossorigin="anonymous" src="https://cdn.visitorping.com/site/vp_ABC23456.js"></script>
Why this survives theme updates
The older way to add tracking to Shopify was pasting a script into theme.liquid. That works until you change or update your theme, at which point the edit is gone and nobody notices for weeks.
A theme app extension is stored against the app rather than the theme, so switching themes keeps the tracking. If you have an old script pasted into theme.liquid from a previous tool, remove it — two copies of a tracker will double-count every visit.
What you will actually see
Per visit: the city and region the network resolves to, where the visitor came from, the page they landed on, their device and browser, and whether they have been before.
You do not get a name, an email address, or an identity. Nobody can give you that from a page view, whatever the marketing says. Geolocation resolves a network rather than a doorstep, so a visitor on a VPN or a mobile network can appear in the wrong city entirely. Treat location as a hint.
You are collecting visitor data, so say so in your privacy notice and check which consent rules apply where your customers are — a question for your own legal advice, not for a setup guide.
If it is not working
- The toggle is on but nothing appears on the storefront
- Check you customised the live theme rather than a draft. Shopify lets you edit an unpublished theme, and the app embed applies only to the theme you saved it in.
- You see no visits at all
- You are probably excluded as staff, or looking at a preview URL. Test from your phone on mobile data against the public domain.
- Visits are counted twice
- An older script is still pasted in theme.liquid alongside the app embed. Remove the manual one.
Find what is costing you search clicks, then watch the fix work.
VisitorPing reads your own Search Console data for the pages losing clicks, then rings your phone the moment someone lands on your website.