Platforms

How to track a Shopify store: visits, sources and every order

What Shopify's own analytics shows, where browser tags stop at checkout, and how to see each order with the ad, post or link that brought it.

On this page

Shopify already has good analytics: sessions, conversion rate, sales by channel and a choice of attribution models, with "last non-direct click" as the default (Shopify). For many stores it is the first report to read. It stops in three places: it only sees your Shopify storefront, it cannot show the ad-level detail your ad platforms optimize on, and it does not send anything back to those platforms by itself.

Where browser tags stop on Shopify

Shopify's checkout is not part of your theme, so a script pasted into theme.liquid does not run there. Since August 2026, script tags on the order status page no longer run for any store either (Shopify). Shopify's answer for tracking in checkout is web pixels, added under Settings, Customer events, which run in a sandbox with the events Shopify chooses to share.

The practical consequence: a tag in your theme sees browsing and add to cart, but the purchase itself should come from Shopify's own order data, not from a script on the thank-you page.

Install Sporetag on Shopify

  1. In Sporetag, add your store's address and copy the tag from Set up your site.
  2. In your Shopify admin, open Online Store, then click the ... button next to your current theme and choose Edit code.
  3. In the layout folder, open theme.liquid.
  4. Paste the tag on the line just above </head>, then click Save.
  5. Back in Sporetag, click Check my site, then open your store in a new tab. Your first visit shows up in a minute or two.

The step-by-step version with screenshots of the right buttons is in the Shopify install guide. Use the address customers see, such as yourshop.com, not the myshopify.com one, unless that is what they see.

Add the orders

The tag counts visits, sources and pages. Orders come from the Shopify connector, on paid plans:

  • It reads paid orders, refunds and new customers from the last 90 days, then stays current with webhooks and a check every 15 minutes.
  • It reads the first and last visit Shopify kept before each order, with their landing pages and UTM tags, and click ids such as fbclid and gclid.
  • With 90-day tracking, a short snippet saves the visitor's first-party id on the cart, so an order can be tied to visits from earlier days.
  • Orders count once, even if your site also sends them, because they share the order id.

Today the connector uses a custom app you make in your store's admin, with read-only access. A one-click "Connect with Shopify" login is (when shipped).

Send orders back to Meta

Mark a goal on Purchase as "send to Meta" and new paid orders go to the Meta Conversions API once, with hashed email and phone and the event id shopify- plus the order id. If you also send purchases from Shopify's own Meta channel, read the Conversions API guide first: two senders with different event ids count each order twice.

What you can read after setup

  • Revenue and orders from Shopify itself, by source, campaign, ad set and short link.
  • First touch and last touch side by side in the attribution report.
  • Ad spend from Meta, or any platform by CSV, beside that revenue.
  • Each customer's visits, orders and refunds on one profile.

Common questions

Does Shopify have analytics built in?

Yes. Every plan has sessions, sales and conversion reports, with deeper reports on higher plans. Add a separate tool when you need ad-level attribution, conversions sent back to ad platforms, or one view across a store and other sites.

Why does my analytics tool not count Shopify checkouts?

The checkout does not run theme scripts. Read orders from Shopify's data instead, through a connector or an app, and the count will match your store.

Can I track Shopify sales from Instagram?

Yes. Tag your bio and story links, or use a short link, so visits arrive with utm_source=instagram. Shopify keeps those tags on the order's visit, and the connector reads them. See how to track an Instagram link in bio.

Do I need a developer?

No. The tag is one line pasted into your theme, and the connector is a form.

Sources

Spotted something wrong or out of date? Email hello@sporetag.com and we will fix it.