Skip to content

Our guide to selling from Türkiye to Germany with Shopify is live.Read the guide

1–8 December: in-person meetings in Bremen.Book a slot

Shopify setup, migration and store growth.Shopify services

How does your brand show up in AI search?GEO service

Ad budget and ROAS calculators.Try them

Let’s define your next growth step together.Get in touch

What Is the Meta Conversions API (CAPI)? Shopify Setup, Deduplication and Event Match Quality Guide (2026)

Ayhan ÇorbacıoğluFirst published: Content updated: 14 min read
Guide to the Meta Conversions API (CAPI) on Shopify: pixel, server, deduplication and EMQ

The Meta Conversions API (CAPI) is a connection that sends events such as purchases, add-to-carts and form submissions from your own server to Meta, instead of from the visitor’s browser. The Meta pixel sends the same events from the browser, so when the browser blocks it, a cookie is deleted or the payment flow breaks and the customer never reaches the thank-you page, the event is lost. CAPI sends the same event through a second route, from the server, and helps Meta see more completely whether an ad actually produced a sale. Set up correctly, the two routes work together; set up wrongly, they count every sale twice. This guide explains how an e-commerce brand on Shopify can set up, verify and manage CAPI alongside consent rules, based on what we check when we set it up as a performance marketing agency.

In short: six things to know about the Meta Conversions API

  • CAPI complements the pixel, it does not replace it. Meta’s recommended setup is for the pixel and CAPI to send the same events together.
  • The biggest risk is double counting, not missing data. If the browser and server events do not arrive with the same event name and the same event ID, Meta sees one sale as two.
  • Event Match Quality (EMQ) is a quality score. It shows how well the customer information in an event matches Meta accounts. The aim is not to send everything but to send permitted data in the right format.
  • On Shopify, the fastest route is the data-sharing setting of the Meta channel. For custom events and several platforms, server-side GTM or your own server comes into play.
  • CAPI does not remove the need for consent. Sending from the server does not make tracking lawful if the user declined it.
  • Setup is not finished at launch. Without the Test Events screen, Diagnostics and a comparison with Shopify order counts, you cannot say the setup is healthy.

What is the Meta Conversions API?

The Conversions API is the server-to-server way of sending event data to Meta’s advertising system. When a customer buys, your site or e-commerce platform makes an HTTPS request to Meta and passes the name of the event (for example Purchase), its time and source, a unique ID for the event, the order value and currency, and information that helps match the customer. Meta uses this data for ad optimization, attribution and audience building.

The same setup used to be called the “Facebook Conversions API” or “server-side tracking”. In conversation all three names describe one thing: a stream of events that comes from the server and does not depend on the browser.

Why is the pixel alone not enough?

The pixel’s weak point is that it runs in the browser. These are the loss causes we see most often in practice:

  • Ad and tracking blockers and the built-in tracking protections of browsers can drop pixel requests.
  • Cookie and consent refusal: if the visitor gives no consent, the pixel may not load at all. That is correct behavior; the problem is not knowing how it shows up in reporting.
  • Broken payment flows: after bank redirects such as 3D Secure, the customer does not always return to the thank-you page. The sale happens, but the browser event does not.
  • Slow pages or tabs closed early: if the tab closes before the event is sent, nothing is recorded.
  • Complex theme and app code: several apps can add the same pixel, and one of them may misbehave.

CAPI does not eliminate all of these losses. In particular, you must not send an event for a user who has not consented. But it lets you pass on what your server knows when an order is placed, independently of the browser.

What data does CAPI send?

Each event has two parts: the fields that describe the event and the user_data fields that help match the customer. According to Meta’s documentation, contact details are sent as SHA-256 hashes, while the IP address, user agent and browser cookies are not hashed.

CAPI customer information fields and hashing requirements
FieldExample contentHashing required?
EmailAddress in lowercase with spaces trimmedYes
PhoneWith country code, digits onlyYes
First name, last name, city, state, postal code, countryNormalized textYes
External ID (external_id)The customer number in your own systemRecommended
IP addressThe IP the customer made the request fromNo, never hashed
User agentBrowser informationNo
fbp and fbcMeta’s browser and ad-click cookiesNo

Two practical notes: apply hashing only once, either on the client or on the server; and before hashing, trim leading and trailing spaces from the email and lowercase every character. An email that was not normalized will not match, even if it is hashed correctly.

The custom_data part of the event carries the order value (value), the currency (currency), product IDs and the order number. A purchase event without value and currency makes it impossible for the ad system to calculate ROAS.

Deduplication: the most critical part of the setup

