meta-ads conversions-api capi shopify facebook-ads ios14

Meta Conversions API (CAPI) for Shopify: What It Is and How to Set It Up

Detectly Team

If you run Meta Ads (Facebook or Instagram) for your Shopify store, you have probably noticed that ad performance data has become less reliable over the past few years. Attribution windows shrank, reported conversions dropped, and optimizing campaigns got harder.

The root cause is the shift away from browser-based tracking. Between iOS App Tracking Transparency, browser privacy updates, and the decline of third-party cookies, the Meta Pixel alone can no longer capture a complete picture of customer conversions.

Meta’s answer to this is the Conversions API (CAPI) — a server-side tracking method that sends conversion events directly from your server to Meta, bypassing the browser entirely. This guide explains what CAPI is, why it matters for Shopify merchants, and how to get it working for your store.

What Is the Meta Conversions API?

The Meta Conversions API is a server-to-server integration that lets you send web events (like purchases, add-to-carts, and page views) directly from your server to Meta’s servers. Unlike the Meta Pixel, which runs in the customer’s browser and relies on JavaScript and cookies, CAPI operates independently of the browser environment.

Here is how they differ:

Meta PixelConversions API
Where it runsCustomer’s browserYour server
Blocked by ad blockersYesNo
Affected by iOS ATTYesMinimally
Affected by cookie restrictionsYesNo
Data accuracyDecliningConsistent
Setup complexityLow (paste a script)Medium to high

The key insight is that CAPI and the Pixel are not mutually exclusive — Meta recommends running both. When you send the same event from both the Pixel and CAPI (a practice called “redundant event tracking”), Meta deduplicates them and uses whichever signal it received. This means if the Pixel fires, great. If it gets blocked, the server-side event fills the gap.

Why CAPI Matters After iOS 14

When Apple introduced App Tracking Transparency in iOS 14.5, users gained the ability to opt out of cross-app tracking. The result was dramatic: the majority of iOS users opted out, and Meta lost visibility into a significant portion of conversion events.

For Shopify merchants, this had several concrete effects:

Underreported Conversions

Your Meta Ads Manager may show fewer purchases than actually occurred. If a customer clicks your ad, browses your store, and purchases — but opted out of tracking — the Pixel cannot attribute that sale back to the ad. CAPI sends the purchase event server-side, giving Meta a second chance to match the conversion.

Degraded Ad Optimization

Meta’s ad delivery algorithm relies on conversion data to find more customers like your buyers. With fewer reported conversions, the algorithm has less signal to optimize against. CAPI increases the volume of conversion data Meta receives, which directly improves how well your campaigns optimize.

Reduced Match Rates

The Pixel relies on the fbp and fbc cookies to match website visitors back to Facebook users. When those cookies are blocked or expire, match rates drop. CAPI lets you send additional customer identifiers — hashed email, phone number, name, and location — that Meta can use for matching. These identifiers typically produce much higher match rates than cookie-based matching alone.

How CAPI Works with Shopify

At a high level, the flow is:

  1. A customer completes a purchase on your Shopify store.
  2. Your server (or app) sends a Purchase event to Meta’s Conversions API endpoint.
  3. The event includes order details (value, currency, content IDs) and customer matching parameters (hashed email, phone, etc.).
  4. Meta receives the event, deduplicates it against any Pixel event, and attributes the conversion to the appropriate ad.

The technical requirement is an HTTPS POST request to Meta’s Graph API with the event data and your access token. The critical part is including enough customer matching parameters to achieve a high Event Match Quality (EMQ) score.

Event Match Quality (EMQ)

Meta assigns each event an Event Match Quality score from 1 to 10, indicating how well Meta can match the event to a Facebook user. Higher EMQ means better attribution and better ad optimization.

The parameters that improve EMQ:

ParameterImpact on EMQ
Email (hashed)High
Phone number (hashed)High
First name + Last name (hashed)Medium
City + State + Zip (hashed)Medium
Country (hashed)Low
External IDMedium
Client IP addressMedium
User agentLow
Click ID (fbc)High
Browser ID (fbp)Medium

Sending email and phone alone typically gets you to a 6-7 EMQ. Adding name, location, and click/browser IDs pushes you toward 8-10.

Setup Options for Shopify

Option 1: Shopify’s Native Meta Integration

Shopify offers a built-in Meta channel integration (formerly the Facebook Sales Channel). As of recent updates, this integration includes basic CAPI support. When you connect your Meta account through the Shopify admin, it can send purchase events server-side.

Pros:

  • Free, no additional app needed
  • Maintained by Shopify
  • Simple setup through admin UI

Cons:

  • Limited to basic purchase events
  • Sends minimal customer matching parameters (lower EMQ)
  • Limited control over what data is sent
  • No enrichment with UTM or attribution data

Option 2: Meta’s Own CAPI Gateway

Meta offers a CAPI Gateway hosted on cloud infrastructure (AWS or Google Cloud) that acts as a proxy between your site and Meta’s servers. It captures Pixel events at the server level and forwards them via CAPI.

