Meta Pixel and Conversions API: How to Set Up Facebook Tracking Properly

How to set up the Meta Pixel and Conversions API: standard events, deduplication, Event Match Quality, testing and privacy basics.

On this page

If you run Facebook or Instagram ads, your tracking setup decides how well Meta’s delivery system can find buyers for you. Broken or missing tracking is the most common reason I see small business campaigns struggle: Meta simply can’t tell who converted.

In my Facebook ads for beginners guide, I said to set up tracking before spending anything. This guide is the detailed version: what the Meta Pixel and Conversions API are, how to install them, how to avoid double counting and how to check everything works.

Pixel vs Conversions API: what’s the difference?

Meta PixelConversions API (CAPI)
Where it runsIn the visitor’s browser (JavaScript)On your server or a server-side tool
What it sendsPage views and actions on your siteThe same events, sent server-to-server
Weak spotsAd blockers, browser privacy limits, slow pagesNeeds more setup
Best useAlways install itAdd it alongside the Pixel

Meta recommends a redundant setup: send the same important events through both the Pixel and the Conversions API. The browser catches what the server misses and vice versa, as long as you deduplicate them (more on that below).

Note: In Events Manager, Meta now groups Pixel and Conversions API events under a dataset. You’ll see both names, but they refer to the same tracking setup.

Step 1: Create your Pixel (dataset)

  1. Open Events Manager in Meta Business Suite.
  2. Click Connect data sources > Web, name it after your website, and enter your URL.
  3. Make sure it’s connected to the ad account you’ll run ads from.

Step 2: Install the Pixel on your website

Choose the method that suits your site:

  • Partner integration (easiest): WordPress/WooCommerce, Shopify, and many other platforms have official Meta integrations. They install the Pixel and often the Conversions API in a few clicks.
  • Google Tag Manager: add the Pixel base code as a Custom HTML tag firing on all pages, then add event tags. My Google Tag Manager guide explains triggers and testing.
  • Manual code: paste the base code into your site’s <head> on every page.

Step 3: Choose your standard events

Meta has predefined standard events. Use them rather than inventing your own names, because Meta’s optimisation understands them:

EventWhen to fire it
PageViewEvery page (fired by the base code)
ViewContentProduct or key service page viewed
SearchSite search used
AddToCartItem added to cart
InitiateCheckoutCheckout started
AddPaymentInfoPayment details step reached
PurchaseOrder completed (include value and currency)
LeadForm submitted or enquiry made
CompleteRegistrationAccount or webinar sign-up
ContactCall, email or WhatsApp click

For ecommerce, Purchase with the correct value and currency is essential. Without it, Meta can’t optimise for revenue or report return on ad spend.

Step 4: Set up the Conversions API

Options, from simplest to most technical:

  • Platform integrations: WooCommerce, Shopify, and similar platforms can send server events automatically once connected.
  • Conversions API Gateway / Signals Gateway: Meta’s hosted options that run server-side for you, set up from Events Manager on a cloud account.
  • Server-side Google Tag Manager: send events from a server container.
  • Direct API integration: your developer sends events from your backend, useful for leads confirmed in a CRM or offline sales.

Step 5: Deduplicate events (don’t skip this)

If the Pixel and the Conversions API both send a Purchase for the same order, Meta needs to know it’s one purchase, not two. Meta’s recommended method:

  • Send the same event name from both (for example, Purchase).
  • Send the same unique event ID: eventID in the Pixel and event_id in the Conversions API, such as the order number.

Meta deduplicates matching events received within 48 hours of the first one. Most official integrations handle this automatically, but always check. Double-counted purchases make your results look better than they are and mislead the algorithm.

Step 6: Improve Event Match Quality

Event Match Quality (EMQ) is a score from 0 to 10 in Events Manager that shows how well your events can be matched to Meta accounts. Higher scores generally mean better optimisation and attribution.

To improve it, send more customer information parameters with server events, where you have consent:

  • Email and phone number (hashed with SHA-256 before sending; most integrations do this for you)
  • First and last name, city, postcode, and country (hashed)
  • external_id (your own customer ID)
  • fbp and fbc browser and click IDs, client IP address and user agent (not hashed)

Step 7: Test everything

  1. Meta Pixel Helper (Chrome extension): shows which Pixel events fire on each page.
  2. Test Events tab in Events Manager: perform actions on your site and watch browser and server events arrive.
  3. Check deduplication: events should show as received from both browser and server but counted once.
  4. Diagnostics tab: fix warnings such as missing parameters or domain issues.
  5. Place a test order or submit a test lead and confirm Purchase or Lead arrives with the right value.

Also verify your domain in Business Settings > Brand Safety > Domains. It confirms you own the site your ads send traffic to.

Tracking must respect your visitors and the law. Depending on where your customers are, rules such as GDPR in Europe and India’s Digital Personal Data Protection Act may require clear notice and, in some cases, consent before tracking. Practical steps:

  • Update your privacy policy to explain Meta tracking.
  • Use a consent banner where required, and only fire tracking for visitors who agree.
  • Don’t send sensitive data (health details, financial information) in event parameters or URLs.

I’m not a lawyer, so check what applies to your business.

Common tracking mistakes

  • Choosing the Traffic objective because conversions “don’t work”, when the real problem is broken tracking.
  • Installing the Pixel twice (plugin plus manual code), doubling every event.
  • Firing Purchase on page load of the cart instead of the thank-you page.
  • Missing value and currency on purchases.
  • Running Pixel and Conversions API without deduplication.
  • Never checking Events Manager diagnostics.

Frequently asked questions

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

Yes. Meta recommends using both together, with deduplication.

Is the Conversions API free?

Yes, Meta doesn’t charge for it. Hosting a gateway or using a third-party tool may cost money.

Will tracking slow down my website?

The Pixel adds a small script. The Conversions API runs server-side and doesn’t add browser load. Keep an eye on Core Web Vitals when adding tracking tags.

Can I use Google Analytics instead?

GA4 measures your whole site and all channels, but it doesn’t feed Meta’s ad optimisation. Use both. See my GA4 tutorial.

Sources

About Safikul Islam

Safikul Islam is an Entrepreneur, Business mentor, AI & Business strategist, and CEO of Leelija Web Solutions Pvt. Ltd. I writes about Entrepreneurship, Business growth, Artificial Intelligence, AI agents, Digital marketing, SEO, Branding, Technology, Apps and Software.

Keep learning

Topics: · · ·

Join the conversation

Have a tip, question or experience to share? We’d love to hear from you.

Leave a comment

Leave a Reply

Your email address will not be published. Required fields are marked *