Free SEO audit for new clients — claim yours
Home/Blog/Paid Ads & CRO/Meta Pixel and Conversions API Setup
Paid Ads & CRO

Meta Pixel and Conversions API Setup

Meta Pixel and Conversions API Setup
Table of contents
  1. Key Takeaways
  2. Pixel vs Conversions API
  3. Which events to send
  4. How deduplication works
  5. Step-by-step setup
  6. Common mistakes
  7. Related Guides
  8. Frequently Asked Questions
    1. Do I still need the Meta Pixel if I use the Conversions API?
    2. What is Event Match Quality?
    3. How does Meta deduplicate Pixel and server events?
    4. Can I send offline sales through the Conversions API?
    5. Is the Conversions API hard to set up?
  9. Conclusion
  10. References

Meta's ad delivery is only as smart as the data you send it. If your Pixel misses half your purchases because of browser restrictions, ad blockers or a broken checkout page, Meta optimises toward an incomplete picture – and your reported cost per purchase looks worse than reality.

The fix Meta recommends is to run two connections side by side: the Meta Pixel in the browser and the Conversions API (CAPI) from your server. Done properly, they back each other up, Meta deduplicates the overlap, and you get more complete, better-matched conversion data.

This guide explains what each does, which events to send, how deduplication actually works, the setup options from no-code to fully custom, and how to test it all before you trust the numbers.

Key Takeaways

  • The Pixel tracks actions in the browser; the Conversions API sends the same events from your server, CRM or platform.
  • Meta recommends using both together, with matching event_name and event_id so duplicates are removed.
  • Send standard events (Purchase, Lead, AddToCart and so on) with values and currency wherever possible.
  • Include hashed customer information parameters to improve matching and your Event Match Quality score.
  • Test with the Test Events tool in Events Manager before relying on the data for optimisation.

Pixel vs Conversions API

“The Meta Pixel is a snippet of JavaScript code that allows you to track visitor activity on your website.”

— Meta for Developers, Meta Pixel

The Conversions API does the same job from the other end: your server sends events directly to Meta. According to Meta's documentation, server events linked to a dataset ID are processed like Pixel events, so they can be used for measurement, reporting and optimisation. It also handles events that never happen in a browser, such as phone sales or in-store purchases.

Meta PixelConversions API
Where it runsVisitor's browserYour server, platform or CRM
Affected by ad blockers / browser limitsYesMuch less
Offline events (calls, store sales)NoYes
Setup effortLow – paste code or use a pluginLow (partner integration) to high (custom code)
Browser data (cookies, page URL)Collected automaticallyMust be passed in (e.g. fbp, fbc, event_source_url)
Best useReal-time browsing behaviour, audiencesReliable conversions and first-party matching

“We recommend that you use the Conversions API in addition to the Meta Pixel”

— Meta for Developers, Conversions API best practices

Which events to send

Meta defines a set of standard events. Use them rather than custom names wherever they fit, because Meta's optimisation understands them out of the box.

Standard eventUse it whenKey parameters
ViewContentA product or key landing page is viewedcontent_ids, content_type, value, currency
AddToCartAn item is added to the cartcontent_ids, value, currency
InitiateCheckoutCheckout startsvalue, currency, num_items
PurchaseAn order is completedvalue and currency (required), content_ids for catalog ads
LeadA sign-up or enquiry form is completedvalue (estimated), currency
CompleteRegistrationAn account or registration form is completedvalue, currency
Schedule / ContactAn appointment is booked or someone contacts you—
Subscribe / StartTrialA paid subscription or free trial startsvalue, currency, predicted_ltv

How deduplication works

If the Pixel and CAPI both report the same purchase, Meta needs to know it's one purchase, not two. Meta's server event documentation says deduplication relies on two fields matching:

  • event_name – identical in both (e.g. Purchase).
  • event_id on the server and eventID in the Pixel – the same unique value, ideally your order or transaction ID.

Meta counts matching events received within 48 hours once, and when browser and server versions arrive within roughly five minutes of each other it keeps the browser version. A browser event looks like this:

fbq('track', 'Purchase',
  {value: 129.00, currency: 'GBP', content_ids: ['SKU123'], content_type: 'product'},
  {eventID: 'order-10482'});

And the matching server event sent to the Conversions API:

{
  "data": [{
    "event_name": "Purchase",
    "event_time": 1760000000,
    "event_id": "order-10482",
    "action_source": "website",
    "event_source_url": "https://example.com/checkout/thank-you",
    "user_data": {
      "em": ["<SHA-256 hash of lowercase email>"],
      "ph": ["<SHA-256 hash of phone with country code>"],
      "fbp": "fb.1.1759999000000.123456789",
      "client_ip_address": "203.0.113.10",
      "client_user_agent": "Mozilla/5.0 ..."
    },
    "custom_data": {"value": 129.00, "currency": "GBP"}
  }]
}

