Skip to main content

Shopify Tracking Setup: Web Pixels and Customer Events

  • November 2, 2026
  • 8 min read
  • By CYPHEX
Shopify Tracking Setup: Web Pixels and Customer Events

If you run a Shopify store and your ad reports never quite match your orders, the tracking setup is the first place to look. This guide is for owners and marketing leads who need to understand how Shopify tracking works now, pick the right route for GA4, Meta, TikTok or Google Ads, and test it before spending money on traffic. Developers who get briefed on this work will find the technical pointers too.

How Shopify tracking works now

For years the answer was “paste a snippet into the theme, and another one into the checkout settings, and another one into Additional scripts on the thank-you page”. Shopify has been replacing that with customer events. Shopify records what shoppers do (view a product, add to cart, finish checkout) and passes each action to every pixel you have installed. A pixel is a small program that forwards those actions to a tool such as GA4 or Meta. The developer layer under all of this is the Web Pixels API.

Shopify’s pixels overview says pixels load on the storefront, checkout, thank-you page and order status page. Customer account pages are a special case: pixels load there only if you use a custom subdomain for customer accounts, and only the page_viewed event is tracked.

The practical upshot is that checkout tracking no longer depends on editing checkout code. It also means old snippets stop working in places, which is covered below.

The standard events

Shopify’s standard events reference lists 15 events at the time of writing:

GroupEvents
Browsingpage_viewed, product_viewed, collection_viewed, search_submitted, cart_viewed
Cartproduct_added_to_cart, product_removed_from_cart
Checkoutcheckout_started, checkout_contact_info_submitted, checkout_address_info_submitted, checkout_shipping_info_submitted, payment_info_submitted, checkout_completed
Diagnosticsalert_displayed, ui_extension_errored

checkout_completed is the purchase, and it is the one to protect. If a tool misses it, that tool under-reports sales. Everything else is useful context.

You can also publish your own events. Shopify’s custom pixel code page describes sending a custom event from theme Liquid with Shopify.analytics.publish() and then subscribing to it in the pixel, the same way you subscribe to standard ones. Good candidates are things Shopify cannot see by itself, such as a quiz completion or a size-guide open.

App pixels vs custom pixels

App pixelCustom pixel
Built byAn app developerYou or a developer, pasted into the admin
Where it livesInstalled with the appSettings, then Customer events
SandboxStrictLax
Who maintains itThe app vendorYou
Shopify supportVia the appNot supported by Shopify

Shopify is blunt about custom pixels: they are an advanced feature, and you carry the responsibility for consent, security, troubleshooting and updates.

Do I need a custom pixel?

Usually not at first. Install the official channel app for each platform and see what is missing. Reach for a custom pixel when a tool has no Shopify app, when you want events the app does not send, or when you want to run Google Tag Manager. Shopify documents a GTM tutorial for custom pixels, with the same sandbox limits as any other pixel.

What the sandbox does to your plans

Pixels run in an isolated sandbox, away from the page. That protects checkout, and it breaks some habits. According to Shopify’s overview, a sandboxed pixel cannot draw buttons, banners or pop-ups, cannot scrape the page for email or phone fields, and does not see outbound link clicks, scrolling or mouse movement. Heatmap and session-recording tools usually need their own app or theme code.

One more catch: in the lax sandbox the URL the pixel sees may not match the browser’s address bar. Take the page URL from the page_viewed event.

When a vendor says “paste this snippet”, check two things. Shopify’s documentation says any HTML in vendor code has to go because the sandbox only runs JavaScript, so a <script src> tag has to be rewritten as code that creates the script element. And loading a vendor SDK sends nothing by itself. Shopify’s Meta example makes the point directly: you still have to subscribe to events and call the vendor’s tracking function for each one.

Pixels are tied to Shopify’s customer privacy settings. The pixel privacy reference lists four settings a pixel can require: analytics, marketing, preferences and sale_of_data. The pixel manager loads a pixel only when the visitor has allowed every setting it asks for. In consent-required regions such as the EEA and UK, that means nothing runs until the visitor agrees. New pixels require Marketing and Analytics permission by default.

So the sessions you see in GA4 will be lower than total traffic in regions with consent rules. That is the system working as designed. It becomes a problem only when your banner is not connected to Shopify, so declining does not stop tags, or accepting does not start them. Check Settings, then Customer privacy, then test the banner in a browser with clean cookies.

Custom pixel authors can read the visitor’s initial consent from init.customerPrivacy (app pixels) or subscribe to changes with api.customerPrivacy.subscribe('visitorConsentCollected', ...), which returns four booleans such as marketingAllowed. It is the only event name supported there for now.

Privacy rules (GDPR, ePrivacy, CCPA and state laws) differ by country. This is not legal advice; check local law.

GA4, Meta, TikTok and Google Ads: channel app or custom pixel?

