On this page
What this issue is
A pixel is a small piece of script that tells an ad or analytics platform what a visitor did, such as viewing a product or buying. On Shopify there are several ways to add one: a sales channel or app (like the Facebook & Instagram app or the Google & YouTube app), the Customer events settings, the theme code, or Google Tag Manager.
- Customer buysOne order is placed
- App sends PurchaseSales channel app pixel fires
- Manual code sends PurchasePasted snippet fires too
- Platform reports 2 salesRevenue and conversions inflated
Both sources send the same purchase, so the platform records two.
Why it costs you leads or sales
Example: 50 real orders, each counted twice, show up as 100 purchases in the ad platform.
How to check if your site has it
Compare counts
Compare purchases in your ad platform with orders in Shopify for the same dates. A ratio close to 2 to 1 is a strong hint.
Use the platform's debug tool
Install Meta Pixel Helper or open Google Tag Assistant. Load a product page and look for the same pixel ID listed twice, or the same event firing twice.
Open the Network tab
In Chrome DevTools, open Network and filter for the platform (for example 'facebook.com/tr' or 'collect'). Add to cart or view a product and count the requests for one event.
Search your themeShopify
In Shopify admin go to Online Store > Themes > Edit code and search for the pixel ID, 'fbq(' or 'gtag(' in theme.liquid and other files.
List every installed sourceShopify
Check Settings > Apps and sales channels, Settings > Customer events, and any Google Tag Manager container for the same pixel.
How to fix it
Decide which source stays
Usually keep the official sales channel app (Facebook & Instagram, Google & YouTube, TikTok) and remove manual code.
Remove theme code
Go to Online Store > Themes > Actions > Edit code. Open theme.liquid and delete the pasted pixel snippet. Save a copy of the theme first.
Check Customer events
Go to Settings > Customer events. Remove any custom pixel that installs the same pixel ID as the app.
Check app data sharing
If two apps both connect the same pixel, disconnect it in one of them.
Find the duplicate tag
In Tag Manager, open Tags and look for a tag using the same pixel or measurement ID as your app.
Pause or delete it
If the app stays, remove the tag. If GTM stays, disconnect the pixel in the app settings instead.
Publish
Submit and publish the container so the change goes live.
Search all templates
Search the theme files for the pixel ID and for loader code such as fbevents.js or gtag/js.
Keep one loader
Leave a single base snippet. Delete repeated base snippets and repeated event calls.
Before
- Facebook & Instagram app installs the pixel
- Old snippet still in theme.liquid
- Each event fires twice
After
- One source installs the pixel
- Theme code cleaned up
- Each event fires once
How to confirm it's fixed
- Pixel Helper or Tag Assistant shows the pixel ID only once
- Network tab shows one request per event
- A test order is recorded once in the ad platform's test events view
- Ad platform purchases and Shopify orders match over a few days
- No console errors after removing the code
How to prevent it happening again
- Keep a simple list of which source owns each pixel
- Before installing a new tracking app, search the theme for the pixel ID
- Do not paste pixel code into the theme if an official app already covers it
- Review tracking after theme changes, app installs and agency handovers
- Test a product view, add to cart and purchase after every tracking change
How FunnelGuard handles this
Related timeline
Month 1
Pixel code is pasted into theme.liquid
Month 4
Someone connects the official sales channel app with the same pixel
Month 5
Reports show far more purchases than orders
Fix day
One source removed, events fire once
Questions people ask
Why is my Meta pixel firing twice on Shopify?
Most often the pixel is installed twice: once by the Facebook & Instagram sales channel and once by code in the theme, Customer events or Google Tag Manager. Check Meta Pixel Helper for the same pixel ID listed twice, then remove one source.
Why are my Shopify purchases double counted in Google Analytics or Google Ads?
The purchase event is probably sent by two sources, such as the Google & YouTube app and a manual gtag or GTM tag. Keep one, remove the other, and compare reported purchases with Shopify orders.
How do I find duplicate tracking code in my Shopify theme?
Go to Online Store > Themes > Edit code and search for your pixel ID, 'fbq(' and 'gtag(' in theme.liquid and other files. Also check Settings > Customer events and your Tag Manager container.
Should I use the Shopify app or manual code for my pixel?
The official app or Customer events is usually easier to maintain because it does not depend on your theme. Use manual code only if you need something the app cannot do, and then disable the app's pixel.
Does a duplicate pixel affect my ad performance?
Yes. It inflates conversions and return on ad spend, and bidding systems learn from the wrong data. Budget decisions based on those numbers can be poor.
How can I tell if a duplicate pixel is fixed?
Pixel Helper or Tag Assistant should list the pixel once, and the Network tab should show one request per event. Then place a test order and check it appears once in the platform.
Can FunnelGuard detect a duplicate pixel on my store?
Yes. FunnelGuard's duplicate tag detection watches the tracking hits during a scheduled journey and flags a tag that fires more than once. It sends one alert with a screenshot and a likely cause.
Related issues
- OPS-268Checkout extensibility migration dropping pixelsFix guide
- OPS-269Customer events (web pixels) misconfiguredFix guide
- OPS-265Theme published with missing tracking or broken cartFix guide
- OPS-267Uninstalled app leaves broken script tagsFix guide
- OPS-266App conflict breaking add-to-cartFix guide
- OPS-270Store password page enabledFix guide