Two rules from the documentation trip people up: event_time can be up to seven days old, and if any event in a request is older, the whole request fails; and event_source_url is required for website events sent through the API.

Step-by-step setup

  1. Create or confirm your dataset (Pixel) in Events Manager, and verify your domain in Business Settings.
  2. Pick an integration route. Partner integrations (for example Shopify or WooCommerce plugins) are quickest. The Conversions API Gateway runs on your own cloud account with little code. Server-side tagging through Google Tag Manager suits teams already using it. Direct integration gives full control but needs a developer.
  3. Install the Pixel base code on every page and fire standard events at the right moments – the purchase event on the confirmed order, not on the payment page.
  4. Send the same events via CAPI with identical event names and a shared event_id.
  5. Add customer information parameters. Email, phone, name, IP address, user agent and the fbp/fbc cookie values improve matching. Hash personal fields with SHA-256 unless your SDK does it for you.
  6. Set action_source correctly – website for site events, physical_store or phone_call for offline ones.
  7. Respect consent. Only send data you're allowed to under GDPR, UK GDPR, US state laws or sector rules. Our guide to cookieless tracking covers the wider picture.
  8. Test. Use the Test Events tool, place a real test order and confirm both browser and server events show as received and deduplicated.
  9. Monitor Event Match Quality. Meta scores it out of 10 for web events in Events Manager. Low scores usually mean missing customer parameters.

Common mistakes

  • Different event IDs in browser and server. The result is double-counted conversions and inflated ROAS.
  • Sending server events in big daily batches. Meta advises sending events in real time or close to it.
  • Purchase without value or currency. Value-based optimisation and ROAS reporting break.
  • Purchase firing on page reload. Thank-you pages that fire on every refresh create phantom sales; use the order ID to guard against it.
  • Stale fbp/fbc values. These cookie values change, so pass the current ones from the session.
  • Sending sensitive data. Health businesses in particular must not pass protected health information; in the US, HIPAA rules apply to covered entities. Keep event names and URLs generic.
  • Never re-checking. Site redesigns and checkout changes silently break tracking. Add it to every release checklist and your PPC audit.

Once data is flowing, your Meta ads targeting and retargeting audiences get stronger too. For the Google side of measurement, see our Google Ads conversion tracking guide and GA4 key events setup.

Frequently Asked Questions

Do I still need the Meta Pixel if I use the Conversions API?

Meta recommends using both. The Pixel captures browser behaviour in real time; the Conversions API adds reliability and offline events. Deduplication stops double counting.

What is Event Match Quality?

A score out of 10 in Events Manager showing how well the customer information in your server events can be matched to Meta accounts. More and better customer parameters usually raise it.

How does Meta deduplicate Pixel and server events?

It matches events with the same event name and event ID. Matching events received within 48 hours are counted once.

Can I send offline sales through the Conversions API?

Yes. Use the appropriate action_source, such as physical_store or phone_call, and include customer information so Meta can match the sale.

Is the Conversions API hard to set up?

Not necessarily. Many ecommerce platforms offer built-in integrations. Custom sites need developer time or a server-side tagging setup.

Conclusion

A redundant Pixel plus Conversions API setup is now the baseline for anyone serious about Meta ads. Get the events right, share one event ID, add hashed customer data and test before you scale spend. If you want it done properly the first time, our paid media team sets up and audits tracking for Meta and Google – get a quote.

References

  1. Meta Pixel – Meta for Developers
  2. Meta Pixel reference: standard events – Meta for Developers
  3. Conversions API – Meta for Developers
  4. Conversions API best practices – Meta for Developers
  5. Server event parameters – Meta for Developers
  6. Facebook Advertising: How to Run Campaigns on Facebook – Semrush Blog
Rohit Choudhary
Written byRohit ChoudharyCo-Founder, My SEO Experts

Rohit Choudhary is the co-founder of My SEO Experts and has more than 14 years of hands-on experience in SEO, paid advertising and digital marketing. Since starting out in 2011 he has helped hundreds of businesses grow through practical, data-driven search strategies, and he also serves as a consulting Digital Marketing Director for several US-based companies.

Keep reading

Related articles

Google Maps Ads: Local Search Ads Explained
Paid Ads & CRO

Google Maps Ads: Local Search Ads Explained

How to advertise on Google Maps in 2026: the ad formats, the campaigns that can serve on Maps, step-by-step setup with location assets and how to measure results.

Google Ads Keyword Match Types Explained
Paid Ads & CRO

Google Ads Keyword Match Types Explained

How broad, phrase and exact match really work in 2026, how Google picks between keywords, where AI Max fits in, and how to choose the right mix.

Ready to grow your business online?

Get a free, no-obligation proposal tailored to your goals and budget.

CallFree Quote