If you run Facebook ads for your Shopify loja, you have probably noticed that reported performance has deteriorated since Apple's iOS 14+ privacy changes rolled out. Conversoes appear lower, ROAS seems worse, and your ad otimizacao feels less effective. The problem is not necessarily that your ads are performing worse — it is that your tracking is missing a large portion of conversaos.

The Facebook Pixel is a JavaScript snippet that runs in the visitor's browser. When an iOS user opts out of tracking (which 75-85% now do), the Pixel cannot fire. When a visitor uses an ad blocker, the Pixel is blocked. When third-party cookies are restricted (increasingly the default), the Pixel's ability to match users degrades. The result: Facebook sees fewer conversaos, attributes less receita to your ads, and optimizes your campaigns based on incomplete data.

Facebook Conversoes API (CAPI) solves this by sending conversao events directly from your Shopify server to Facebook's servers. Nao browser involved, no JavaScript to block, no cookie to restrict. When a cliente completes a purchase on your Shopify loja, Shopify sends the purchase event to Facebook server-to-server, along with cliente data (email, phone, IP address) that Facebook uses to match the conversao to the ad click that initiated it.

This guide walks through the complete CAPI setup for Shopify, explains how event deduplication works, and covers how your on-site tools (pop-ups, upsells, and other apps) interact with server-side tracking.

How Facebook Conversoes API Works

The Conversoes API is a server-side integration that allows you to send web events directly from your server to Facebook. Instead of relying on a browser-based pixel that runs JavaScript on the user's device, CAPI makes HTTPS POST requests from your server to Facebook's Graph API endpoint.

When a cliente takes an action on your Shopify loja — views a product, adds to carrinho, initiates checkout, or completes a purchase — two things happen simultaneously in a properly configured setup:

  1. Browser-side (Pixel): The Facebook Pixel JavaScript fires in the visitor's browser and sends the event to Facebook. This works for visitors who have not blocked tracking.
  2. Server-side (CAPI): Shopify's server sends the same event directly to Facebook via the Conversoes API. This works regardless of the visitor's browser settings, iOS version, or ad blocker status.

Facebook receives both events, uses event deduplication to count them as a single conversao (not double), and uses the server-side data to fill gaps where the pixel was blocked. The result is more complete conversao data, better attribution, and more effective ad otimizacao.

Pixel vs CAPI: Understanding Both Systems

Recurso Facebook Pixel Conversoes API
How it sends data Browser JavaScript Server-to-server HTTPS
Blocked by iOS 14+ Sim (for opted-out users) Nao
Blocked by ad blockers Sim Nao
Affected by cookie restrictions Sim Nao
Tracks browsing behavior Sim (PageView, scroll, etc.) Limited (server-triggered events)
Dados accuracy 60-80% (declining) 95%+ (server-verified)
Configuracao difficulty Easy (paste code snippet) Moderate (Shopify handles most)
Recommended use Always on (alongside CAPI) Always on (alongside Pixel)

iOS 14+ Impact on Facebook Ad Tracking

Apple's App Tracking Transparency (ATT) framework, introduced with iOS 14.5 in April 2021, fundamentally changed how Facebook advertising works. Here is what happened and why CAPI is now essential:

What Changed

Before iOS 14, the Facebook app on iPhones could track user activity across apps and websites using Apple's IDFA (Identifier for Advertisers). This allowed Facebook to see when someone who clicked an ad later purchased on your website, even across sessions and devices. When Apple required apps to ask permission before tracking, 75-85% of iOS users chose to opt out.

Impact on Shopify Advertisers

  • Under-reported conversaos: Facebook cannot see purchases from opted-out iOS users via the Pixel. A loja with 50% iOS trafego might see 20-40% of conversaos disappear from Facebook reporting.
  • Degraded ad otimizacao: Facebook's algorithm learns from conversao data. With less data, it makes worse decisions about who to show your ads to, leading to higher CPAs and lower ROAS.
  • Attribution window reduction: Facebook shortened the default attribution window from 28 days to 7 days, further reducing reported conversaos.
  • Limited event tracking: iOS 14+ limits each domain to 8 prioritized conversao events, down from unlimited events before.