For Meta to count one sale when the pixel and CAPI both send it, two fields have to match: the event name (event_name) and the event ID (event_id). In the pixel, the ID is the fourth parameter of the call fbq('track', 'Purchase', {…}, {eventID: '…'}); in CAPI it is the event_id field. According to Meta, deduplication works within a 48-hour window from the moment an ID is first received.

Details to be aware of:

  • If the two events are essentially identical, Meta mostly keeps the one it received first; if the browser and server events arrive within a few minutes of each other, the browser event is preferred.
  • Without an event ID, Meta can rely on the event name combined with fbp and/or external_id, but that method only works when the browser event arrives before the server event.
  • Deduplication does not remove copies from the same source. If your server sends the same order twice, both are counted.

The safest choice for the purchase ID is the order number: it produces the same value in the browser and on the server, and it does not change when the page is refreshed.

What is Event Match Quality (EMQ) and how do you raise it?

Event Match Quality is a quality indicator shown per event in Events Manager that summarizes how well Meta can match the customer information in an event to Meta accounts. For valuable events such as purchase and initiate checkout, a high match means attribution and optimization rest on firmer data.

The ways to raise EMQ, in order:

  1. Capture email and phone at checkout. Sent hashed, these two fields contribute most to matching.
  2. Pass fbp and fbc. For a visitor who arrives from an ad, fbc is built from the fbclid parameter; these cookies have to be preserved through the event.
  3. Add IP and user agent. In a server event, take them from the customer’s own request; do not send your server’s IP.
  4. Use external_id. Your customer number makes it easier to recognize the same person across sessions.
  5. Normalize fields such as first name, last name, city and country. A wrong format produces data that looks sent but does not match.

Do not chase a score. Raising EMQ by sending data for a user who has not consented is the wrong method; the goal is for permitted data to be passed on completely and in the right format.

Setup routes on Shopify

There are three common routes to CAPI on Shopify stores. Which one fits depends on whether your need is a standard e-commerce flow or a custom measurement architecture.

Comparison of Meta CAPI setup routes on Shopify
RouteHow it worksWho it suitsWatch out for
Shopify’s Meta channel (Facebook & Instagram app)The app manages the pixel and CAPI according to the data-sharing level.Standard e-commerce flow, quick setup, little maintenanceLimited control over custom events and detailed rules
Server-side GTM (e.g. Stape or your own server container)Browser events reach the server container, which forwards them to Meta.Brands that want to manage several platforms on one lineExtra setup, maintenance and hosting cost; needs technical skill
Your own server or a Worker (with Shopify webhooks)Order and customer events go from your code to the Graph API.Custom flows, B2B, form and lead eventsYou have to build hashing, deduplication and error handling yourself

According to Shopify’s help pages, the Meta channel’s data sharing works at three levels: Standard uses only the pixel; Enhanced adds CAPI to the pixel and shares matching information such as name, email and phone; Maximum uses CAPI, the pixel and Meta’s newer advertising technology together, and purchase events go from the server. Screen names and options can change over time, so check Shopify’s current help page while you set it up.

For most e-commerce brands we start with the Meta channel. If a specific need comes up, for example sending events to several platforms besides Meta or tracking a lead form, we move to a server-side solution. Choosing the simplest solution the measurement need requires, rather than the “most advanced architecture”, keeps the maintenance load down.

Step by step: setting up and verifying CAPI on Shopify

  1. Identify the right dataset. In Events Manager, be clear about which pixel (dataset) feeds your ads. If several pixels are connected to the same account, decide which one will be used.
  2. Connect the Meta channel and choose the data-sharing level. In the Shopify admin, connect the Facebook & Instagram channel and set data sharing.
  3. Configure customer privacy and cookie settings. The consent text and region-based behavior are part of the setup, not a detail to add later.
  4. Remove old pixel code from the theme. The most common cause of double counting is a second pixel setup left in theme code or in an old app.
  5. Use the Test Events screen. While you complete a purchase flow on your store, check that both browser and server events arrive and are deduplicated.
  6. Place a test order. Check that the purchase event arrives with value and currency and that the event ID matches the order number.
  7. Review Diagnostics and EMQ. Look per event for warnings about missing parameters, deduplication or matching.
  8. Compare the numbers after a week. Put the order count in Shopify next to the purchase count reported in Meta. We explain how to read it below.

Consent, GDPR and Turkish KVKK: sending from the server is not exempt from consent

The most misunderstood part of CAPI is the idea that, because it is server-side, it falls outside consent rules. It does not. If tracking for advertising requires the user’s consent, that requirement applies whether you send the event from the browser or from the server. A hashed email and phone number are still personal data; hashing is not anonymization.

