Meta Pixel, CAPI and GA4

Conversion tracking that survives ad blockers.

Two separate things: the Meta Pixel and Conversions API for Facebook and Instagram ads, and Google Analytics 4 for everything else. Connect them before you spend money on advertising, not after.

Meta Pixel

  1. business.facebook.com → Events Manager.
  2. Connect Data Sources → Web → Meta Pixel, and name it.
  3. Copy the Pixel ID — a long number.
  4. Paste it into Integrations → Meta Pixel & CAPI.

That alone gets you browser-side tracking. It is also the half that ad blockers remove.

Conversions API

This is the half that actually survives. A large share of your visitors block the pixel, use Safari's tracking protection, or are on iOS with tracking off. The Conversions API sends the same events from your server, where none of that applies. Without it, Meta under-reports your sales and optimises your ads against incomplete data.

  1. Events Manager → your dataset → Settings → Conversions API.
  2. Generate access token. Copy it — it is shown once.
  3. Note the Dataset ID on the same page.
FieldWhat to enter
Pixel IDFrom Events Manager.
Dataset IDFor the Conversions API. Often the same as the Pixel ID.
CAPI access tokenThe token you just generated.
Test event codeOptional. Only while testing — see below.

Testing the Conversions API

  1. Events Manager → your dataset → Test Events.
  2. Copy the test event code shown there into the integration.
  3. Browse your store and place a test order.
  4. Events should appear in Test Events within seconds.
  5. Clear the test event code afterwards. Events sent with it are not counted as real conversions.

Leaving the test code in place is the classic mistake. Everything looks like it is working, and none of it counts. Clear it once you are satisfied.

Why events are not double-counted

With both halves running, the same purchase is reported twice — once from the browser, once from the server. Each event carries a shared id so Meta collapses the pair into one. You do not need to do anything, but it is worth knowing when a number looks doubled: check the event id before assuming a bug.

Google Analytics 4

  1. analytics.google.com → create a GA4 property if you have none.
  2. Admin → Data Streams → Web, and add your store's URL.
  3. Copy the Measurement ID — it starts G-.
  4. Paste it into Integrations → Google Analytics 4.

Page views and ecommerce events are sent automatically. No tag manager needed.

Checking both work

WhereWhat to look for
Meta Events Manager → Test EventsEvents arriving as you browse
GA4 → Reports → RealtimeYourself, within a minute
Your own ReportsSales by channel — this is the honest one

Your own reports are the tiebreaker. When Meta claims more sales than you made, believe your order table. Ad platforms are optimistic about their own contribution by design.

A word on privacy

Both are opt-in: leave the fields blank and no third-party script loads at all. If you operate where consent is required, that is your obligation to handle — and leaving them blank is a legitimate choice.

Still stuck? Message us on WhatsApp — we would rather answer than have you guess.