How CAPI Fixes These Issues

CAPI bypasses all browser-level restrictions because it sends data server-to-server. When a cliente completes a purchase, Shopify sends the purchase event to Facebook directly, along with cliente information (hashed email, phone number, and IP address) for user matching. Facebook can then attribute the purchase to the original ad click, even for opted-out iOS users.

💡 Dados Recuperacao: Shopify lojas that implement CAPI alongside the Pixel typically recover 15-30% of previously unreported conversaos. This does not mean vendas increased — it means Facebook can now see (and optimize for) vendas that were happening but invisible. Better data leads to better otimizacao, which leads to genuinely improved performance over time.

Setting Up CAPI on Shopify (Passo-by-Passo)

Shopify has made CAPI setup straightforward through its Facebook & Instagram vendas channel. Nao custom coding is required for the standard implementation.

Passo 1: Install the Facebook & Instagram Channel

In your Shopify admin, go to Vendas channels → Add channel → Facebook & Instagram. If you already have this channel installed, make sure it is updated to the latest version.

Passo 2: Connect Your Facebook Business Manager

Follow the setup wizard to connect your Facebook Business Manager account. You will need to authenticate with a Facebook account that has admin access to the Business Manager. Select the correct Ad Account, Facebook Page, and Pixel to connect.

Passo 3: Enable Conversoes API

In the Facebook & Instagram channel settings, navigate to the Dados sharing section. You will see three data sharing levels:

  • Standard: Uses Facebook Pixel only (browser-side tracking).
  • Enhanced: Uses Facebook Pixel with additional browser-side data matching.
  • Maximum: Uses both Facebook Pixel and Conversoes API (recommended). This is the setting you want.

Select Maximum to enable CAPI. Shopify will automatically configure server-side event sending for all standard ecommerce events.

Passo 4: Verify Domain

Domain verification is required for proper CAPI and Aggregated Event Measurement (AEM) functionality. In Facebook Business Manager, go to Business Settings → Brand Safety → Domains. Add your Shopify domain and verify it using the DNS TXT record method or HTML meta tag method. Shopify's Facebook channel often handles this automatically.

Passo 5: Configure Aggregated Event Measurement (AEM)

After domain verification, configure your 8 prioritized events in Events Manager. Go to Events Manager → Aggregated Event Measurement → Configure Web Events. Set your events in priority order (highest to lowest):

  1. Purchase
  2. InitiateCheckout
  3. AddToCarrinho
  4. ViewContent
  5. Lead (if you collect email signups)
  6. AddPaymentInfo
  7. Search
  8. PageView

Events and Event Matching

CAPI sends events to Facebook using cliente matching parameters. The more parameters you provide, the higher the match rate — meaning Facebook can more accurately attribute conversaos to ad clicks.

Key Matching Parameters

  • Email address (hashed) — the strongest matching signal. Available when clientes provide their email at checkout or through signup forms.
  • Phone number (hashed) — another strong signal, especially for mobile conversaos.
  • IP address — helps match anonymous browsing sessions to known users.
  • User agent — browser and device information used for probabilistic matching.
  • fbclid — the Facebook click ID parameter appended to URLs when users click ads. The strongest deterministic matching signal when available.
  • fbc and fbp cookies — Facebook browser cookies that Shopify can access and pass to CAPI.

Shopify's CAPI implementation automatically sends all available matching parameters. For purchase events (where the cliente has provided their email and phone at checkout), match rates typically exceed 90%. For earlier funnel events (PageView, ViewContent), match rates are lower because less cliente data is available.

Event Deduplication: Avoiding Double-Counting

When both the Pixel and CAPI send the same event, Facebook needs to know they represent the same action, not two separate actions. This is handled through event deduplication using an event_id parameter.

When Shopify sends a Purchase event, both the Pixel and CAPI include the same event_id (typically the Shopify order ID). Facebook sees both events, matches them by event_id, and counts them as a single conversao. If only one arrives (because the Pixel was blocked), Facebook counts the CAPI event alone.

