How to Set Up the Meta Pixel and Conversions API Correctly
by Stipe Kakic on Oct 17, 2026
To track Meta ads properly today, you want both the Meta Pixel (in the browser) and the Conversions API (from your server or platform), sending the same events with a shared event ID so Meta can remove duplicates. The pixel alone misses a growing share of conversions because of browser restrictions, ad blockers and consent choices. For most Shopify and WordPress sites, setting up both is easier than it sounds.
What the pixel and the Conversions API do
| Meta Pixel | Conversions API (CAPI) | |
|---|---|---|
| Where it runs | In the visitor's browser | From your server, platform or a gateway |
| Strength | Easy to install, captures browsing behaviour | Less affected by browser restrictions and ad blockers |
| Weakness | Can be blocked or limited | Needs more setup; must be deduplicated |
Together they give Meta a more complete picture of which ads lead to purchases or leads. That matters both for reporting and for how well Meta's delivery system can find people likely to convert.
Step 1: Decide which events matter
Before installing anything, list the actions you want to track. Meta has standard events for the common ones:
- Webshop: PageView, ViewContent, AddToCart, InitiateCheckout, Purchase (with value and currency)
- Lead generation: PageView, Lead (form submitted), Contact, Schedule (booking)
Use the standard event names where they fit. They are easier to optimise for than custom events.
Step 2: Choose your setup method
Option A: Platform integration (easiest)
Shopify, WooCommerce and many other platforms have official Meta integrations. On Shopify, connecting the Facebook & Instagram sales channel typically sets up both pixel and Conversions API for standard ecommerce events, with deduplication handled for you. For most small webshops this is where I start.
Option B: Conversions API Gateway or a partner tool
Meta and various partners offer ways to send server events without writing code. Useful if your platform lacks a good integration.
Option C: Server-side Google Tag Manager
The most flexible option: browser events go to your own server-side container, which forwards them to Meta (and often to Google too). It gives you more control over data, but requires hosting and technical setup. Worth it for larger sites or when you need custom events.
Option D: Custom development
A developer sends events directly from your backend to the API. Most control, most work.
Step 3: Get deduplication right
When the same purchase is sent by both pixel and CAPI, Meta needs to know it's one purchase, not two. This is done by sending:
- the same event name (e.g. Purchase), and
- the same event ID from both sources (often the order ID or a generated unique ID).
If deduplication fails, you'll see inflated conversions and a ROAS that looks too good to be true. Illustrative example: you get 40 real orders in a week, but Events Manager shows close to 80 purchases. That's a strong sign both sources are counted separately.
Step 4: Send good customer information (with consent)
Conversions API events can include customer information like email or phone number, hashed before sending, to help Meta match the event to a person. Meta shows an Event Match Quality score in Events Manager for this. Better matching usually means better attribution and optimisation.
This is personal data, so it must be handled in line with GDPR and your consent setup. In general, tracking for marketing should respect the visitor's cookie choices. I'm not a lawyer, so check with a legal advisor how this applies to your business.
Step 5: Test before you trust it
- Use the Test Events tool in Events Manager and go through your site: view a product, add to cart, complete a test order or submit a form.
- Check that each event arrives from both browser and server, and that they are marked as deduplicated.
- Check that Purchase includes the correct value and currency (SEK).
- Compare a week of Meta-reported purchases with your actual orders. They won't match exactly, since Meta attributes based on its own windows, but large gaps point to a problem.
- Verify your domain in Business Manager if you haven't already.
Common problems I see
- The pixel is installed twice (theme code plus an app), firing every event double.
- Purchase fires on page reload of the thank-you page.
- Value sent without currency, or in the wrong currency.
- Lead fires on page view of the contact page rather than on actual submission.
- Old pixel IDs from a previous agency still active on the site.
Key takeaways
- Use both the Meta Pixel and the Conversions API.
- Start with your platform's official integration if there is one.
- Deduplicate with matching event names and event IDs.
- Test with Test Events and compare against real orders or leads.
- Respect consent and check GDPR questions with a legal advisor.
Good tracking is the foundation of everything I do in social media advertising and web analytics. Once it's working, use the ROAS calculator to see what return you need.
Not sure your Meta tracking is right? Request a free tracking review.