Setting Up the Conversions API on Shopify Without Double-Counting Everything

Published: September 18, 2026

Updated: August 28, 2026

Shopify dashboard on smartphone with sales metrics and vibrant real-time updates against dark background.

Est. reading time: 7 minutes

The symptom shows up in Ads Manager first. Meta reports close to double the orders Shopify recorded for the same week, reported revenue runs ahead of deposits, and the ROAS that justified last month’s budget increase turns out to be counting every sale twice.

The Conversions API usually takes the blame, and it usually gets switched off. That trades one measurement problem for a worse one, because the server connection is what recovers the purchases browsers drop. The duplicate is coming from somewhere else, and on Shopify it comes from the same few places nearly every time.

Running the Meta pixel and the Conversions API together on Shopify is the recommended setup

Meta calls a pixel and a server connection sending the same events a redundant setup and recommends it, on the condition that you give the platform a way to tell overlapping events apart. Meta’s documentation on duplicate events describes two matching methods. The recommended one pairs event_id and event_name, where the pixel’s eventID has to match the server event’s event_id and the event names have to match as well. The fallback pairs event_name with fbp and/or external_id. When Meta finds the same key combination sent to the same pixel ID within 48 hours, it discards the later copies.

Two limits in that document explain most Shopify double counts. The fbp and external ID method generally only removes a server event when a browser event arrived first, so a server event with no browser event in the previous 48 hours survives. That method also does not remove duplicates arriving from the same source. Two browser events describing one order stay two events. Two server events describing one order stay two events.

So the failure worth diagnosing is not a mismatch between browser and server. It is a second copy on one side.

Count every place a pixel can live on a Shopify store

Before changing any setting, inventory the installs. A Meta pixel can be running from more than one of these at once, and each one is capable of firing its own Purchase event.

  • Hardcoded pixel code sitting in the head of theme.liquid.
  • The Meta pixel field under Online Store, then Themes, then Preferences.
  • The Facebook and Instagram sales channel, where the data sharing level controls both the pixel and the server connection.
  • App pixels installed by marketing apps, listed under Settings, then Customer events.
  • Custom pixels added by hand in that same Customer events area.
  • The Additional scripts field in checkout settings, and checkout.liquid on Shopify Plus stores.

Shopify’s own guidance points at this. Its Meta pixel documentation says to remove pixel code from your theme after connecting a pixel through the channel, because leaving it in place puts more than one pixel on the store and produces duplicate or incorrect data. The custom pixel instructions repeat the point and name the places to check (theme.liquid, checkout.liquid on Plus, and Additional scripts) so events are not counted twice.

Reduce the store to one browser source and one server source, then confirm which asset each one reports to. Two installs pointed at two different pixel IDs is a separate problem with the same symptom, since Meta matches events within a pixel ID and never across two of them.

Choose the data sharing level knowing which events go server side

Shopify’s Facebook data sharing settings offer three levels. Standard runs the Meta pixel only, and a browser-based ad blocker can stop it from sharing data. Enhanced adds the Conversions API alongside the pixel and sends the purchase event between Shopify and Facebook servers, which browser-based blockers cannot touch. Maximum does the same and adds Facebook’s latest advertising technology. Enhanced and Maximum both share customer name, location, email address, and phone number to match users on Meta’s network.

The pixel side tracks a fixed set of events once connected (PageView, ViewContent, Search, AddToCart, InitiateCheckout, AddPaymentInfo, and Purchase), and events that carry an order value use the order total, including duties, taxes, and discounts.

The duplicate we find most often lives right here. A store sets data sharing to Maximum, then installs a third-party Conversions API app or points a server-side GTM container at the same pixel to get more events or better matching. Now two server integrations send Purchase for the same order, each generating its own event ID from its own logic. Meta has no shared key to match them on, so both count.

One connection owns the server side. If the third-party tool is the one you want, turn data sharing off in the Facebook and Instagram channel, which Shopify allows you to change at any time in the channel’s settings. If the native integration covers what you need, uninstall the app. A pixel connected in Customer events keeps firing until someone disconnects it there.

When you build the connection yourself, the event ID is the whole job

Custom setups earn their complexity when you need events the native integration does not send, or parameters it does not include. They also put the matching key in your hands. Meta’s pixel accepts eventID as the fourth argument of the fbq track call, and that value has to be identical to the event_id on the corresponding server event.

Derive both from the same record. The browser context at checkout and the server process reading the order both have access to the order identifier, which means both copies can carry the same value without any coordination logic between them. Generating a random ID on one side guarantees a mismatch, and the mismatch is invisible in reporting because each event looks valid on its own.

Timing carries as much weight as the string. Matching happens inside a 48-hour window, so a nightly batch or a retry queue that lands outside it produces a second countable event even when the IDs agree. Send server events close to the order, and treat any queue that can stall for two days as a source of inflation.

One more constraint applies to custom pixels. They run in Shopify’s Lax sandbox, and Shopify notes that not all pixel functionality works there. Test the Purchase event end to end before trusting the numbers, including a refresh of the thank you page, since a repeated browser event is not something the fbp matching method removes.

Confirming the count is clean

The check that settles it compares total Purchase events in Meta for a period against total orders in Shopify for the same period. Attribution windows decide which campaign gets credit for a sale. The event total your dataset received is a separate number, and it should sit close to your order count. A ratio near two means a duplicate install is still live. A ratio slightly above one usually points at thank you page refreshes, test orders, or a second source covering part of the traffic.

Then look at the split by source. A working redundant setup shows browser and server both delivering volume, with the overlap resolved rather than added. If the server side reports almost nothing, the connection is not live and the pixel is carrying the account alone. If browser and server volumes add up to your total event count, the matching key is missing.

Most of this work is inventory rather than engineering. Open the channel settings, open Customer events, open the theme code, and write down every place capable of sending a Purchase event. That list tells you whether the number in Ads Manager can be trusted, and it takes less time than the reporting arguments a doubled ROAS eventually causes. If a second set of eyes on the tracking setup would help, we’re glad to take a look with you.

Reading About It Is the Easy Part.

Fill This Out and We'll Do the Rest.

Your info stays private. You’ll hear back from a real human.