Meta Pixel and Conversions API: Setup Guide for 2026

Hands typing code on a laptop, with a second computer open beside it
Photo: olia danilevich / Pexels
In this article

Quick answer: the Meta pixel is a piece of code on your website that records what visitors do, such as viewing a product, adding to cart or buying, and sends those events to Meta. The Conversions API sends the same events from your server. Meta recommends running both together and deduplicating them with a shared event_id, so each sale counts once.

If you run Facebook or Instagram ads and sell on your own site, this is the piece that connects the two. Without it, Meta knows who saw your ad and who clicked. It does not know who bought. And a campaign that cannot see purchases optimizes for whatever it can see, which is rarely what you care about.

This guide walks through what Meta publishes in its Business Help Center and on Meta for Developers as of November 2026. You will learn what each tool does and how to install it. It also covers events, deduplication, event match quality, domain verification, US privacy settings and testing.

What the Meta pixel does

According to Meta’s page About Meta Pixel, the pixel is code you put on your website to measure how well your advertising works. Each time someone takes an action you care about, the pixel logs an event. Examples include a purchase or an item added to the cart.

Those events power three things. First, they help show ads to the right people, including people who visited a page or took an action. Second, they enable automatic bidding that looks for people likely to buy. Third, they let you measure what happened after someone saw your ad.

Events live in a dataset inside Events Manager. From there, you can build custom audiences in Ads Manager or use the events for retargeting.

Meta also draws two firm lines. You must not share prohibited information, which includes health, financial or children’s data and anything its terms or the law forbid. And you must not place your pixel on websites you do not own without permission.

What the Conversions API adds

The Conversions API creates a direct connection between your marketing data and Meta. Instead of relying on the visitor’s browser, events come from your server, your ecommerce platform or your CRM.

That matters because browsers fail often. According to Meta’s page About Conversions API, its data is less affected than the pixel by loading errors, connectivity issues and ad blockers. It can also send events that happen off your site, like in-store sales, phone calls or purchases closed in a chat.

Here is a point that trips people up. The Conversions API does not replace the pixel. Meta recommends sending the same web events through both, because together they create a more reliable connection. Meta also states plainly that the API is not a way around privacy rules such as Apple’s App Tracking Transparency.

FeatureMeta pixelConversions API
Sends data fromThe visitor’s browserYour server, platform or CRM
Main weak spotsAd blockers, loading errors, connectivityFar less sensitive to those issues
Events coveredActions on your websiteWebsite, app, store, phone and messaging
SetupCode, Google Tag Manager or a partnerPartner integration, Gateway or custom build
Meta’s adviceUse it with the APIUse it with the pixel, plus deduplication

How to install the Meta pixel

Everything starts in Events Manager. Meta’s guide How to set up a Meta Pixel and events on your website lays out the path. You click Connect data, choose Web and name your pixel. Meta then creates an ID and, if you enter your site URL, checks for a partner integration.

Next, you pick guided setup or do it yourself. You also choose between the pixel alone or the pixel plus the Conversions API, which is what Meta recommends. From there, several routes are available, so choose the one that fits your site.

Manual code

You copy the base code and paste it at the bottom of the header, just above the closing head tag, on every page. One ID covers the whole site. For events, you can use the point-and-click event setup tool, which needs no coding, or add them in code.

Google Tag Manager

If you already manage tags in Google Tag Manager, this is the tidiest route. Meta explains it in Add the Meta Pixel with Google Tag Manager. You create a Custom HTML tag with the base code, set it to fire once per page and attach the All Pages trigger.

Then you build one tag per event, such as AddToCart or Purchase, each with its own trigger. Before publishing, test everything in Tag Manager’s preview mode. If you are new to the tool, our Google Tag Manager guide covers containers, tags and triggers from scratch.

Shopify and other platforms

Ecommerce platforms have their own integrations, and they are usually the simplest path. On Shopify, you set up the pixel in the Facebook & Instagram sales channel, under the data sharing settings. Shopify’s help page lists three levels: Standard, Enhanced and Maximum. Standard sends only customer behavior, while the other two add details like name, location and email.

