How to track visitors on Shopify.
Add your website’s VisitorPing snippet to the storefront theme. This manual setup needs access to theme code and a fresh check after changing or updating your theme.
This installs tracking on storefront pages that use the theme layout. It does not install checkout tracking. Theme changes can remove manual edits; verify tracking again after each change.
What you need
- • A Shopify Online Store with a theme you can edit. A trial of a paid theme must be purchased before editing its code.
- • Staff access that can edit theme code, plus a backup copy of the theme.
- • 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
Copy your website’s snippet
Create your VisitorPing account, add your store, and copy its installation snippet from the dashboard. The example below is a placeholder, not a working installation.
- 2
Back up the theme and open its code
In Shopify Admin, open Online Store → Themes. Duplicate the theme as a backup, then choose Edit code from the theme’s menu.
- 3
Add the snippet to the shared layout
Open layout/theme.liquid. Paste your website’s snippet immediately before </head>, leaving the existing theme code in place, then save. Use only one copy of the tracker.
<script defer crossorigin="anonymous" src="https://cdn.visitorping.com/site/vp_ABC23456.js"></script> - 4
Verify the published storefront
Make sure the edited theme is published. Open the live storefront in a private window, complete any required consent, and visit two pages. Confirm the test visit and page activity in your VisitorPing dashboard.
Recheck after theme changes
Manual theme edits may be lost when you switch themes or apply an incompatible update. Keep a record of the snippet and check the published store after each change. A saved theme file alone does not prove visits are reaching VisitorPing.
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 snippet is saved but no visits appear
- Confirm you edited the published theme and used the snippet for this store. Test the public domain in a private window after completing required consent; check whether a blocker is preventing the script from loading.
- Tracking stopped after a theme change
- Check the new live theme’s layout for the snippet. Add it if missing, then verify a test visit in the dashboard.
- Visits are counted twice
- Check for duplicate installation through theme code, a tag manager, or another integration. Keep only one installation.
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.