Skip to content
FunnelGuard

Fix guide by FunnelsGuard

Duplicate Shopify pixel from app and manual code: fix it

OPS-276Medium impactDetectedBy FunnelGuardPublished Updated
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.

How a duplicate pixel reaches the ad platform
  1. Customer buysOne order is placed
  2. App sends PurchaseSales channel app pixel fires
  3. Manual code sends PurchasePasted snippet fires too
  4. 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

Orders in Shopify vs purchases reported by the ad platformExample numbers
Orders in Shopify vs purchases reported by the ad platform (example)Shopify orders: 50 orders; Ad platform purchases: 100 orders0387750100Shopify ordersAd platform purchasesorders

Example: 50 real orders, each counted twice, show up as 100 purchases in the ad platform.

How to check if your site has it

Check for duplicate pixels
  1. 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.

  2. 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.

  3. 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.

  4. 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.

  5. 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

Remove the duplicate by source
  1. Decide which source stays

    Usually keep the official sales channel app (Facebook & Instagram, Google & YouTube, TikTok) and remove manual code.

  2. 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.

  3. Check Customer events

    Go to Settings > Customer events. Remove any custom pixel that installs the same pixel ID as the app.

  4. Check app data sharing

    If two apps both connect the same pixel, disconnect it in one of them.

Pixel sources before and after

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

Confirmation checklist
  • 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

Habits that stop duplicates
  • 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

How a duplicate usually appears
  1. Month 1

    Pixel code is pasted into theme.liquid

  2. Month 4

    Someone connects the official sales channel app with the same pixel

  3. Month 5

    Reports show far more purchases than orders

  4. 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.

Does FunnelGuard catch this?

Detected

FunnelGuard checks for this today.

How: Duplicate tag detection.

Stop finding out from your customers

FunnelGuard runs your real forms and checkouts on a schedule, checks the tracking and the leads behind them, and alerts you once, with a screenshot. Try any paid plan free for 3 days.