Meta notes that many partner platforms, Shopify and WooCommerce among them, handle deduplication parameters automatically. So if your store runs on one of them, start with the native integration before trying anything custom.

Conversions API Gateway

For sites without a platform integration, Meta offers the Conversions API Gateway. It is a codeless option you set up from Events Manager on Amazon Web Services or Google Cloud. According to Meta’s page About Conversions API Gateway, setup drops from weeks to under 30 minutes, and deduplication between browser and server events is automatic.

The only cost is cloud hosting, which Meta says starts at $30 per month and varies by region and traffic. Meta describes it as a fit if you already use the pixel and spend more than $300 per month on campaigns optimized for web events. It is less of a fit if you already work with a platform like Shopify.

Meta-enabled Conversions API

Since April 2026, there is a shorter path. In its April 15, 2026 announcement, Meta introduced the Meta-enabled Conversions API, a one-click setup for web events. Meta says it requires no technical expertise, no costs and no ongoing maintenance.

“Existing Meta Pixel users will receive a notification with a 30-day window to review the feature before it’s enabled. Advertisers can adjust or turn it off at any time through Events Manager.”

Source: Meta, “Removing Technical Barriers to Help Businesses of All Sizes Get More From Their Ads.”

The same announcement added a pixel feature that uses AI to automatically include page and product details, such as product names, availability and business information. Existing pixel users get a notice with a 30-day window to review it before it turns on. If you already have a direct or partner Conversions API connection, Meta says you can keep using it.

If you work in Google Tag Manager, this official walkthrough from Meta shows how to set up the Conversions API from there.

Video: Meta for Business on YouTube (2024), on how to set up the Meta Conversions API with Google Tag Manager.

Standard events, custom events and custom conversions

An event is an action you want to measure. Meta splits events into two types, and the difference shapes what you can do in your campaigns.

Standard events have predefined names that Meta recognizes across its ad products. According to the Meta Pixel reference on Meta for Developers, there are 17 of them: AddPaymentInfo, AddToCart, AddToWishlist, CompleteRegistration, Contact, CustomizeProduct, Donate, FindLocation, InitiateCheckout, Lead, Purchase, Schedule, Search, StartTrial, SubmitApplication, Subscribe and ViewContent.

Custom events, on the other hand, cover actions outside that list. You name them yourself and set them up in pixel or API code. Meta asks you to review new custom events in Events Manager to confirm they come from your business and follow its terms.

There is a third option called custom conversions. You build them in Events Manager with URL rules, such as a thank-you page after checkout, without touching code. Meta allows up to 100 per ad account, although you can delete old ones to make room.

One practical tip: always send the value and currency parameters with purchases. Without a value, Meta cannot optimize for conversion value, and your ROAS stays blank.

Close-up of JavaScript code on a laptop screen
Photo: Markus Winkler / Pexels

Deduplication with event_id

If you send the same purchase through the pixel and the Conversions API, Meta receives two events. To count only one, it has to recognize them as the same action. That process is deduplication.

According to Meta’s page on deduplication for Meta Pixel and Conversions API events, two conditions must be met. The event_name must match, and the event_id must be identical in both events. Alternatively, Meta can deduplicate when the event name matches along with the external_id or fbp parameter.

The developer docs add two useful details. Meta compares events received within 48 hours of each other and keeps the first one. If both arrive within about 5 minutes, it favors the browser event.

KeyRole in deduplication
event_nameRequired: must match the browser event
event_idMust be identical to the eventID the pixel sends
external_id or fbpAlternative match when paired with the event name
Time windowMeta compares events received within 48 hours and keeps the first
Near-simultaneous arrivalWithin about 5 minutes, Meta favors the browser event
Source: Meta, deduplication for Meta Pixel and Conversions API events and Meta for Developers, server event parameters. Reviewed November 2026.

What should you use as the event_id? Meta suggests an order or transaction number. That way, two separate purchases (orders 123 and 456) still count as two, even when each arrives through both channels.

