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
- business.facebook.com → Events Manager.
- Connect Data Sources → Web → Meta Pixel, and name it.
- Copy the Pixel ID — a long number.
- 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.
- Events Manager → your dataset → Settings → Conversions API.
- Generate access token. Copy it — it is shown once.
- Note the Dataset ID on the same page.
| Field | What to enter |
|---|---|
| Pixel ID | From Events Manager. |
| Dataset ID | For the Conversions API. Often the same as the Pixel ID. |
| CAPI access token | The token you just generated. |
| Test event code | Optional. Only while testing — see below. |
Testing the Conversions API
- Events Manager → your dataset → Test Events.
- Copy the test event code shown there into the integration.
- Browse your store and place a test order.
- Events should appear in Test Events within seconds.
- 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
- analytics.google.com → create a GA4 property if you have none.
- Admin → Data Streams → Web, and add your store's URL.
- Copy the Measurement ID — it starts
G-. - Paste it into Integrations → Google Analytics 4.
Page views and ecommerce events are sent automatically. No tag manager needed.
Checking both work
| Where | What to look for |
|---|---|
| Meta Events Manager → Test Events | Events arriving as you browse |
| GA4 → Reports → Realtime | Yourself, within a minute |
| Your own Reports | Sales 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.