Open Tracked/Integrations/How to set up Facebook conversion API

How to set up Facebook conversion API

Seven steps: find your dataset, create a token, add the Meta tag to the server container, map events, add customer data, test, and publish.

5 min read · Updated October 26, 2026

WWeb containerServer container Meta tagMeta Events Manager
In this guide
Key takeaways
  • You need a dataset ID and an access token from Meta Events Manager, and the Facebook Conversions API tag in your server container.
  • Map your events (purchase, add to cart, lead) to Meta's standard events and pass the customer data you have.
  • Test with Test Events before you go live, and share an event ID with the pixel.

This is the practical set-up of the Meta Conversions API (CAPI) through a Google Tag Manager server container. It assumes the container is running and your website already sends events to it (see what server-side tracking is and the setup checklist). For the concepts behind it, read Conversions APIs explained. Meta changes its screens from time to time, so the labels below may differ slightly.

Step 1: find your dataset ID

In Meta Events Manager, open Data sources and select your dataset (your pixel). The dataset ID is the number shown under its name. If you have no dataset yet, create one first.

Set up in minutes

Connected in minutes

Add your domain, install the pixel, connect your ad platforms and watch the first events land.

Step 2: create an access token

  1. In the dataset, open Settings.
  2. Find the Conversions API section and choose to generate an access token.
  3. Copy the token and store it safely. Treat it like a password.

Create the token from a business account or a system user, not from the account of a person who may leave. See common Conversions API mistakes.

Step 3: add the tag to the server container

1

Open the server container

In Tag Manager, switch to the server container.

2

Add the Facebook Conversions API tag

Install the Meta template from the gallery if it is not there yet.

3

Fill the fields

Dataset (pixel) ID and API access token. For your first tests add the test event code from Events Manager.

4

Choose how events are named

Use the setting that takes the event name from the incoming event, or map names yourself (next step).

5

Add a trigger

Fire it on the events you want to send.

If you use Open Tracked, the container files from the Setup Wizard help you start with the structure in place, and you add your own Meta IDs.

Try it

Works with your stack

Grab a logo and throw it. These are the tools Open Tracked already talks to.

Grab one. Throw it.

Step 4: map your events

Your event (GA4 name)Meta standard event
page_viewPageView
view_itemViewContent
add_to_cartAddToCart
begin_checkoutInitiateCheckout
add_payment_infoAddPaymentInfo
purchasePurchase
generate_leadLead
sign_upCompleteRegistration

Step 5: add customer data

This is what raises match quality. Send hashed e-mail and phone from the form, the visitor's IP address and user agent, and the fbp and fbc cookies. Add stored data for returning visitors with the Data Store and Enricher, and country and city with Visitor Location (all on every plan). Full list in Meta event match quality.

Step 6: test

  1. Open Events Manager, Test Events, and copy your test code into the tag.
  2. Open the server container Preview and your site, and perform a purchase.
  3. In Test Events you should see the browser and server event, with a shared event ID.
  4. Check that the server event shows the customer data fields.

Step 7: go live

1

Remove the test event code

Otherwise events never reach your reports.

2

Publish the server container

And the web container if you changed it.

3

Watch for a week

Compare Meta purchases with store orders.

4

Check deduplication

Events Manager should mark browser and server events as deduplicated. See event deduplication.

If something does not work

SymptomEvents do not appear in Test Events
Likely causeThe test code is wrong or the tag did not fire.
FixCheck the tag status in Preview and the code.
SymptomError 190
Likely causeThe access token is invalid or expired.
FixCreate a new token and update the tag.
SymptomMatch quality is low
Likely causeLittle customer data is sent.
FixAdd hashed e-mail, phone, IP, user agent, fbp, fbc.
SymptomTwo purchases per order
Likely causeNo shared event ID.
0 of 7 done

Things to decide before you start

Decide first which events you will send and from where. Many stores send everything from the server and keep the browser pixel as well. Others send purchases and leads from the server and let the pixel handle page views. Either works as long as every event that is sent twice carries the same event ID. Write the list down, because it will be your test plan in step 6.

Decide who owns the token. A token created by a person who later leaves the company or loses access to the business account will stop working, and tracking will fail silently. Use a system user in Business Settings, store the token in a password manager and put a reminder in the calendar for when it should be reviewed.

Terms you will see

Dataset
Meta's name for the place where your events arrive; the pixel is part of it.
Access token
The secret that lets your server send events to the dataset.
Test event code
A code that routes events to the Test Events tab instead of your reports.
Standard event
One of Meta's named events, such as Purchase or Lead.
Event match quality
Meta's score for how well events can be matched to people.
Works worldwide

Runs on your domain, anywhere

Your tracking runs on your own domain, so a visit from any country is handled the same way.

Frequently asked questions

Where do I find the Conversions API token?

In Meta Events Manager, in your dataset's Settings, under Conversions API.

Do I need a server container for CAPI?

Not strictly. You can use a platform integration or your own code. A server container lets you send to several platforms from one place.

Which events should I send?

At least Purchase and Lead. Add ViewContent, AddToCart and InitiateCheckout for better optimisation.

How long until I see results?

Events appear in minutes. Match quality and optimisation effects take days to weeks.

Can I send events without the pixel?

Yes, but you lose browser signals. Most advertisers keep both.

Do I need spreadsheets to read my results?

No. Once tracking is live, the Open Tracked analytics shows spend, revenue, ROAS and profit, and you can ask Ari, the built-in AI assistant, questions about your own numbers in plain words. Ari's allowance depends on your analytics plan.

Is Open Tracked different from Open Track or Open Space Track?

No. Open Tracked is the official name of our server-side tracking platform, and the website is opentracked.io. Many people search for it as Open Track, OpenTrack or Open Space Track. All of them lead to the same product: server-side Google Tag Manager hosting, first-party analytics and a CRM pipeline.

Fix your tracking at the source

Open Tracked hosts your server-side Tag Manager, keeps first-party cookies alive and shows what each ad is really worth.

Open Tracked
Written by

The Open Tracked team

We build Open Tracked: server-side tracking hosting, analytics and the tools around them, for stores that spend on ads. Questions about this guide, or an idea for the next one?

Write to us Read the docs

Was this article helpful?

Comments

Loading comments...

Turn better tracking into better marketing performance

Start free