How to Set Up the Meta Conversions API for Ecommerce
The Meta Conversions API (CAPI) is a server-side tracking solution that sends purchase and event data directly from your web server to Meta, bypassing browser-based limitations caused by iOS privacy changes and ad blockers to restore accurate conversion tracking. Last updated: February 2026Table of Contents
- Why the Conversions API Is Essential in 2026
- Pixel vs Conversions API vs Both
- Setting Up CAPI on Shopify
- Setting Up CAPI via Google Tag Manager
- Manual Server-Side Implementation
- Deduplication: Preventing Double-Counting
- Testing and Verifying Your CAPI Setup
- FAQ
Why the Conversions API Is Essential in 2026
Before iOS 14 in 2021, the Meta Pixel alone was sufficient for ecommerce tracking. The pixel fired a JavaScript event in the user's browser whenever they made a purchase, and that data flowed directly to Meta.
iOS 14 changed everything. Apple's App Tracking Transparency framework allowed users to opt out of cross-app tracking. Safari's Intelligent Tracking Prevention blocked third-party cookies. Ad blockers interfered with pixel code. The result: Meta's browser-based pixel started missing 20-40% of actual purchase events.
The consequence for advertisers: underreported conversions, inflated CPAs, and a crippled algorithm that cannot optimize effectively because it is missing too much signal.
The Conversions API solves this by moving tracking from the browser to the server. When a customer purchases from your store, your server sends the event data directly to Meta's API, bypassing the browser entirely. No iOS opt-outs. No ad blockers. No cookie restrictions.
Meta's own data shows that stores using Pixel + CAPI together report 18-35% more conversion events compared to Pixel-only setups. MHI Media's client data from Q4 2025 aligns with this: accounts that implemented CAPI saw an average 22% reduction in reported CPA after setup.
Pixel vs Conversions API vs Both
Pixel only: Browser-based tracking. Easy to implement. Misses 20-40% of purchases from iOS users and ad blocker users. Not recommended as your only tracking method in 2026. CAPI only: Server-side tracking. More reliable signal quality. However, without the Pixel, you lose some browser-side behavioral signals (scroll depth, time on page) that Meta uses for optimization. Pixel + CAPI (recommended): Redundant signals from both browser and server. Meta deduplicates the events so purchases are not counted twice. This combination gives Meta the most complete picture of your customers and consistently delivers the best optimization performance.Run both. The redundancy is intentional and beneficial.
Setting Up CAPI on Shopify
Shopify has a native Meta integration that handles CAPI setup with minimal technical effort.
Step 1: Install the Meta Channel App
- In Shopify Admin, go to Apps and click "Shopify App Store"
- Search for "Meta" and install the official Meta channel
- Connect your Meta Business Manager account
Step 2: Connect Your Pixel
- In the Meta channel, go to "Data sharing settings"
- Select your pixel from the dropdown
- Agree to Meta's terms
Step 3: Enable Server-Side Events
- In Data sharing settings, you will see a "Data sharing level" option
- Select "Maximum" for the highest event match quality
- This enables CAPI for Purchase, AddToCart, ViewContent, and other key events
Step 4: Configure Customer Data Sharing
The "Maximum" setting will share hashed customer data (email, phone, name) with Meta to improve event matching. This significantly improves your Event Match Quality score.
Shopify hashes all personal data before sending it to Meta, so raw customer data is never transmitted. The hashed data allows Meta to match server-side events to real user profiles, improving attribution accuracy.
That is the full Shopify setup. No code required. The integration handles deduplication automatically.
Setting Up CAPI via Google Tag Manager
For non-Shopify stores, Google Tag Manager can be used to implement CAPI through a partner integration.
Step 1: Set Up Meta CAPI through a GTM Partner
Several GTM-compatible CAPI solutions exist, including:
- Stape (stape.io) - popular third-party CAPI solution
- Meta's direct GTM template
- Create an account at stape.io
- Create a new container and connect your website domain
- Install the Stape snippet on your site (or via GTM)
Step 2: Configure the CAPI Gateway
- In Stape, configure your Meta pixel ID
- Generate your Meta access token (from Meta Events Manager under Settings)
- Connect the access token to your Stape container
Step 3: Map Events
In your GTM server container, configure which triggers map to which Meta events:
- Purchase confirmation page load = Purchase event (with value and currency)
- Add to cart click = AddToCart event
- Product page view = ViewContent event
Manual Server-Side Implementation
For developers implementing CAPI directly (without Shopify or a third-party tool), Meta provides a REST API.
Step 1: Generate an Access Token
- In Meta Events Manager, go to your Pixel settings
- Click "Generate access token" under the Conversions API section
- Store this token securely on your server
Step 2: Send Events via the API
The API endpoint is: `https://graph.facebook.com/v18.0/{pixel-id}/events`
A Purchase event payload looks like this:
{
"data": [{
"event_name": "Purchase",
"event_time": 1677000000,
"action_source": "website",
"event_source_url": "https://yourbrand.com/order-confirmation",
"user_data": {
"em": [""],
"ph": [""],
"fn": [""],
"ln": [""]
},
"custom_data": {
"currency": "USD",
"value": 49.99,
"content_ids": ["SKU-001"],
"content_type": "product",
"num_items": 1
},
"event_id": "order_12345"
}]
}
Hash all personal data with SHA-256 before sending. The `event_id` field is critical for deduplication.
Deduplication: Preventing Double-Counting
When running Pixel + CAPI together, both will fire for the same purchase event. Without deduplication, Meta counts the purchase twice, inflating your conversion data.
How to deduplicate:Include a matching `event_id` in both the browser Pixel event and the CAPI server event. Meta matches events with the same `event_id` and counts them as one.
On Shopify with the native integration, deduplication is handled automatically. On custom implementations, you must pass the `event_id` explicitly in both the Pixel `fbq()` call and the CAPI API request.
The `event_id` should be unique and consistent: your order number works perfectly ("order_12345"). This must be identical in both browser and server events for the same transaction.
Testing and Verifying Your CAPI Setup
Check Event Match Quality
In Meta Events Manager, go to your Pixel and click "Events." Each event type shows an Event Match Quality (EMQ) score from 1-10.
CAPI implementations typically improve EMQ because server-side events can pass more complete customer data than browser events. Aim for EMQ of 7+ after CAPI implementation.
Test with Events Manager Test Tool
- In Events Manager, click "Test events"
- Enter your website URL
- Click "Open Website" and complete a test purchase
- Both browser (Pixel) and server (CAPI) events should appear
- Check that deduplication is working: you should see one purchase event, not two
Monitor Duplicate Rates
In Events Manager, look at your events over 7 days. If you see the deduplication rate above 50%, your event_id matching may not be working correctly. Low or zero duplication rates indicate CAPI is sending without browser duplicates (check Pixel is still firing).