Meta tracking
Meta CAPI: what it is and how to set it up
Meta CAPI, the Conversions API, sends events like purchases and leads from your server to Meta, next to the Pixel. This guide covers what you need, the ways to set it up and how to test it.

Meta CAPI is Meta's Conversions API: a way to send events like purchases and leads to Meta from your server, while the Meta Pixel sends them from the visitor's browser. Meta recommends using the two together.
You'll also see it called Facebook CAPI or the Facebook Conversions API. It's the same API under its older name.
The short version
- The Meta Pixel sends events from the browser. Meta CAPI sends them from a server.
- To set it up, you need your Pixel ID, a Conversions API access token and, for actions the Pixel and CAPI both send, a shared event ID.
- You can set it up with your AI agent and Tyton, Meta's Conversions API Gateway, a partner integration or your own server code.
- Check the result in Test Events before you rely on the numbers.
What is Meta CAPI?
Meta describes the Conversions API as a connection between an advertiser's marketing data and Meta. That data can come "from an advertiser's server, website platform, mobile app, or CRM." (Meta's overview)
For a website, it works like this. Someone completes an action on your site, like a paid order. Your server sends Meta a request with the event name, the time, an event ID and customer details that help Meta match the event to a person. Meta's docs show this as a POST request to your Pixel's /events endpoint, with your access token. (Meta, Using the API)
The Meta Pixel does the same job from the other side. It's JavaScript that runs in the visitor's browser and reports what happens on the page. For a side-by-side comparison, see Conversions API vs Meta Pixel.
Why does Meta CAPI matter?
A Pixel event only reaches Meta if the visitor's browser sends it. A few things can stop that:
- Network and page errors. Meta says the Conversions API lets you share website events the Pixel "may lose due to network connectivity issues or page loading errors." (Meta's best practices)
- Browser restrictions. Meta's help center tells advertisers to send all relevant events through the Conversions API, including those "potentially lost due to browser restrictions or technical issues." (Meta Business Help Center)
- Ad blockers. Shopify's help center says "A browser-based ad blocker can prevent the Meta pixel from sharing data," and that data sent from server to server can't be blocked by browser-based ad blockers. (Shopify)
A server event can also come from the place where your business confirms the action. Say a customer pays and closes the tab before the thank-you page loads. The Pixel on that page never runs. Your backend still gets the payment confirmation, so it can send the Purchase.
Two limits are worth knowing. CAPI sends what your setup gives it, so a Purchase that fires before the payment succeeds is still wrong when a server sends it. And server events still have to follow the consent choices that apply on your site.
What you need to set up Meta CAPI
- Your Pixel ID. Meta says "You must obtain a Pixel ID to use the Conversions API," and to use the same Pixel ID for browser and server events. Events Manager may label it Dataset ID. You'll find it in your dataset's Settings, in the Meta business that owns it. (Meta, Get started)
- A Conversions API access token. In Events Manager, open the dataset's Settings, find the Conversions API section and choose Generate access token. Meta notes the link is only visible to users with developer privileges for the business. Keep the token private: out of browser code, repositories and screenshots. Our token guide walks through it.
- A shared event ID for deduplication. If the Pixel and CAPI both report the same action, Meta needs to know it's one action. Give both copies the same event name and the same event ID (
eventIDin the Pixel,event_idin CAPI). See how deduplication works. - A place to send from. That's your own server code, a gateway or a partner integration. The next section covers each.
How to set up Meta CAPI
Meta lists several setup options and compares them by cost, setup difficulty and features (Meta, compare setup options). Here are the main routes for a website.
Route | Where server events come from | Who runs it | Cost |
|---|---|---|---|
Your AI agent with Tyton | Your own code, where each action succeeds | Your agent adds the code. Tyton hosts delivery. | Free plan for 1 site and 10,000 events a month |
Conversions API Gateway | Copies of your Pixel's browser events | You, in AWS or Google Cloud, or a hosting partner | Cloud or partner fees, per Meta |
Partner or platform integration | Depends on the integration | The platform or partner | Depends on the partner, per Meta |
Direct integration | Your own server code | Your developers | Your development and maintenance costs, per Meta |
Meta also lists a Meta-enabled Conversions API option that you turn on in Events Manager, which uses your Pixel's browser events. Meta's comparison page covers it.
1. Let your AI agent set it up with Tyton
Tyton connects to the AI agent you already use, such as Claude, ChatGPT, Codex or Cursor, over MCP. Your agent sets up the Meta Pixel and the Conversions API in your own code. Tyton runs the hosted server that sends your server events to Meta.
- Create a Tyton account on the Free plan, add your website and connect your agent. See the quickstart.
- Save your Pixel ID and your Conversions API token in Tyton's Meta setup. Tyton stores the token encrypted.
- Ask your agent to inspect your site and backend. It proposes what to track and how it knows each action succeeded. You approve the plan before anything goes live.
- Your agent adds the tracking where each action really succeeds. For a Purchase, that's the server code that confirms the payment. The browser copy gets the same event ID, so Meta can match the two.
- Your agent tests each path in verification mode, which doesn't send anything to Meta. Once the checks pass, you start tracking and check events in Meta's Test Events.
Worth knowing:
- Server events need a backend you can edit. On a site builder with no backend, Tyton adds browser tracking only.
- Tyton shows each event's delivery status on a live event dashboard: accepted, sent to Meta, retrying or rejected.
- The Free plan covers 1 site and 10,000 events a month, with 7 days of event history and no card. A browser event and its server copy count as 2. See pricing.
Not sure what your site sends today? The free audit checks your current Meta tracking without an account.
2. Meta's Conversions API Gateway
The gateway is a server that sits next to your Pixel. The Pixel sends each browser event to Meta and to the gateway, and the gateway forwards a copy through the Conversions API. You host it in your own AWS or Google Cloud account, or a hosting partner runs it for you. Meta says the only cost is "the associated cloud resource or partner fees." (Meta's gateway overview)
Because the gateway copies the Pixel, it sends what the Pixel sent. Our Meta CAPI Gateway guide covers how it works, what it costs and how to set it up.
3. A partner or platform integration
Meta works with partners that can set up the Conversions API for you. Meta says that on commerce platforms such as Shopify, WooCommerce, Wix or BigCommerce, the setup "comes at no additional cost." If you use a partner platform such as Google Tag Manager, Adobe or Tealium, Meta says you may be able to set it up through that partner. (Meta, compare setup options)
Meta also says the configuration options depend on the partner. Check which events the integration sends, where it gets them and whether the browser and server copies deduplicate.
4. A direct integration in your own server code
A developer writes code in your backend that calls the API. Meta's Business SDKs for PHP, Node.js, Java, Python and Ruby can help, and Meta says the SDK hashes customer details for you. For a direct integration, Meta lists a developer and the "infrastructure necessary to send your events to Meta in real time" as requirements. It says the cost depends on your development and maintenance costs. Your team also owns retries, monitoring, token handling and deduplication.
How to test Meta CAPI with Test Events
Meta's Test Events tool shows the events Meta receives from your setup, so you can check it before you rely on it. (Meta, Test Events Tool)
- In Events Manager, open your dataset and go to the Test Events tab.
- Browser check. Enter your website URL in the website test section and open it. Visit a page and look for a fresh PageView from the browser.
- Server check. Copy the test code. Your server sends it as
test_event_codewith each event. In Tyton, you save it as the Meta test event code in Meta setup. Then complete one real action, like a test signup or an authorised test payment, and look for it with Server as the source. - Deduplication check. For an action both send, compare the event name and event ID on the browser and server events. Then check that Meta deduplicated them.
- Clean up. Remove the test code when you're done. Meta says events sent with a test code "are not dropped" and are used for targeting and ads measurement.
Our Test Events guide covers the Tyton side step by step. Our free Chrome extension can also show, per event, whether Meta is receiving it from the website or the server.
Frequently asked questions
Is Meta CAPI free?
It depends on the route. Meta's comparison of setup options gives a cost for each one: a direct integration costs your development and maintenance time, a gateway costs cloud or partner fees, and a partner integration depends on the partner, with some commerce platforms including it at no additional cost. Tyton's Free plan covers 1 site and 10,000 events a month, with no card.
Do I still need the Meta Pixel with CAPI?
For website events, Meta recommends using both. Its deduplication guide says "we recommend that advertisers implement the Conversions API alongside their Meta Pixel" and calls this a redundant setup. A Conversions API Gateway also needs the Pixel, because it copies the Pixel's events.
What is the difference between Meta CAPI and Facebook CAPI?
There's no difference. They're the same API. Facebook's parent company renamed itself Meta in 2021, so the Facebook Pixel became the Meta Pixel and the Facebook Conversions API became the Meta Conversions API. Older guides and tools still use the Facebook names.
How does deduplication work?
When the Pixel and CAPI both send the same action, Meta compares the Pixel's eventID with the server's event_id, and the event name on each copy. If both match for the same Pixel ID within 48 hours, Meta discards the later copies. Give each action its own ID, reuse it on retries and never put an email address in it. See Meta's deduplication guide.
Do I need a developer to set up Meta CAPI?
It depends on the route. Meta lists a developer as a requirement for a direct integration, and says many integrations don't require one. With Tyton, your AI agent writes the code in your codebase and you approve the plan. Server events still need a backend you can edit.