SituationWhat we would do
One GA4 property, one Meta pixel, standard storeChannel apps, no custom code
Several platforms plus GTM already in useCustom pixel running GTM, tested tag by tag
Tool with no Shopify appCustom pixel from the vendor’s documentation
Wants custom events (quiz, size guide)Liquid Shopify.analytics.publish() plus a custom pixel
Gaps in Meta or Google conversionsCheck the Facebook & Instagram data sharing level, then read our server-side tracking guide

Our bias is toward fewer moving parts. Every extra tag is something you maintain, and heavy marketing apps slow the store (see third-party app bloat and Shopify performance).

Testing a pixel

Shopify’s custom pixel testing page covers the built-in Pixel Helper. Go to Settings, then Customer events, confirm the pixel shows Connected, open it and click Test. If the helper says the pixel is awaiting consent, accept tracking on your banner. Then browse, add to cart and start checkout while watching the Events received panel: a green dot means the event was subscribed and the callback ran, a red dot means the callback threw an error.

While you are building, a tiny pixel is the quickest way to see what Shopify sends:

// Custom pixel: print every standard event to the browser console while testing.
analytics.subscribe("all_standard_events", (event) => {
  console.log("Event data", event?.data);
});

In Chrome’s console, pick the pixel’s iframe to filter the logs to your code.

The limits: test one custom pixel at a time, logs clear on each page load, and the helper does not work for headless storefronts. After that, check the destination: GA4 Realtime or DebugView, Meta’s Events Manager test tool, and a real order compared line by line across Shopify and each platform.

Third-party checkout apps are worth testing separately. If an app replaces part of checkout and does not emit the standard events, those steps simply will not appear in your pixels.

Old scripts and checkout code

On Shopify’s checkout upgrade page: Additional scripts became view-only for non-Plus stores on 28 August 2025, and 26 August 2026 was the deadline for those stores to upgrade their thank-you and order status pages. Shopify points to web pixels and app pixels as the replacement for event tracking. If your purchase tracking still depends on a pasted script, treat it as broken until you have proved otherwise. Plus stores follow a different timeline, so read Shopify’s current upgrade documentation.

Common Shopify tracking mistakes

  • Counting a purchase twice. The Google channel app, an old gtag snippet and a GTM tag can each report the same order. Choose one source per platform.
  • Wrong revenue. Decide whether revenue includes tax and shipping, and make every tool agree.
  • Testing once. A theme update, a new app or a new banner can change what fires. Retest after each.
  • Skipping the owner. Name one person responsible for tracking, or nobody notices when it quietly breaks.

For campaign data on top of events, read Shopify UTM tracking and attribution.

Launch checklist

  • Consent banner connected and tested with a clean browser
  • One purchase source per platform (GA4, Meta, Google Ads, TikTok)
  • Old Additional scripts and theme snippets reviewed and removed
  • checkout_completed reaches every tool with correct value and currency
  • Test order compared across Shopify, GA4 and each ad platform
  • Third-party checkout apps tested
  • Campaign naming agreed
  • Named owner and a retest date after the next theme change

Frequently Asked Questions

What is the difference between customer events and web pixels?

Customer events are the shopper actions Shopify records, such as viewing a product or completing checkout. Web pixels are the small programs that subscribe to those events and send them to analytics or ad tools. The admin page where you manage them is called Customer events.

Can I still use Google Tag Manager on Shopify?

Yes, as a custom pixel, with the same sandbox limits as any pixel. Tags that depend on reading the page, such as DOM scraping, will not work, so test each tag.

Why do Shopify and GA4 show different numbers?

Consent choices, ad blockers, attribution rules and timing all create gaps. Shopify counts the order itself, while GA4 counts what it observed. Small differences are normal; large ones need investigating.

Does Shopify support custom pixels?

Shopify’s own documentation says it does not support adding or using custom pixels and suggests hiring a Shopify Partner. Plan for your own maintenance.

Does this work on headless stores?

Shopify’s Pixel Helper does not work with headless stores, so check the current Web Pixels API documentation for your setup before you plan on customer events.

Conclusion

A sound Shopify tracking setup comes down to using the official channel apps first, adding a custom pixel only where there is a clear gap, honouring consent, and testing with a real order. Treat tracking as something you retest, not something you finish. If you would like help with this, CYPHEX can plan and deliver it for you, with one project lead as your contact. You can also read about our Shopify services.

Stock photography provided by Pexels under the Pexels License.

Want your online store to sell more?

We can review your store and show you what to fix first to turn more visitors into buyers.

Comments

  1. Loading comments...

Leave a comment

Selling online?

Turn more visitors into orders

A faster, clearer store with better product pages and checkout. We handle Shopify and WooCommerce from setup to growth.

Step 1 of 3

Tell us what you need

Three quick steps. We reply within one business day.

What do you need help with? Pick all that apply