Meta Pixel and Conversions API Setup Guide for 2026
Pixel alone misses a growing share of conversions. This guide walks through installing the Meta Pixel and Conversions API together, deduplication, match quality and testing.
Meta's delivery system is only as good as the conversion data you send it. If half your purchases never reach Meta, the algorithm optimizes toward a distorted picture of who buys, your reported ROAS looks worse than reality, and broad targeting has less to learn from.
The fix is running the Meta Pixel and the Conversions API (CAPI) together. This guide covers what each does, how to set them up on common platforms, how deduplication works, and how to check that it is all working.
Pixel vs Conversions API in one minute
The Meta Pixel is JavaScript that runs in your visitor's browser. When someone views a page, adds to cart or buys, the browser sends that event to Meta.
The Conversions API sends the same events from your server (or your ecommerce platform's server) directly to Meta. It does not depend on the visitor's browser.
| Meta Pixel | Conversions API | |
|---|---|---|
| Runs in | Visitor's browser | Your server or platform |
| Blocked by ad blockers | Often | No |
| Affected by browser privacy limits | Yes | Less |
| Setup effort | Low | Low to moderate (via integration) or high (custom) |
| Captures offline or delayed events | No | Yes (e.g. subscription renewals) |
| Best use | Real-time browsing signals | Reliable purchase and lead events |
Meta recommends using both. The Pixel catches browser behavior quickly; CAPI fills the gaps the browser misses. Duplicate events are removed by deduplication, covered below.
Events to track
For an ecommerce store, the standard set is:
- PageView on every page
- ViewContent on product pages
- AddToCart
- InitiateCheckout
- AddPaymentInfo (optional)
- Purchase with
valueandcurrency
For lead generation or apps, add Lead, CompleteRegistration, Subscribe or StartTrial as relevant. Always send value and currency on purchase events. Without them, Meta cannot optimize for value or report ROAS properly.
Setup by platform
Shopify
Shopify's Facebook and Instagram sales channel app (Meta's official integration) installs the Pixel and sets up the Conversions API together. In the app's data-sharing settings, choose the maximum level, which enables server-side sharing. Shopify then handles deduplication automatically.
Avoid also pasting Pixel code into your theme. Two installs of the same Pixel cause double-counted events.
WooCommerce
Meta's official plugin for WooCommerce supports both Pixel and CAPI. Several third-party plugins do too. Pick one, enable server events, and make sure no theme or other plugin is firing a second Pixel.
Other platforms and custom sites
Options, from easiest to most technical:
- Native partner integration. Many platforms (BigCommerce, Wix, Squarespace and others) have built-in Meta integrations. Check Events Manager's partner list.
- Conversions API Gateway. A Meta-provided, hosted setup that mirrors your Pixel events server-side without much code. It runs on cloud infrastructure, with a hosting cost that depends on the provider.
- Server-side tag manager. A server-side Google Tag Manager container with a Meta CAPI tag. Flexible, but needs someone comfortable with tagging.
- Direct API integration. Your developers send events from your backend. Most control, most effort.
Deduplication: the step people skip
When both Pixel and CAPI send the same purchase, Meta needs to know they are one event, not two. It matches them using:
event_name(e.g.Purchase), andevent_id, a unique ID you generate for each event and send with both the browser and server versions.
If the two IDs match within the deduplication window, Meta keeps one. If you forget event_id, you can end up double-counting purchases, which inflates ROAS and confuses optimization.
A simple pattern: use the order ID as the event_id for purchases, so browser and server versions match.
Browser: fbq('track', 'Purchase', {value: 64.00, currency: 'USD'}, {eventID: 'order_10482'});
Server: event_name = "Purchase", event_id = "order_10482", value = 64.00, currency = "USD"Platform integrations like Shopify's handle this for you. Custom setups need to do it deliberately.
Event match quality
Server events need to be matched to a Meta user. The more customer information you send (hashed), the better the match. Events Manager shows an Event Match Quality score for each event.
Parameters that help most:
- Email (hashed)
- Phone number (hashed)
- First and last name, city, state, zip, country (hashed)
- External ID (your customer ID, hashed)
- Client IP address and user agent
- The
fbpcookie andfbcclick ID when available
Send only data you have collected with appropriate consent and disclosed in your privacy policy. Integrations usually hash automatically; custom setups must hash with SHA-256 before sending.
How to verify your setup
- Events Manager overview. Each event should show both "Browser" and "Server" as connection methods.
- Test Events tab. Use the test code to fire events from your site and watch them arrive in real time. Place a test order if you can.
- Deduplication check. In the event details, Meta shows whether browser and server events are being deduplicated. Look for a healthy overlap rather than two separate counts.
- Match quality. Aim to raise scores over time by adding customer parameters.
- Compare to your backend. Over a week, compare Meta-reported purchases (on a 1-day click or 7-day click window) with orders in your store. They will not match exactly (attribution differs), but large gaps signal tracking problems.
- Diagnostics tab. Fix any warnings about missing parameters, duplicate pixels or domain issues.
Also verify your domain in Business Manager and configure your top-priority events if Meta prompts you to, so iOS reporting is handled correctly.
Common mistakes
- Two Pixels firing. Theme code plus an app, or two apps. Check with Meta Pixel Helper in Chrome.
- Purchase fires on page reload. Thank-you pages that fire Purchase every time they load double-count orders. Fire once per order.
- Missing value or currency. Breaks value optimization and ROAS.
- No
event_id. Double-counting between browser and server. - Testing purchases left in. Test orders that stay in the data can skew small accounts.
- Ignoring consent. In regions with consent requirements, make sure your setup respects the visitor's choice.
Why this matters for ROAS and budgeting
Clean tracking changes the numbers you make decisions on. Say a store does 200 orders a month from Meta at a $65 average order value, and spends $6,500:
- If the Pixel alone reports 150 of those orders, reported ROAS is (150 x $65) / $6,500 = 1.5.
- If Pixel plus CAPI reports 190 of them, reported ROAS is (190 x $65) / $6,500 = 1.9.
Same real results, different decisions. At 1.5 you might cut budget; at 1.9 you might hold or scale. Check your thresholds with the break-even ROAS calculator and ROAS calculator, and read what a good ROAS on Meta looks like.
Because platform reporting is never perfect, many brands also track MER (total revenue divided by total ad spend) as a reality check. Our MER guide explains how.
UTMs as a backup
Add UTM parameters to every ad link so your analytics tool sees Meta traffic independently of Meta's own reporting. Use a consistent naming scheme such as utm_source=facebook&utm_medium=paid_social&utm_campaign={{campaign.name}}. The UTM builder helps keep naming consistent across channels.
The same idea on ChatGPT ads
OpenAI's ad platform uses a similar two-part setup: a browser pixel (often called the OAIQ pixel) for page view, add to cart, sign up, lead and purchase events, and a server-side Conversions API. As of mid-2026, OpenAI also rolled out automatic advanced matching. If you already understand Meta's Pixel plus CAPI setup, the ChatGPT version will feel familiar. Our ChatGPT ads conversion tracking guide walks through it.
How SecondWin helps
SecondWin manages ChatGPT ads for consumer brands. It finds the longest-running Meta ads in your niche, extracts their proven messages, writes original policy-checked ChatGPT ads around the questions your buyers ask, and launches campaigns in your own OpenAI ad account. Your data and spend stay in your account. Start with a free analysis of your website to see the buyer questions and ad concepts it would use. Monthly plans are listed on the SecondWin pricing page.
FAQ
Do I need both the Meta Pixel and Conversions API?
Meta recommends both, and most advertisers benefit. The Pixel captures browser events in real time, while the Conversions API sends events from your server, which ad blockers and browser privacy limits cannot block. Together they report more of your actual conversions. Use an event_id on both so Meta can remove duplicates.
How do I stop the Pixel and Conversions API double-counting purchases?
Send the same event_name and a matching event_id with both the browser and server versions of each event. Meta then deduplicates them and keeps one. Using the order ID as the event_id for purchases is a simple approach. Official integrations like Shopify's handle this automatically, so avoid adding extra Pixel code alongside them.
What is a good Event Match Quality score?
Higher is better, and Meta labels scores from poor to great in Events Manager. Rather than chasing a specific number, add as many consented, hashed customer parameters as you can: email, phone, name, location, external ID, IP address, user agent and click IDs. Purchase events usually score highest because checkout collects the most customer information.
How long does Conversions API take to set up?
With a native integration such as Shopify's, it can take minutes: connect the app and choose maximum data sharing. The Conversions API Gateway usually takes under an hour plus hosting configuration. A custom server-side integration can take days of developer time depending on your stack. Testing and verification should be done the same day regardless.
Why don't Meta's reported purchases match my store orders?
Meta reports conversions within its attribution window (often 7-day click and 1-day view) and attributes by when the ad was seen, while your store counts orders by order date from all sources. Some orders are also never matched to a Meta user. A gap is normal; a very large or sudden gap usually means a tracking issue.