tracking Meta pixel

Meta Pixel

The Meta Pixel is a JavaScript snippet installed on your website that tracks visitor actions and sends event data to Meta (Facebook/Instagram) to measure ad performance and build audiences.

What Is the Meta Pixel?

The Meta Pixel (formerly the Facebook Pixel) is a small piece of JavaScript code that Meta asks you to install on your Shopify store. When a customer visits your site, the pixel fires and sends data back to Meta about what that visitor did: viewed a product, added to cart, initiated checkout, or completed a purchase.

Meta uses this data to:

  1. Measure conversions: Report how many sales your Facebook and Instagram ads generate
  2. Optimize ad delivery: Find more people likely to take similar actions
  3. Build audiences: Create retargeting audiences of people who visited your store

How the Meta Pixel Works

The pixel operates entirely in the browser. When someone visits your Shopify store:

  1. The page loads and the pixel JavaScript executes
  2. The pixel reads Meta’s cookies to identify the visitor
  3. When an event occurs (like a purchase), the pixel sends event data to Meta’s servers
  4. Meta matches the event to the ad the visitor previously clicked or viewed

The iOS 14 Problem

In 2021, Apple introduced App Tracking Transparency (ATT), which requires iOS apps to ask users for permission before tracking them across other apps and websites. The vast majority of users opt out.

This creates major problems for the Meta Pixel:

  • Safari blocks third-party cookies: The pixel cannot identify many returning visitors
  • ATT blocks app-to-web tracking: Meta cannot match many ad clicks to website purchases
  • Data is delayed and aggregated: Meta can only report limited, modeled data for iOS users
  • Audience quality decreases: Retargeting and lookalike audiences become less effective

Studies show that the Meta Pixel now misses 30-60% of conversion events from iOS devices, depending on the store and audience.

Meta Pixel Limitations for Shopify

Beyond iOS, the pixel has other limitations:

  • Ad blockers: Browser extensions like uBlock Origin block the pixel entirely
  • Cookie expiration: Browsers increasingly limit cookie lifetimes, reducing attribution windows
  • Cross-device gaps: The pixel tracks browsers, not people. A customer who browses on mobile and buys on desktop may not be connected
  • Self-attribution bias: The pixel credits Meta for conversions that might have happened anyway

The Server-Side Solution

To address these gaps, Meta introduced the Conversions API (CAPI), which sends event data directly from your server rather than relying on the browser. Server-side tracking bypasses ad blockers, is not affected by cookie restrictions, and provides more reliable data.

For a complete setup guide, see our post on setting up Meta CAPI for Shopify.

Meta Pixel in Detectly

Detectly complements the Meta Pixel by providing independent, UTM-based attribution that does not rely on Meta’s tracking. While the pixel tells Meta what happened, Detectly tells you what happened using first-party Shopify order data. This gives you a source of truth to compare against Meta’s reported numbers and identify any discrepancies.

Ready to see your true ROAS?

Detectly tracks every UTM, attributes every Shopify order, and shows you which channels actually drive revenue.