On Shopify, the Meta Pixel usually fires twice for one simple reason: it was connected through the Facebook & Instagram app and also added somewhere else, in the theme code, in a custom pixel or in Google Tag Manager. Shopify itself warns that leaving old pixel code in place puts more than one pixel on the store and can lead to duplicate or incorrect data in your reports. This guide shows where the second copy usually hides and how to keep only one.
Key points
- The Facebook & Instagram sales channel can install the Pixel and, depending on the data-sharing level, the Conversions API. When it is active, you don't need extra pixel code.
- The second copy usually lives in theme.liquid, in Settings > Customer events (custom pixels), in a third-party tracking app, or in a GTM container.
- Duplicated browser events and missing deduplication between Pixel and Conversions API are different problems with different fixes.
- Pick one owner for Meta tracking: the native app, or your own GTM setup with the app's data sharing turned off. Not both.
- Check with Meta Pixel Helper, the browser's Network tab and Events Manager after every change.
How Shopify's native Meta integration works
The Facebook & Instagram sales channel has a Share data settings page with a Customer data-sharing section. There you connect an existing Pixel or create a new one and choose a data-sharing level. In Shopify's description, Standard uses the browser Pixel only, which ad blockers can stop, while Enhanced and Maximum add Meta's Conversions API, which sends events between Shopify's and Meta's servers.
That means a store with the app set to Enhanced or Maximum already sends browser and server events for the same purchase. Meta merges them when they carry the same event name and event ID. Problems start when something else sends the same events again.
Where the duplicate Pixel usually hides on Shopify
- theme.liquid. The most common one. Someone pasted the Pixel base code into the theme before the app was connected. Open Online Store > Themes > Edit code > theme.liquid and search for
fbq('init'orfbevents.js. - Customer events. Settings > Customer events lists app pixels and custom pixels. A custom pixel with Meta code, or a second tracking app, sends its own events in parallel.
- A tracking app. Many "Pixel + CAPI" apps install their own Pixel. If the native app's data sharing is still on, you have two sources.
- Google Tag Manager. A GTM container with a Meta Pixel tag, loaded from the theme or a custom pixel, on top of the native app.
- Old checkout code. Stores that once used checkout scripts or additional scripts on the order status page may still have Pixel code there.
How to confirm the Pixel fires twice
1. Look at the page from the outside
Run the free Meta Pixel & GTM checker on your home page and a product page. It flags a Pixel initialized in the page code and again in GTM, more than one GTM container and a missing event_id. On Shopify, pixels that run inside Shopify's sandboxed customer events may not appear in the page HTML, so a clean result there is a good sign, not proof.
2. Meta Pixel Helper
Open the store with the Meta Pixel Helper extension. A warning that the Pixel activated more than once on the page means the same Pixel is installed twice. Note which events repeat: PageView on every page points to the base code; Purchase only points to the order status page or a checkout integration.
3. Network tab
In Chrome DevTools, open Network, filter by facebook.com/tr and reload. Two PageView requests with the same Pixel ID on one load confirm it. The Initiator column shows which script sent each one.
4. Events Manager
In Meta Events Manager, check the Pixel's events and diagnostics. Meta flags events received from both the Pixel and the Conversions API that are not deduplicated, which is a separate issue from a duplicated Pixel. Sudden jumps after installing an app or editing the theme are another hint.
How to fix it
Choose one owner and remove the rest.
Option A: keep the native app. For most stores this is the simplest path. Leave the Facebook & Instagram app connected, remove Meta code from theme.liquid, delete Meta custom pixels in Customer events, uninstall or disable other Meta tracking apps, and remove Meta tags from GTM. Then test again.
Option B: run Meta tracking yourself. Teams that need full control, for example to send CRM outcomes back to Meta, sometimes turn off data sharing in the native app and run the Pixel and the Conversions API through their own GTM setup. If you go this way, turn the app's data sharing off first, then build the Pixel and server events with a shared event_id so Meta can deduplicate them.
Never run Option A and Option B at the same time.
Duplicated Pixel vs. missing deduplication
- Duplicated Pixel: two browser events for one action. Remove an installation.
- Missing deduplication: a browser event and a server event for the same action without a matching
event_id. Meta counts both. Fix the event ID on both sides, or let a single integration send both.
The details of the second case are in Meta Conversions API deduplication, and the general version of this guide is Meta Pixel firing twice.
When the native app is not enough
If your sales close outside the Shopify checkout, for example B2B orders, quotes or deals managed in HubSpot, the native integration doesn't know which leads became revenue. That is where your own setup pays off. The 4-Layer Tracking Kit documents it end to end: browser events with a shared event_id, web GTM, server-side GTM with the Conversions API on your own server, and HubSpot deal stages sent back to Meta. Its CRM layer is built for HubSpot; a store that sells only through the Shopify checkout is usually well served by the native app with one clean installation. For a free start, the 13 Silent Tracking Failures field guide lists the checks to run before you change anything.
FAQ
Why is my Meta Pixel firing twice on Shopify?
Usually because the Pixel is connected through the Facebook & Instagram app and also added in theme.liquid, a custom pixel in Customer events, another tracking app or a GTM container. Keep one installation.
Do I need to add Meta Pixel code to Shopify if I use the Facebook & Instagram app?
No. When the app's customer data sharing is enabled, it installs the Pixel, and at Enhanced or Maximum it also uses the Conversions API. Extra code creates a second Pixel.
Can I use Google Tag Manager for Meta on Shopify?
Yes, but turn off data sharing in the Facebook & Instagram app first, and send Pixel and server events with a shared event_id. Running both setups at once duplicates events.
Originally published at https://lp.bitencourtco.com/kit-tracking/en/guides/meta-pixel-firing-twice-shopify/ by Bitencourt & Co. The full setup, from the ad click to HubSpot deal stages back to Meta, is in the 4-Layer Tracking Kit. Recommend it to clients and earn 50%: affiliate program.
