Meta's ad system learns from the conversions you report. If a purchase or lead never reaches Meta, the system cannot learn from it, and your reports show fewer results than you really got. The browser-based Meta Pixel is the usual way to send those events, but browsers block scripts, people decline cookies, pages fail to load and tags break. The Conversions API gives you a second path that starts on your server or in your platform.
This guide is built around the searches people make, including "meta conversions api", "facebook conversions api", "conversions api vs meta pixel", "meta conversions api server-side tracking", "meta conversions api deduplication", "conversions api gateway", "facebook conversions api shopify", "facebook conversions api wordpress", "facebook conversions api google tag manager" and "facebook offline conversions api". It relies on Meta's own documentation, and the sources are listed at the end. For the basics of the browser tag first, see our guide to the Meta Pixel.
What is the Meta Conversions API
Meta describes the Conversions API as a connection between your marketing data, such as website events, app events, business messaging events and offline conversions, and Meta systems that optimize ad targeting, decrease cost per result and measure outcomes. The data can come from your server, website platform, mobile app or CRM. It was previously called the Facebook Conversions API, which is why both names are searched.
Events sent this way are linked to your Pixel or dataset and behave like events sent through the Pixel. They are used for the same types of ad optimization, appear in most of the same surfaces including Ads Manager and Events Manager, and follow the same data-sharing restrictions.
Meta Pixel vs Conversions API
| Meta Pixel | Conversions API | |
|---|---|---|
| Where it runs | In the visitor's browser | On your server, platform, app or CRM |
| Depends on | The page loading, scripts running and cookies being available | Your system recording the event and sending it |
| Strong at | Page-level behaviour such as page views and clicks, and quick setup | Events that happen after the click, such as confirmed purchases, qualified leads and offline sales |
| Weak at | Ad blockers, browser restrictions, consent declines, slow pages | Browser context unless you pass it along, such as click ID and browser ID |
| Setup | Tag or plugin | Integration, gateway or code |
| Best use | Together with the Conversions API | Together with the Pixel |
Meta's guidance is that using both creates a more reliable connection that helps ad delivery decrease your cost per result. Neither replaces the other in most cases.
Why server-side tracking matters
Browser tracking can fail for reasons that have nothing to do with your ads. The common ones:
- Browsers and extensions block or limit scripts and cookies.
- Visitors decline cookies or tracking, which is their right.
- The thank-you page fails to load, or the visitor closes the tab before the tag fires.
- Single-page apps and checkout widgets fire events inconsistently.
- The event that matters happens later and elsewhere, such as an approved loan, a booked appointment or a store sale.
The Conversions API helps with the failures that are technical and with events that happen outside the browser. It does not, and is not designed to, override a person's choice. Meta states it is not a means to bypass policies such as Apple's App Tracking Transparency framework or privacy rules in Europe such as the ePrivacy Directive. More on that below.
How big is the gap on your account
You can measure your own gap instead of guessing. Compare conversions Meta reports with a source of truth, such as orders in your store or qualified leads in your CRM, for the same period and country.
Tracking gap calculator
A gap does not always mean tracking is broken. Meta's attribution counts conversions from ad interactions within its windows, while your orders include organic, email and direct sales. Compare like with like, such as orders where the buyer's journey includes a Meta click, and look at trends after changes.
Ways to set up the Conversions API
Meta describes three ways to set up the Conversions API: a partner integration, the Conversions API Gateway and a manual or direct integration. Meta's Events Manager also offers a codeless one-click option for website events when you have a Pixel, and its guided setup recommends an option based on your business, such as whether you already work with a partner.
| Method | Best for | Effort | Considerations |
|---|---|---|---|
| Codeless setup in Events Manager | Small sites that already have a Pixel and want the simplest path | Low | Fewer customisation options than the other methods |
| Partner integration | Stores and platforms such as ecommerce builders, CRMs and tag managers | Low to medium | Depends on the partner's implementation, so check which events and parameters it sends and how it deduplicates |
| Conversions API Gateway | Teams that want a managed setup without writing code, and can provision cloud hosting and DNS | Medium | Meta's setup guide lists prerequisites including a business account, cloud infrastructure and a DNS provider, and data may take 5 minutes to 2 hours to appear after launch |
| Direct integration | Custom sites, apps, CRMs and offline data, and advanced needs | High | Full control, but you build, test and maintain it |
Which method should you choose
- If you run a mainstream ecommerce or lead platform with a Meta integration, start with that and verify it, rather than building from scratch.
- If you use server-side Google Tag Manager or another tag management tool that already receives your events, a connector there can send the same data to Meta.
- If you have no engineering help and need server-side events quickly, the Gateway or the codeless option may fit.
- If you need to send CRM stages, offline sales or events from several systems, plan a direct integration.
Our team sets up and audits all four routes. See Meta Pixel and Conversions API setup.
Prerequisites and access token
- A Meta business account and a Pixel or dataset. Events are linked to it.
- An access token. Meta recommends generating one in Events Manager, under Settings, in the Conversions API section. The token link is visible only to people with the right permissions. You can also use your own app and system user. Meta states you do not need to go through App Review or request permissions for this.
- Your Pixel ID for the endpoint.
- A way to read your events on the server, such as order and lead data.
- Consent signals so only permitted events are sent.
Treat the access token like a password. Store it securely on the server and never put it in front-end code or a public repository.
What a Conversions API request looks like
For a direct integration, you send a POST request to the events endpoint of your Pixel. Meta's documentation gives the format as the Graph API host, an API version, your Pixel ID and /events, with your access token. Each event needs an event name, an event time, an action source and customer information in user_data. Event times can be up to seven days in the past, and if any event in a request is older than that, the whole request returns an error and nothing is processed.
POST https://graph.facebook.com/{API_VERSION}/{PIXEL_ID}/events?access_token={TOKEN}
{
"data": [{
"event_name": "Purchase",
"event_time": 1767225600,
"event_id": "order-10482",
"action_source": "website",
"event_source_url": "https://www.example.com/checkout/thanks",
"user_data": {
"em": ["<sha256 of normalised email>"],
"ph": ["<sha256 of normalised phone>"],
"client_ip_address": "203.0.113.10",
"client_user_agent": "Mozilla/5.0 ...",
"fbc": "fb.1.1767225000000.AbCdEf",
"fbp": "fb.1.1767220000000.123456789"
},
"custom_data": { "currency": "USD", "value": 129.90 }
}],
"test_event_code": "TEST12345"
}
The values are placeholders. Use a current API version from Meta's documentation, send real timestamps in seconds and remove test_event_code before going live. For offline and physical store events the action source is different, for example physical_store. Meta's documentation lists the allowed values.
Deduplication, the step most setups get wrong
If the Pixel and the Conversions API both send the same purchase, and Meta cannot tell they are the same, you get double counting. Meta documents how to avoid this.
- Send an event ID with both events. The Pixel uses eventID and the server uses event_id, and they must match for the same action. Meta also needs the same event name (event on the Pixel, event_name on the server).
- Use something stable and unique as the ID, such as an order number or a UUID created at purchase and passed to both channels.
- Understand the window. Meta states a 48 hour window for these matches, and that it generally prefers the event that is received first.
- Alternative keys. Meta also describes deduplication using the event name together with fbp and external_id, but event_id is the straightforward approach.
| Mistake | Result | Fix |
|---|---|---|
| No event ID on either side | Duplicate counts, inflated results | Add the same ID to both calls |
| Event names differ in spelling or case | Events treated as different | Use the standard names exactly, such as Purchase and Lead |
| New random ID generated by the server | IDs never match | Generate once, pass to both |
| Server event sent days later | Falls outside the matching window | Send promptly, or use a separate event for late data |
| Same ID reused for different events | Real events dropped | Make IDs unique per action |
Customer information and event match quality
Meta matches server events to people using customer information. Meta's help centre says event match quality is a score from 0 to 10 that reflects the quality of customer information you send for a server event and the percentage of events matched to Meta accounts. It lists email and click ID as high priority, and Facebook Login ID, birthdate, country, phone number, external ID and browser ID as medium. Lead ID, last name and city are low.
| Parameter | Key | Hash it? | Priority |
|---|---|---|---|
| em | Yes (SHA-256) | High | |
| Click ID | fbc | No | High |
| Browser ID | fbp | No | Medium |
| Phone | ph | Yes | Medium |
| External ID | external_id | Hashing recommended | Medium |
| Country | country | Yes | Medium |
| First and last name, city, state, zip | fn, ln, ct, st, zp | Yes | Low to medium |
| IP address and user agent | client_ip_address, client_user_agent | No | Used for matching context |
Send what you legitimately have and are permitted to use. A score of 10 is not a goal in itself, and adding data you do not have or are not allowed to send is not worth it. Capture the click ID and browser ID at the moment of the visit, store them with the lead or order, and pass them along when the later event is sent.
Hashing and formatting customer data
Meta's documentation says personal fields must be hashed with SHA-256 after normalization. The normalization rules matter, because a hash of an unnormalised value will not match.
| Field | Normalization before hashing |
|---|---|
| Email (em) | Trim leading and trailing spaces, convert to lowercase |
| Phone (ph) | Remove symbols, letters and leading zeros, and include the country code |
| First and last name (fn, ln) | Lowercase, no punctuation; UTF-8 for special characters |
| City (ct) | Lowercase, no punctuation, special characters or spaces |
| State (st) | Two-character code in lowercase for the US |
| Zip (zp) | Lowercase, no spaces or dash, first five digits for US zip codes |
| Country | Lowercase two-letter ISO 3166-1 alpha-2 code |
| Not hashed | client_ip_address, client_user_agent, fbc, fbp, lead_id and several other identifiers |
The tool below applies the email and phone rules and returns the SHA-256 result, so you can check your own pipeline against it. It runs in your browser and sends nothing anywhere. Use test values rather than real customer data.
Customer data hashing checker
Standard events to send
| Business | Events to send server-side | Value to include |
|---|---|---|
| Ecommerce | ViewContent, AddToCart, InitiateCheckout, Purchase | Value, currency, content IDs, quantity |
| Lead generation | Lead, plus later stages such as qualified or booked (as custom events) | Estimated or actual lead value |
| Appointments and services | Schedule, Lead, completed job | Job value after it closes |
| SaaS | CompleteRegistration, StartTrial, Subscribe | Plan value |
| Offline and stores | Purchase with action source physical store, matched from CRM or point of sale | Sale value |
For lead businesses, the most useful change is sending the later stages. If Meta only sees form submissions, it learns to find people who fill in forms, not people who buy. Sending a qualified or won stage tells it which leads were real. Read our guides to Facebook lead ads and Facebook ads cost for how this affects results.
Conversions API Gateway
The Conversions API Gateway is Meta's hosted route for sending events without writing integration code. According to Meta's setup guide, you start from the Settings tab of Events Manager, choose to set up with the Gateway, and you need a Meta business account, cloud infrastructure and a DNS provider. After launch, you create an admin account for the Gateway's admin interface, and server and browser data can take between 5 minutes and 2 hours to appear. Meta's guide also describes optional settings such as enhancing events and health monitoring.
Consider the Gateway when you have no developer to build a direct integration and your stack has no suitable partner connector. Consider other routes if you need to send CRM stages or offline sales, which usually need custom or partner-based flows.
Setup with Shopify, WordPress and Google Tag Manager
- Shopify and other ecommerce platforms. Most major platforms offer a Meta integration or app that can send server events. Check which events and parameters it sends, whether it deduplicates against the Pixel, and whether it respects customer consent settings.
- WordPress and WooCommerce. Plugins from Meta and third parties can send server events. Compare their documented event coverage, and test with real orders.
- Google Tag Manager. A server-side container can receive events from your site and forward them to Meta. It gives control over what is sent but needs hosting and careful consent handling.
- CRMs and form tools. Many can send lead stages to Meta through native connectors or webhooks.
Platform options change often, so always read the current instructions for your version.
Offline conversions and CRM events
Meta lists offline conversions among the event types the Conversions API supports, and says that for offline events you can measure in-store outcomes driven by ads, build custom and lookalike audiences from offline events, and run lift studies. For a service business, that can mean sending a won deal or completed job from your CRM, matched by hashed email or phone, with the time and value. Send these promptly, because events older than seven days make a request fail.
How to test the setup
- Open Test Events in Events Manager and copy the test event code.
- Add test_event_code to a server request or configure it in your integration, then trigger a real action on your site.
- Check that both browser and server events appear with the same event name and event ID, and that Events Manager marks them as deduplicated.
- Review event match quality and the customer parameters received for each event.
- Remove the test code and let live events flow.
- Compare counts with your store or CRM for a week and rerun the gap calculator above.
- Monitor Diagnostics for errors such as missing parameters and low-quality events.
Consent, privacy and compliance
The Conversions API changes how data is sent, not whether you may send it. Meta states that, like the Pixel, it is not designed to bypass data-sharing policies such as the iOS App Tracking Transparency framework or privacy rules in Europe such as the ePrivacy Directive. In practice:
- Honour consent choices in both the browser and server paths. If a visitor has not consented, do not send their data.
- Do not send sensitive or restricted data, and review Meta's business tools terms and restricted data policies for your sector.
- Update your privacy policy to describe server-side sharing.
- Limit what you collect to what Meta needs, and hash customer information as required.
- Keep access tokens secure and rotate them if exposed.
Ask legal counsel about your specific obligations. This guide is practical information, not legal advice.
Troubleshooting
| Symptom | Likely cause | What to check |
|---|---|---|
| Server events do not appear | Wrong Pixel ID, invalid token or request errors | The response body, token permissions and Test Events |
| Purchases counted twice | No deduplication | Event IDs and names on both sides |
| Low event match quality | Few or badly formatted parameters | Email, phone and click ID capture, normalization before hashing |
| Request rejected for old events | An event older than seven days in the batch | Queue handling and retry logic |
| Values or currency are wrong | Mismatched custom data between channels | Same value and currency sent from both |
| Gateway shows no data | Still populating, or misconfigured DNS | Wait up to the stated period, then re-check setup and contact Meta |
Common mistakes
- Setting up the API and removing the Pixel, losing browser context.
- Skipping deduplication.
- Hashing without normalising, so matches fail.
- Ignoring consent.
- Sending only top-of-funnel events from a lead business.
- Treating a high match quality score as the goal and sending data you should not.
- Leaving test event codes in production.
- Not comparing against real orders or CRM data after launch.
A 30-day rollout plan
| Days | Focus |
|---|---|
| 1 to 5 | Audit current Pixel events, consent setup and Events Manager diagnostics, and decide the method |
| 5 to 12 | Build or enable the integration, generate the token, define event IDs and customer parameters |
| 12 to 18 | Test with Test Events, fix deduplication and formatting |
| 18 to 25 | Go live, monitor match quality and counts against orders or CRM |
| 25 to 30 | Add later-funnel or offline events, document the setup and set a monthly check |
Checklist
- Pixel and Conversions API both live for website events
- Same event name and event ID sent from both channels
- Email, phone, click ID and browser ID captured and passed where permitted
- Customer data normalised and hashed with SHA-256 where required
- Access token stored securely on the server
- Consent respected in browser and server paths
- Tested in Test Events, test code removed afterwards
- Event match quality and diagnostics reviewed
- Later-funnel or offline events added for lead businesses
- Counts compared with orders or CRM monthly
Want it set up and checked by people who do this daily? See our Meta ads guide and our Pixel and Conversions API service.
Sources
- Meta for Developers: Conversions API. developers.facebook.com
- Meta for Developers: Handling duplicate Pixel and Conversions API events. developers.facebook.com
- Meta for Developers: Using the API. developers.facebook.com
- Meta for Developers: Customer information parameters. developers.facebook.com
- Meta Business Help Centre: About Conversions API. www.facebook.com
- Meta Business Help Centre: About event match quality. www.facebook.com
- Meta for Developers: Get started with the Conversions API. developers.facebook.com
- Meta for Developers: Conversions API Gateway setup guide. developers.facebook.com