In Türkiye, KVKK (Law No. 6698), in Germany and the EU, the GDPR, and in Germany additionally Section 25 of the TDDDG (formerly TTDSG), which governs access to information on devices, have to be considered together. For a brand selling from Türkiye to Germany, that can mean a single consent text does not satisfy two legal regimes. We recommend clarifying this with your own legal adviser; this article is not legal advice.

This is how we work on our own site: GA4, Meta and other measurement tools do not load before consent. The Meta event that goes from the server after the contact form is sent only if marketing consent exists, the email and phone are hashed, and the event is deduplicated. The same principle applies to an e-commerce store: if consent was not given, matching data is not sent either.

Why the numbers do not match exactly

After a CAPI setup, many brands compare the purchase count in Meta with their Shopify orders and suspect something is wrong because they do not match. That they do not match one to one is normal, for these reasons:

  • Meta only shows the sales it can attribute to ads; organic and direct sales do not appear in the report.
  • Events from visitors who did not consent are not sent.
  • Attribution window and time zone settings can differ between the two systems.
  • Refunds and cancellations are not reflected in Meta.

A practical rule: the purchase count reported in Meta should not exceed the Shopify order count for the same period. If it does, deduplication is not working or the same sale is being sent twice. If the Meta number is far below Shopify’s, look for the cause in the consent rate, in attribution and in missing events. The goal is not for the numbers to be equal but for the gap to be consistent and explainable.

Eight common mistakes in a CAPI setup

  1. Not sending an event ID. Deduplication fails and sales are counted twice.
  2. Using different event names in the browser and on the server. “Purchase” versus “purchase” or a custom name does not match.
  3. Leaving the test event code in production. If test_event_code stays, events land on the test screen instead of in real reporting.
  4. Sending unhashed email or phone. Meta rejects this data and the event goes unmatched.
  5. Hashing the email without normalizing it. A difference in capitalization or a space turns the hash into a different value.
  6. Sending the server’s IP as the customer’s IP. It breaks matching and produces wrong location data.
  7. Sending value and currency incompletely. ROAS cannot be calculated.
  8. Sending without checking consent status. That means both legal risk and unreliable data.

Does CAPI improve ad performance?

CAPI is not a performance switch, it is measurement infrastructure. Meta’s optimization system learns from the sales it can see; sales it does not see weaken the learning. A more complete and better-matched signal generally means optimization works with firmer data. How much that shows up in sales or ROAS varies by account, product and spend; nobody can guarantee a figure.

That is why, once CAPI is in place, you should look at the right metrics when you decide. Track purchase value against ad spend, know how ROAS is calculated and your break-even ROAS for profitability, and read the cost per new customer with the method in our CAC guide. The setup is only valuable if it gives those decisions more reliable data.

Frequently asked questions

Does the Conversions API cost money?

There is no separate charge on Meta’s side for using CAPI. Cost comes from the service you use as an intermediary (server container, hosting, a third-party app) or from development work.

Can I remove the pixel once CAPI is set up?

Meta’s recommended setup is to use both and deduplicate the events. Working with CAPI alone is possible, but signals from the browser (fbp, fbc, page context) are then missing.

Do I need to write code on Shopify?

Not on a standard store; the data-sharing setting in the Meta channel is enough in most cases. For needs such as custom events, forms or lead tracking, you need a server-side solution.

If EMQ is low, will my ads not work?

They work, but optimization and attribution rest on less matched data. A low EMQ is a warning, not an error by itself; first look at which fields are missing.

Does server-side tracking remove the need for cookie consent?

No. Tracking that requires consent also requires it when it is done from the server.

How do I know the setup is correct?

Three basic signs: you see both the browser and the server event and their deduplication on the Test Events screen, the purchase count reported in Meta does not exceed your Shopify orders, and Diagnostics shows no missing-parameter warnings.

Let’s set up your measurement infrastructure together

At Roas Digitall we handle the Meta pixel and CAPI setup together with deduplication and the consent flow in a single plan. For an audit of your current setup, see our analytics and reporting service; for managing the advertising side, our Meta Ads service; and for setup support on the Shopify side, our Shopify service.

Sources

Related expertise

Meta Ads

Manage Facebook and Instagram advertising through audience strategy, creative testing and sales data.

Discuss this topic for your brand ↗

Related articles

All articles ↗
HAVE AN IDEA?

Let's sit at
the same table.

Let's discuss your project
Türkiye OfficeRoas Digitall Danışmanlık E-ticaret İth. İhr. ve Ltd. Şti
Kazım Dirik Mah. 296/1 Sk. No:28 Ofis:302
35100 Bornova, İzmir, Türkiye
Germany Office
Georg-Wulf-Straße 15
28199 Bremen, Deutschland
+49 179 180 0876