Tracking

Shopify Tracking After Privacy Changes: Web Pixels, Meta CAPI, Google Tags and Consent

Ad blockers, consent banners and Shopify's move to sandboxed pixels changed how tracking works. Here is a clean, privacy-respecting setup that ad platforms can still learn from.

If your Meta or Google Ads dashboards report fewer purchases than Shopify does, that's normal, but the size of the gap matters. A big gap starves ad algorithms of the conversion signal they optimize toward, and you end up paying more for the same customers. This guide is for founders and marketing leads who want a tracking setup that is accurate enough to trust, respects customer consent, and doesn't depend on old scripts Shopify has been retiring.

Key takeaways

  • On Shopify, browser tracking now runs through Customer Events: app pixels and custom pixels running in a sandbox, including on checkout and the Thank you page.
  • Server-side events, such as Meta's Conversions API, recover signal that ad blockers and browser limits cut off. Use them alongside the browser pixel, not instead of it.
  • Send each event once per channel and deduplicate with a shared event ID. Double-counting is as damaging as undercounting.
  • Consent controls everything. In markets that require it, Shopify's pixels only fire after the visitor grants permission, and Google's consent mode sets how its tags behave.

What changed, and why old setups broke

Three changes stacked on top of each other:

  1. Browsers and ad blockers restrict third-party scripts and cookies, so browser-only pixels miss a share of real visits and purchases.
  2. Consent requirements in places like the EEA and UK mean some visitors never allow marketing tags to run.
  3. Shopify moved tracking into sandboxes. Checkout Extensibility replaced checkout.liquid, script tags and the "Additional scripts" box on the Thank you and Order status pages. For Shopify Plus stores, Shopify's changelog set August 28, 2025 as the removal date for those methods. Non-Plus stores followed on a later 2026 timeline. If a purchase pixel was pasted into Additional scripts years ago, assume it no longer fires and check. The checkout side is covered in the Checkout Extensibility guide.

How tracking works on Shopify now

Customer Events: app pixels and custom pixels

Shopify's Customer events area in the admin manages two kinds of pixels:

  • App pixels are installed by marketing apps, such as Meta's, Google's or TikTok's official sales channel apps. Per shopify.dev, they run in a strict sandbox.
  • Custom pixels are code you or a developer paste into the pixel manager. They run in a lax sandbox.

Pixels load automatically on the storefront, checkout, Thank you page and Order status page. They subscribe to standard events, such as page views, product views, cart updates, checkout steps and purchases, through the Web Pixels API.

The sandbox has limits worth knowing. Pixels can't render UI and can't read the page's DOM directly, so scroll tracking, heatmaps and auto-detected clicks don't work the way they did with page scripts. For custom interactions, your theme can publish custom events (for example with Shopify.analytics.publish()) that pixels then subscribe to.

Server-side events

A browser pixel depends on the shopper's browser. A server-side event goes from a server to the ad platform directly, so a browser ad blocker can't stop it. On Shopify, the most common route is the official app's data sharing setting:

  • Meta. In the Facebook & Instagram app, Shopify's data sharing settings offer Standard (pixel only), Enhanced (pixel plus Conversions API) and Maximum (Enhanced plus Meta's latest ad technology). Enhanced and Maximum send customer details such as name, email, phone and location for matching. Shopify says, "Data sharing is a choice," so update your privacy policy to match what you share.
  • Google. The Google & YouTube app connects your Google tag and GA4 property and supports Google Ads conversion tracking. Enhanced conversions and server-side tagging are options for advanced setups.
  • Other platforms (TikTok, Pinterest, Snap) have their own Shopify apps with similar server-side options.

Deduplication: the step most setups get wrong

Meta recommends running the Pixel and Conversions API together, a "redundant setup." But if both send the same purchase without a shared identifier, it can count twice.

Per Meta's deduplication docs:

  • The Pixel's eventID must match the server event's event_id, and the event names must match (for example, Purchase and Purchase).
  • Meta deduplicates matching events received within 48 hours of the first one.
  • A fallback method using fbp or external_id only works when the browser event arrives first.

The official Shopify apps handle this for you. Problems start when someone adds a second Meta pixel through a custom pixel, a tag manager or a "server-side tracking" app on top of the official app. When I audit tracking, duplicate purchase events from two overlapping tools are among the most common issues I find.