Pros:

  • Official Meta solution
  • Captures a broader range of events

Cons:

  • Requires cloud hosting (additional cost, typically $40-100/month)
  • Technical setup required
  • Does not enrich events with Shopify order data

Option 3: Third-Party Shopify Apps

Several Shopify apps specialize in CAPI integration and offer features beyond what the native integration provides.

What to look for in a CAPI app:

  • High EMQ scores. The app should send multiple customer matching parameters, not just email.
  • Event deduplication. The app must include an event_id that matches the Pixel’s event ID so Meta can deduplicate properly.
  • Purchase event enrichment. The app should include product IDs, order value, and currency in the event payload.
  • UTM and attribution data. Ideally, the CAPI event includes the UTM parameters that brought the customer to your store, giving Meta richer signal about which clicks convert.

How Detectly Handles CAPI

Detectly sends enriched purchase events to Meta’s Conversions API as part of its attribution workflow. Because Detectly already captures UTM parameters and tracks the customer journey through to purchase, it has rich data available to include in the CAPI payload.

Specifically, Detectly’s CAPI integration:

  • Sends purchase events with full order details (value, currency, product content IDs)
  • Includes multiple customer matching parameters (hashed email, phone, name, city, state, zip, country) for high EMQ scores
  • Passes the fbc click ID when available, linking the server event to the original ad click
  • Deduplicates against Pixel events using a shared event ID
  • Fires on every completed order, including those from customers who opted out of browser tracking

This runs automatically once you connect your Meta account in Detectly’s settings — there is no separate CAPI configuration to manage.

Verifying Your CAPI Setup

Regardless of which method you use, you need to verify that events are arriving correctly and being matched.

Meta Events Manager

In your Meta Business Manager, go to Events Manager and select your Pixel. You should see events listed with their source — look for events marked as “Server” or “Browser & Server” (deduplicated).

Key things to check:

  • Event volume. Server events should appear alongside browser events. If you only see browser events, CAPI is not working.
  • Event Match Quality. Click on a server event to see its EMQ score. Aim for 6 or higher; 8+ is excellent.
  • Deduplication. Look for events marked as “Browser & Server.” This means Meta received the event from both sources and successfully deduplicated. If you see duplicate events (separate Browser and Server entries for the same conversion), your event IDs are not matching.

Test Events Tool

Meta’s Events Manager includes a Test Events tab. You can place a test order on your store and watch for the event to appear in real time. This is the fastest way to debug.

Common Issues

Events not appearing at all:

  • Check your Meta access token is valid and has not expired
  • Verify the Pixel ID in your CAPI configuration matches your actual Pixel
  • Check server logs for HTTP errors from Meta’s API

Low EMQ scores:

  • You are not sending enough matching parameters
  • Customer data may not be hashed correctly (Meta requires SHA-256, lowercase, trimmed)
  • The fbc parameter is missing (ensure your storefront captures the fbclid URL parameter)

Duplicate events (not deduplicating):

  • The event_id sent via CAPI must match the eventID sent by the Pixel for the same conversion
  • Check that both Pixel and CAPI fire on the same trigger (typically the order confirmation / thank-you page)

The Impact on Ad Performance

Merchants who implement CAPI properly typically see measurable improvements:

  • 10-30% more attributed conversions in Ads Manager, because server events capture conversions that the Pixel misses
  • Improved ad optimization as Meta’s algorithm receives more conversion signal to learn from
  • More accurate ROAS reporting, which lets you make better budget allocation decisions
  • Higher match rates, especially for iOS users who opted out of tracking

The impact is most noticeable if you have a high proportion of mobile traffic (especially iOS) or if your customers frequently use ad blockers.

Best Practices

  1. Run Pixel and CAPI together. Do not disable the Pixel when you enable CAPI. They complement each other, and Meta handles deduplication.

  2. Send as many matching parameters as possible. Email alone is not enough. Include phone, name, and location data to maximize EMQ.

  3. Hash customer data correctly. All personally identifiable information must be SHA-256 hashed before sending. Trim whitespace and convert to lowercase before hashing.

  4. Monitor EMQ weekly. Your Event Match Quality can change over time. Check it in Events Manager regularly and investigate any drops.

  5. Include content IDs in purchase events. Sending product IDs enables Meta’s catalog-based optimization features, like dynamic product ads.

  6. Test after any store changes. Theme updates, checkout customizations, or app changes can break your CAPI integration. Test with a real order after any significant change.

Wrapping Up

The Meta Conversions API is no longer optional for serious Shopify advertisers. Browser-based tracking continues to erode, and merchants who rely solely on the Pixel are making decisions based on incomplete data.

Whether you use Shopify’s native integration, a dedicated CAPI gateway, or an app like Detectly that bundles CAPI with full attribution tracking, the important thing is to get server-side events flowing to Meta with high match quality. Your ad optimization, your reporting accuracy, and ultimately your return on ad spend all depend on it.

Ready to see your true ROAS?

Detectly tracks every UTM, attributes every Shopify order, and shows you which channels actually drive revenue.