Shopify's built-in integration handles deduplication automatically. If you are using custom CAPI implementations or third-party tracking apps, ensure they use the same event_id format as your Pixel events to avoid double-counting.

Testing Your CAPI Configuracao

After setup, verify that CAPI is working correctly before relying on its data for otimizacao decisions.

Use Facebook's Test Events Tool

In Events Manager, go to Test Events. This shows real-time events as they arrive from both the Pixel and CAPI. Visit your Shopify loja, view a product, add to carrinho, and complete a test purchase. You should see events from both "Browser" (Pixel) and "Server" (CAPI) sources.

Check Event Match Quality

In Events Manager, navigate to the Visao Geral tab and check the Event Match Quality (EMQ) score for each event. This score (1-10) indicates how well your server events can be matched to Facebook users. Aim for a score of 6 or higher. Scores below 4 indicate missing cliente parameters.

Verify Deduplication

In the Test Events view, check that duplicate events are being properly deduplicated. You should see a "Deduplicated" label on matching Pixel/CAPI event pairs. If events are not being deduplicated, check that both sources are using the same event_id.

Monitor the Diagnostics Tab

Events Manager's Diagnostics tab flags issues with your setup — missing parameters, high error rates, or deduplication problems. Check this tab weekly for the first month after setup, then monthly after that.

How CAPI Works With Pop-ups, Upsells, and Other Apps

If you use Shopify apps like EA Roleta de Premios Pop-up de Email for email collection or EA Upsell & Cross-Sell for upsells, you might wonder how these interact with CAPI tracking.

Pop-up Email/SMS Signups

When a visitor submits their email through a roleta de premios pop-up, this is typically tracked as a Lead or CompleteRegistration event by the Facebook Pixel (browser-side). CAPI does not natively capture this event because it happens before checkout. However, when that visitor later purchases, the email they provided at signup is sent to Facebook via CAPI as a matching parameter, improving the match rate for the purchase event.

In this way, pop-ups actually improve CAPI performance — by collecting cliente email addresses earlier in the journey, you provide Facebook with a stronger matching signal for the eventual purchase event.

Upsell and Cross-Sell Purchases

When a cliente accepts an upsell offer and adds an additional product to their order, the final purchase event captured by CAPI reflects the total order value, including any upsell items. Facebook sees the full receita from the conversao, which improves your reported ROAS. This is one reason why upsell apps like EA Upsell & Cross-Sell are particularly valuable for Facebook advertisers — they increase the receita attributed to each Facebook-driven purchase.

Barra de Frete Gratiss and Other Conversao Ferramentas

On-site conversao tools like frete gratis bars, sticky add-to-carrinho buttons, and temporizador regressivos operate independently of CAPI. They influence the visitor's behavior on your loja (increasing the likelihood and size of a purchase), and CAPI captures the resulting purchase event with the full order value. Better on-site conversao means more purchase events for Facebook's algorithm to optimize against.

💡 Stack Effect: The combination of CAPI (for accurate tracking) and on-site conversao tools (for higher taxa de conversaos and AOV) creates a compounding effect. More complete conversao data means Facebook optimizes better, and higher taxa de conversaos mean each ad click generates more receita. Lojas using both see 25-40% better Facebook ROAS than lojas using neither.

Optimizing CAPI for Maximum ROAS