Skipping deduplication inflates conversions, and with them your conversion rate and ROAS. It is the most common mistake when someone adds the API to a pixel that already worked.

Event match quality for Meta pixel and API events

Event match quality shows how well the customer information sent with each server event helps match it to a Meta account. Meta’s page About event match quality describes it as a score from 0 to 10, calculated from the last 48 hours of data.

The more events match, the more conversions Meta can attribute to your ads and the better it optimizes. So it pays to send several customer parameters when you have them, hashed as Meta for Developers specifies.

ParameterPriority per Meta
EmailHigh
Click IDHigh
Phone, country, birthdateMedium
External ID and browser IDMedium
First name, last name, city, ZIP codeLow

Event coverage is worth watching on the same screen. Meta recommends that the Conversions API cover at least 75% of the events your pixel sends, because that supports accurate reporting.

Domain verification and event setup today

This is a big change that many guides still miss. For years, Aggregated Event Measurement, Meta’s response to iOS 14, forced you to rank up to 8 events per domain. You also had to verify your domain to configure them.

According to Meta’s current page on Aggregated Event Measurement, that step is gone. You no longer rank 8 events per domain, the Aggregated Event Measurement tab has left Events Manager and you do not pick a conversion domain when creating a campaign.

Verifying your domain is still useful for other reasons. It controls who can edit link previews that point to your content. You do it in your business portfolio settings with one of three methods: a meta tag on your home page, an HTML file in your root directory or a DNS TXT record.

The pixel includes a way to hold data until a visitor agrees. Meta’s consent documentation says to call fbq(‘consent’, ‘revoke’) before the pixel initializes, on every page. Once the visitor gives consent, you call fbq(‘consent’, ‘grant’) and sending resumes.

For US state privacy laws, Meta offers Limited Data Use. You turn it on with fbq(‘dataProcessingOptions’, [‘LDU’], 0, 0) placed before the pixel initializes, and Meta geolocates the visitor. According to Meta’s data processing options page, it currently applies to 14 states, including California, Colorado, Connecticut, Texas, Oregon and New Jersey.

Meta’s terms also require that you have the right to collect and share the data and any consents you need. Meta tells advertisers to work with their own legal counsel on a compliance plan, since rules differ by state.

How to test your Meta pixel

Installing is half the job. The other half is confirming that each event arrives with its parameters and without duplicates.

Start with the Test Events tool in Events Manager. It shows in real time which events Meta receives, which it deduplicates and which it drops. It is especially handy for button clicks and custom conversions.

Then use Meta Ads Data Advisor, the Chrome and Edge extension that replaced the old Pixel Helper. According to Meta, it also helps set up the pixel and Conversions API through Google Tag Manager, connects Shopify stores and alerts you when it spots problems. To let it detect your pixel, you need to turn off ad blockers.

Finally, open the server event details in Events Manager. There you will find coverage, match quality, deduplication and data freshness for each event. With that in place, you are ready for Instagram ad campaigns that optimize for real sales.

Sources

Frequently asked questions

Is the Meta pixel free?

Yes, creating and installing the pixel costs nothing. The Conversions API itself is free as well, although the Gateway carries cloud hosting fees that Meta says start at $30 per month.

Do I need the Conversions API if I already have the pixel?

Meta recommends it. The API sends events from your server and suffers less from ad blockers and browser errors, so you recover conversions the pixel alone would miss. If you use both, set up deduplication with event_id.

How many standard events does the Meta pixel have?

Seventeen, according to the Meta for Developers reference, including ViewContent, AddToCart, InitiateCheckout, Lead and Purchase. For anything outside that list, you can create custom events.

Do I still need to rank 8 events per domain?

You do not. Meta updated Aggregated Event Measurement and removed both the 8-event ranking and the configuration tab in Events Manager.

How can I tell if my pixel is double counting purchases?

Check the deduplication tab in the Purchase event details in Events Manager, and run the Test Events tool. If Meta reports clearly more purchases than your store, confirm that the event_id is identical in the browser and server events.

Buenos Aires, Argentina