Watch out: Before installing any tracking app, list every place a purchase event is currently sent from: official apps, custom pixels, Google Tag Manager, and leftover theme code. One source per platform per channel is the goal.

Shopify's pixel docs say that in markets that require consent (usually the EEA and UK), web pixels only run after visitors grant the permissions the pixel is configured for, by default Marketing and Analytics. Pixels marked as data sale don't run for customers who opted out of sale or sharing, unless they support limited data use. Shopify is also clear that merchants are responsible for their own privacy compliance.

On the Google side, consent mode passes four main signals: ad_storage, analytics_storage, ad_user_data and ad_personalization. There are two implementations:

Basic consent modeAdvanced consent mode
Before consentGoogle tags blocked entirelyTags load with consent denied and send cookieless pings
If consent is deniedNothing is sent to GoogleCookieless measurement continues
Conversion modelingGeneral modelAdvertiser-specific model (more detailed)
Privacy trade-offMost conservativeMore data collected without cookies

Which one fits is a legal and policy decision as much as a technical one. Talk to counsel about your markets. Whatever you choose, use a consent banner that writes to Shopify's Customer Privacy API, so Shopify's pixels and your Google tags respect the same choice.

A step-by-step setup I'd recommend

  1. Inventory current tracking. Check Settings > Customer events, installed apps, theme code (search for fbq, gtag, ttq) and any Google Tag Manager containers.
  2. Remove the leftovers. Delete old theme snippets and duplicate pixels. Disconnect apps you no longer use.
  3. Set up consent first. Configure Shopify's customer privacy settings and a compatible consent banner for the regions you sell to.
  4. Install the official channel apps for each ad platform you actually spend on, and turn on server-side data sharing where it fits your privacy policy.
  5. Add custom pixels only for gaps, such as an affiliate network or a platform with no official app, and give them the right consent permissions.
  6. Test a real purchase in each platform's event testing tool. Confirm one browser event and one server event, deduplicated.
  7. Compare weekly. Track the ratio of platform-reported purchases to Shopify orders over time. A sudden drop usually means something broke.

FAQ

Server-side doesn't mean consent-free. The same consent and disclosure rules apply whether data leaves from the browser or the server. Have counsel confirm your setup for the regions you sell to.

Do I still need Google Tag Manager on Shopify?

Usually not on the storefront. Shopify's Customer Events and official apps cover most needs, and GTM can't run inside the checkout the way it once did. Some teams still use GTM inside a custom pixel or server-side for advanced cases.

Why does Meta report more or fewer purchases than Shopify?

Different attribution windows, view-through conversions, consent, blocked browsers and modeling all play a part. Shopify's order count is the source of truth for sales. Platform numbers show what each platform can see and claim.

Will server-side tracking fix my ROAS?

It improves the signal ad platforms learn from, which can help optimization. It doesn't change your product, offer or creative, and it won't make a weak campaign profitable.

Next steps

Run the inventory in step 1 this week. Most stores find at least one duplicate or dead pixel, and fixing that is free. Then decide your consent approach with counsel and rebuild around the official apps. To read the resulting numbers, see Shopify Analytics vs GA4 and attribution. If you'd like an audit of your setup, book a Shopify consultation.

Sources

  • Shopify Help Center, "Pixels overview / Customer events": https://help.shopify.com/en/manual/promoting-marketing/pixels/overview
  • Shopify.dev, "Web Pixels API": https://shopify.dev/docs/api/web-pixels-api
  • Shopify Help Center, "Facebook data sharing": https://help.shopify.com/en/manual/promoting-marketing/analyze-marketing/meta-data-sharing
  • Shopify Changelog, "Extensibility is now available for Plus merchants on Thank you and Order status pages": https://changelog.shopify.com/posts/extensibility-is-now-available-for-plus-merchants-on-thank-you-and-order-status-pages
  • Meta for Developers, "Handling Duplicate Pixel and Conversions API Events": https://developers.facebook.com/docs/marketing-api/conversions-api/deduplicate-pixel-and-server-events
  • Google Tag Platform, "Consent mode overview": https://developers.google.com/tag-platform/security/concepts/consent-mode

Keep reading