Once CAPI is set up and verified, these otimizacaos squeeze more value from your Facebook advertising:

  1. Maximize event match quality. Send as many cliente parameters as possible — email, phone, name, city, state, zip code. Shopify sends most of these automatically for purchase events. For earlier funnel events, collecting email through pop-ups provides additional matching signals.
  2. Use value-based otimizacao. With accurate purchase data from CAPI, enable value-based bidding in your Facebook campaigns. This tells Facebook to optimize for highest-value purchases, not just any purchase, improving ROAS.
  3. Monitor event match quality weekly. A drop in EMQ score often indicates a technical issue — check that the Facebook channel is properly connected and all matching parameters are being sent.
  4. Keep the Pixel and CAPI running simultaneously. Do not remove the Pixel when you add CAPI. The Pixel still captures real-time browsing signals that CAPI cannot (scroll depth, time on page, micro-interactions) which help Facebook build richer audience profiles.
  5. Prioritize your conversao events correctly. Under AEM, arrange your 8 events with Purchase as the highest priority. Facebook will always attempt to capture the highest-priority event for each user within the 7-day attribution window.
  6. Use UTM parameters consistently. While CAPI handles Facebook attribution, UTM parameters help you verify Facebook's reported data against your own analytics (GA4, Shopify Analitico) for a more complete performance picture.

Common CAPI Issues and Solutions

Issue: Event Match Quality score is low (below 4). Ensure Shopify's Facebook channel is set to "Maximum" data sharing. Check that cliente email and phone fields are populated at checkout. Desvantagensider collecting emails earlier via pop-up forms to improve matching.

Issue: Events are being double-counted. Check that event deduplication is working by verifying event_id consistency between Pixel and CAPI events. If using a third-party tracking app alongside Shopify's built-in channel, you may have conflicting implementations.

Issue: CAPI events show in test mode but not in production. Ensure your Facebook channel is fully connected and not in a disconnected or error state. Go to the channel settings and re-authenticate if needed. Check for any API errors in the Diagnostics tab.

Issue: Reported conversaos still seem too low. CAPI recovers most but not all lost conversaos. Some data loss is permanent under iOS ATT. Focus on trends rather than absolute numbers — if your ROAS trend improves after CAPI implementation, it is working correctly.

Perguntas Frequentes

O que e Facebook Conversoes API for Shopify?

Facebook Conversoes API (CAPI) is a server-side tracking method that sends conversao events directly from Shopify's servers to Facebook. Unlike the Facebook Pixel which runs in the visitor's browser and can be blocked by iOS privacy settings, ad blockers, and cookie restrictions, CAPI sends data server-to-server and cannot be blocked. It recovers 20-40% of conversao data lost to iOS 14+ privacy changes.

How do I set up Facebook Conversoes API on Shopify?

Install Shopify's Facebook & Instagram vendas channel. Connect your Facebook Business Manager. In the channel's Dados Sharing settings, select "Maximum" to enable both Pixel and CAPI. Verify your domain in Facebook Business Manager. Configure your 8 prioritized events under Aggregated Event Measurement. Shopify handles all server-side event sending automatically — no coding required.

Does Facebook CAPI replace the Facebook Pixel?

Nao. CAPI works alongside the Pixel, not as a replacement. The recommended setup uses both simultaneously. The Pixel captures browser-side events from non-iOS users and provides real-time browsing signals. CAPI captures conversaos from iOS users and ad-blocker users that the Pixel misses. Facebook deduplicates matching events using event_id to avoid double-counting.

Por Que is my Facebook ad ROAS dropping after iOS 14?

iOS 14+ App Tracking Transparency requires apps to ask permission before tracking, and 75-85% of users opt out. Without CAPI, the Facebook Pixel cannot see these users' conversaos, causing artificially deflated ROAS numbers. Your ads may be performing better than reported. Setting up CAPI recovers the lost data, giving Facebook more accurate numbers to report and optimize against.

Do pop-ups and upsells track through Facebook Conversoes API?

Pop-up interactions (like email signups from EA Roleta de Premios Pop-up) are typically tracked by the Pixel as Lead events. CAPI handles the purchase event server-side. When pop-ups collect email addresses, they actually improve CAPI performance by providing Facebook with a matching parameter for the eventual purchase. Upsell receita is included in the total purchase value captured by CAPI.

Aumente Seu Facebook ROAS With Better Taxa de Conversaos

Accurate tracking with CAPI is step one. Passo two is converting more of your Facebook trafego. EA apps increase taxa de conversaos, AOV, and email capture — all of which improve your Facebook ad performance. Gratis to install.

Browse All EA Apps — Gratis