Category: Meta Ads and advertising

Pixel and Conversions API count the same transaction twice on the confirmation page

Read this guide in Polish

Problem: on the order confirmation / thank-you page, you see that the conversion is reported twice in Meta (Facebook/Meta Ads) tools. The most common cause is not the “bug” of the pixel itself or the API, but overlapping sources of events: the front-end Meta Pixel sends the event purchase and backend Conversions API sends the same event without correlation. The purpose of this instruction is to provide methodological differential diagnosis, a list of specific corrective steps, and tests that will confirm the removal of double counting. We do not assume the only reason — we will examine what usually occurs in SPA configurations, intermediate servers and integration of e-commerce.

How to Recognize Cause

The most common scenario: on the confirmation page both the client (viewer) calls Meta Pixel (fbq('track','Purchase',...) and the server sends the Conversions API with the same transaction identifier. The absence of Meta-side deduplication (event id or deduplication parameters) causes duplication. Check if event id is generated and transmitted identically from front-end and backend.

Other possible causes: charging pixel script multiple times (e.g. SPA without routing control), retry logic on the server sending CAPI again at errors, or indirect integrations (e.g. tag manager or shop plugin) that send additional Purchase events. Identify the source of each event in Event Manager by 'Event source' and 'Event source detail'.

Step by step solution

1. Step 1 — Identify time and event identifier: in Meta Events Manager, select an example duplicated event and note down timestamp, event name, and event id (if available). Determine whether both entries have the same event id.

2 . Step 2 — View frontend: Open the confirmation page in development mode, monitor the console and Network. Check that fbq('track','Purchase') is called more than once and that event id is included as custom data.event id or event id parameter in request payoad.

3 . Step 3 — View backend/server: check server logs or the forwarding mechanism Conversions API. Find payload sent to /events from event name=Purchase field and see if the same event id or order id transaction identifier is sent. If there is no event id, enter a coherent event id.

4 . Step 4 — Deduplication implementation: if you want to use both sources, make sure the front-end generates a unique event id (UUID v4) and transmits it to the backend together with the order, and backend sends the same event id in the field 'event id' in Conversions API.

5 . Step 5 — Blocking duplicates on the client side: if you do not use CAPI or prefer to disable pixel, add a condition on the confirmation page that sends pixel only if the order was not previously registered in session (e.g. session flagStorage 'purchase sent').

6 . Step 6 — Check intermediate integrations: view Tag Manager configurations, shop plugins (Shopify/ WooCommerce), and middleware CDN to make sure no tool sends an additional Purchase. Disable the suspicious rules individually and watch the events.

7 . Step 7 — Test retry and idempotence: if backend retrys the shipment at errors, make sure the retry uses the same event id, rather than generating a new one. Otherwise Meta will treat retra as a new conversion.

How to see if the problem is gone

Test 1 — Tracing: execute a test order with a unique event id, then in Events Manager check that only one Purchase event appears with this event id. Make sure time stampes the front and backend matches movement.

Test 2 — A/B: temporarily disable the return shipment (CAPI) and order: there should remain a single event with source 'Pixel'. Then turn off the pixel and turn on CAPI only — there should be one more event. This will confirm which source generates the duplicate.

What to do

Warning 1 — Do not rely solely on order id from the store system: Meta uses event id to deduplication; order id can be different format and does not guarantee deduplication if you do not map it to event id.

Warning 2 — Do not generate new event id at retry: if the retry creates a new event id, Meta will treat this as a separate conversion. Implement event id storage at order save level.

Warning 3 — Avoid removing pixel without a plan: a major pixel shutdown can stop other marketing events (ViewContent, AddToCart). Better deduplication than arbitraryly shutting down sources.