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:
- Measure conversions: Report how many sales your Facebook and Instagram ads generate
- Optimize ad delivery: Find more people likely to take similar actions
- 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:
- The page loads and the pixel JavaScript executes
- The pixel reads Meta’s cookies to identify the visitor
- When an event occurs (like a purchase), the pixel sends event data to Meta’s servers
- 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.
Related terms
Click-Through Conversion
A click-through conversion (CTC) occurs when a customer clicks on an ad and then completes a purchase within the attribution window.
Conversions API (CAPI)
The Conversions API (CAPI) is Meta's server-side event tracking system that sends conversion data directly from your server to Meta, bypassing browser-based limitations like ad blockers and iOS privacy restrictions.
Server-Side Tracking
Server-side tracking sends marketing event data from your web server directly to analytics and ad platforms, bypassing the customer's browser and avoiding ad blockers, cookie restrictions, and iOS privacy limitations.
View-Through Conversion
A view-through conversion (VTC) occurs when a customer sees an ad impression but does not click it, and later converts within a defined attribution window.
Ready to see your true ROAS?
Detectly tracks every UTM, attributes every Shopify order, and shows you which channels actually drive revenue.