What Is Meta Pixel? Setup and Conversions API Guide 2026

21 min read
What is Meta Pixel and how to set it up - 2026 measurement guide with Conversions API

Meta Pixel is a piece of JavaScript code added to a website that sends the actions visitors take on the site, as events, to Meta, the system that runs Facebook and Instagram ads. It can be installed in three ways: through a platform plugin, through a tag manager, or by adding the code to the site by hand. The Conversions API is a second connection that sends the same events from a server instead of the browser, and together the two form the measurement layer of Meta advertising. According to Meta's Pixel getting started documentation, the base code automatically records only one event on each page load, the page view (PageView). Actions such as a purchase, a form submission (Lead) or an add to cart each need their own event code. On a site without event code, the ad budget still gets spent, but Ads Manager cannot show which ad brought in a sale or a form.

This guide is the deep version of the measurement layer: what the Pixel does, the three setup paths, why the Conversions API is needed, deduplication with event_id, Event Match Quality, verification with Test Events, domain verification and cookie consent. For opening an ad account and your first campaign, see the Meta Ads Manager guide. For a general introduction to Meta's ad system, see the guide What is Meta Ads.

What Is Meta Pixel and What Does It Do?

Meta Pixel is the measurement code that reports on-site actions such as page views, add to cart, form submissions or purchases to Meta, so that ads can be measured and optimized against those actions. Without the Pixel, Meta only knows about interactions inside the ad itself and cannot see what happens on the site after the click.

The Pixel is useful in three areas:

  1. Conversion measurement: Ads Manager shows which campaign, ad set and ad brought in a sale or an inquiry.
  2. Optimization: In a campaign with a Sales or Leads objective, the algorithm looks for people likely to complete the chosen event. If that event does not arrive through the Pixel or the Conversions API, there is no signal to optimize for.
  3. Audience building: Retargeting audiences can be built from site visitors or from people who abandoned their cart.

Meta's Pixel getting started documentation recommends adding the base code between the head tags of the page and notes that the Pixel works with most tag management solutions. That second point is the basis for the Google Tag Manager option among the setup paths below.

What Are the Pixel Base Code and Standard Events?

The Pixel base code is the starter code that loads Meta's event functions on the page and sends only the PageView event automatically, while standard events are action types predefined by Meta that are added on top of that code.

Meta Pixel standard events are action types that Meta has predefined and that can be selected directly for ad optimization. Meta's Pixel reference documentation lists 17 standard events that can be tracked with the fbq('track') function: AddPaymentInfo, AddToCart, AddToWishlist, CompleteRegistration, Contact, CustomizeProduct, Donate, FindLocation, InitiateCheckout, Lead, Purchase, Schedule, Search, StartTrial, SubmitApplication, Subscribe and ViewContent. The base code, by contrast, records only one event automatically on every page load, PageView. If an online store installs the base code and stops there, Ads Manager sees visits but never receives add-to-cart or purchase data. For a service business the same applies to form submissions: until the Lead event is added, you cannot see which ad brought in an inquiry. In my view, this distinction is the point most easily missed during setup. That is why a setup plan should begin with a short event list stating which standard event fires on which page and on which button.

Business typeEvents to set up firstWhere the event fires
E-commerceViewContent, AddToCart, InitiateCheckout, PurchaseProduct page, cart button, checkout step, order confirmation page
Services and lead generationLead, Contact, ScheduleThank-you page after the form, contact button, booking confirmation
Membership and softwareCompleteRegistration, StartTrial, SubscribeSign-up confirmation, trial start, subscription confirmation

Tying the post-form event to a thank-you page makes it easier to fire the event only on a real submission. The landing page guide is a good starting point for thank-you page and form structure. Custom events can be defined for actions that have no match in the standard list, but custom events do not replace standard events. Once the event list exists, the developer, the person configuring the tag manager and the person running the ads can all work from the same document.

How Do You Set Up Meta Pixel? 3 Setup Paths

Meta Pixel is set up in one of three ways: a Meta integration or plugin in your site platform, Google Tag Manager, or adding the code to the site by hand. In all three, you first create a Pixel in Events Manager and get the Pixel ID. That step is covered in the Pixel step of the Meta Ads Manager guide. Which path fits depends on the site's platform and on who will manage the events.

Setup pathWho it suitsWhat to watch
Partner integration or e-commerce platform pluginAnyone using a hosted e-commerce platform or site builderCheck in the settings which events and whether the Conversions API are covered
Google Tag ManagerSites that already run a tag manager, advertisers measuring several ad channelsTriggers must be tied to the right button and page
Manual codeCustom-built sites, teams with a developerBase code goes in the head, event code goes where the action happens

1. Partner integration or platform plugin: If the site runs on an e-commerce platform or site builder, first check whether that platform has a Meta integration. If it does, the Pixel is often connected by entering the Pixel ID in a settings field. Meta's Conversions API getting started documentation notes that integration methods differ in the effort they require, their cost and the features they offer. That is why you should check one by one whether the plugin sends critical events such as purchases.

2. Google Tag Manager: If Google Tag Manager is installed on the site, the base code is added as a tag and events are tied to triggers such as a form submission or a thank-you page. The advantage is that later event changes can be made without touching the site code.

3. Manual code: The base code goes between the head tags of the site's shared template, and event code is written where the action takes place. For example, the fbq('track', 'Purchase') call for a purchase fires at the moment the order confirmation is shown.

If you are halfway there: If the site already has a Pixel, do not create a new one. The Conversions API getting started documentation asks you to use the same Pixel ID for browser and server events if a Pixel is already set up for your website. If an agency or freelancer set up the Pixel earlier and it does not appear in your business portfolio, ask that person to share the Pixel with your portfolio. Portfolio and access steps are covered in the Meta Ads Manager guide. If the same site has a Pixel installed twice through two different paths, clean that up first, because it can lead to events being counted twice.

Checklist

Meta Pixel and Conversions API verification checklist

Tick these steps in order after setup. Your ticks are stored only in this browser.

What Is the Conversions API and Why Do You Need It?

The Conversions API is the connection that sends the events the Pixel sends from the browser to Meta from the business's own server as well. Meta's deduplication documentation recommends setting up the Conversions API alongside the Pixel for the best ad performance and calls this a redundant setup.

Browser-side measurement depends on the visitor's browser, extensions and connection. On the server side, the event comes from the server where the order or form record is created. The end-to-end implementation guide sums up the recommended setup in one sentence: all events are sent through both the Pixel and the Conversions API.

These are the ways to connect the Conversions API:

  • Partner integration: If your e-commerce platform or site builder offers the Conversions API in its own settings, this is the path that takes the least effort.
  • Conversions API Gateway: According to Meta's Gateway documentation, the Gateway is a self-serve option configured inside Events Manager and requires no coding, but it runs on a server you set up with a cloud provider outside Meta, for example in an AWS account. Its only cost is the related cloud resource or partner fees.
  • Server-side tag management: An intermediate layer such as a Google Tag Manager server container collects events and forwards them to Meta.
  • Direct integration: A developer sends events from their own server to Meta. The getting started documentation recommends generating the access token in Events Manager and states that this path does not require App Review.

Which path to choose depends on effort, budget and the site's platform.

Strategy Call

Let's review your Pixel and Conversions API setup together

Are events arriving incomplete, or are sales being counted twice? In a 30-minute call with screen sharing we can look at Events Manager together and talk through the gaps and the order of priorities.

Book a call

How Does Deduplication (event_id) Work?

Deduplication is the process by which Meta counts an event once when the same event arrives from both the Pixel and the Conversions API, and it relies on the event ID and event name matching exactly on both sides.

Deduplication is the matching step that stops the same purchase from being counted twice when Meta Pixel and the Conversions API run together. According to Meta's deduplication documentation, Meta decides whether two events are the same based on an ID and a name. The eventID sent by the browser Pixel must match the server's event_id, and the Pixel event name must match the server's event_name. If the same ID and name reach the same Pixel again within 48 hours, Meta generally keeps the first event and discards the later one unless the content is meaningfully different. In practice, one unique ID is generated when the order or form is submitted and passed to both the browser call and the server request. If no ID is generated or the two sides differ, Meta may treat them as separate actions. Ads Manager can then show the same sale twice, making cost per sale look lower than it is.

This window starts when the first event is received, so the two events that need to match must both arrive inside it. The end-to-end implementation guide asks that every unique event carry its own event_id. For cases where an ID cannot be used, the same guide mentions alternatives such as the external_id or fbp parameter.

What Is Event Match Quality and How Do You Improve It?

Event Match Quality is an Events Manager metric that shows how well events sent through the Conversions API can be matched to a person on Meta's side. The end-to-end implementation guide recommends improving the match rate based on this metric's guidance once the integration is complete.

The score range and target value are described in the Meta Business Help Center, but that page could not be read for this article, so no target score is given here. The levers that can be verified from the source are:

  1. Send customer information in the right format. The customer information parameters documentation requires hashing for fields such as email (em) and phone (ph), and recommends it for external_id.
  2. Add IP address and browser information. The same documentation asks that client_ip_address and client_user_agent be sent without hashing, and states that sending both on all events may help improve event matching.
  3. Carry the browser IDs. The fbp and fbc parameters are also sent without hashing.
  4. Send events without delay. The timing rule is in the verification section below.

My recommendation is not to ask for new personal data beyond the fields your form already collects, and simply to make sure the existing fields are sent correctly. Which data you send is also a decision tied to cookie consent and your privacy notice.

How Do You Verify the Setup With Test Events in Events Manager?

The setup is verified with the Test Events tool in Events Manager: the tool generates a test code, events sent with that code appear in the Test Events window, and both the browser side and the server side are checked from the same screen.

The Test Events tool in Events Manager is used to check that Pixel and Conversions API events actually reach Meta. According to Meta's documentation on using the Conversions API, the tool generates a test ID, that ID is sent in the server request with the test_event_code parameter, and events start appearing in the Test Events window. This field is for testing only, and events are expected to be verifiable within 20 minutes after sending starts.

Timing is part of verification too. The end-to-end implementation guide states that sending events in real time or within 1 hour helps attribution, and that sending later than 2 hours can noticeably reduce performance. A delay of 24 hours or more can cause serious problems in attribution and in optimized ad delivery. That is why a test should look not only at whether the event arrives, but at how long after the action it arrives. Once testing is done, remove the test_event_code field from live sending.

For the browser side, the free Chrome and Edge extension Meta Ads Data Advisor (formerly Meta Pixel Helper) shows which Pixel events fire on the page you open. The last verification step is to place a test order or submit a test form and check that the event appears in both the extension and the Test Events window, with the same event name and only once.

Why Verify Your Domain?

Domain verification is the step that proves to Meta that the site belongs to your business portfolio, and it lets you control who can edit your links and content. Meta's domain verification documentation defines it as the way to claim ownership of a domain in Business Manager.

The same documentation lists two verification methods:

  • HTML file: The file Meta provides is uploaded to the root directory of the site.
  • DNS TXT record: The text record Meta provides is added to the domain's DNS settings.

If you have no access to upload files to the site, the DNS path is more practical, and if you have no access to the DNS panel, the file path is. The Meta Business Suite interface may also show a method beyond those listed in this documentation, and any one of the options on screen is enough.

The core rule for cookie consent is that the Pixel and the Conversions API follow the same consent logic: data sharing that the visitor has declined should not happen from the browser or from the server.

Meta's end-to-end implementation guide asks that if you have built logic that ties Pixel data sharing to consent, the same logic be applied to data shared through the Conversions API. If a visitor declines advertising cookies and the browser Pixel stops while the server keeps sending the same event, the consent logic has been bypassed.

What consent is required depends on the privacy law that applies to your site and your visitors, for example GDPR in the EU or KVKK in Türkiye. This article does not summarize the provisions of any of these laws. In Türkiye, for instance, the Personal Data Protection Authority has published a guide on cookie practices in Turkish, and the current text should be read on the authority's own site. If the site will use advertising and targeting cookies, how consent is collected, how the consent banner is built and what the privacy notice contains should be decided against the current rules that apply to you, with advice from a lawyer who works in data protection. The technical job is to make the choice on the consent banner control both the Pixel and the Conversions API sending at the same time.

Common Mistakes When Setting Up Meta Pixel

Common Meta Pixel setup mistakes involve events that are missing, counted twice or fired in the wrong place, and the seven items below can be checked during setup.

  1. Installing only the base code: The base code sends no event other than PageView, so purchase and form events have to be added separately.
  2. Two separate Pixels, or the same Pixel installed twice: If both a plugin and a tag manager send the same event, results can appear doubled.
  3. Not sending event_id: When the Pixel and the Conversions API run together and the IDs do not match, deduplication cannot happen.
  4. Tying the event to the wrong page: Tying the Purchase event to the cart page, or the Lead event to the form page loading, counts actions that never happened.
  5. Delaying server events: Given the guide's timing warning, events should be sent at the moment of the action.
  6. Mixing up the hashing rule: Email and phone are hashed, while IP address, browser information, fbp and fbc are not.
  7. Applying cookie consent only in the browser: If server sending is not tied to the same consent rule, the consent banner does not do its job.

Symptoms on the Ads Manager side, such as the Pixel showing no activity, are covered in the common issues section of the Meta Ads Manager guide.

Who Should Set Up the Pixel and the Conversions API?

The Pixel and the Conversions API should be set up by someone who has access to the site's platform and knows the advertising goals, because the job involves both technical and marketing decisions: marketing decides which events to measure, and the technical side decides how they are sent.

My view is this: if you use a hosted e-commerce platform and its integration also covers the Conversions API, you can do the setup yourself and get support only for the verification steps. If you have a custom-built site, several sales channels, or an inquiry flow that mixes forms and phone calls, it is safer to write the event plan with a specialist.

I work as a solo consultant, remotely. Measurement setup is remote work by nature: access is granted to Events Manager, the tag manager and the site panel, and verification is done together over screen sharing. That way you move forward on your own schedule, without planning around a city or a meeting.

Free Test

Can you set up the Pixel and the Conversions API yourself?

Tick the statements that are true for you. Your score shows whether it makes sense to do the setup yourself or with support.

Frequently Asked Questions

Which parts of a Meta Pixel setup create costs?

The cost items in a Meta Pixel setup are the budget spent when ads run and any server costs that come with the connection path you choose. According to Meta's Gateway documentation, the only cost of the Conversions API Gateway is the related cloud resource or partner fees. Server-side tag management also needs a server, so it can create hosting costs.

Are Facebook Pixel and Meta Pixel the same thing?

Yes, it is the same measurement code. After the Facebook company changed its name to Meta, the name Facebook Pixel gave way to Meta Pixel. A Pixel set up under the old name is managed from the same Events Manager screen and does not need to be reinstalled.

If I set up the Conversions API, can I remove the Pixel?

Meta's documentation does not recommend removing the Pixel. It recommends sending all events through both the Pixel and the Conversions API. When both sides run together, events sent with the same event_id and event name are deduplicated and counted as one action.

How do I know whether my Pixel setup is correct?

Open the Test Events window in Events Manager and place a test order or submit a test form. If the event appears with the same name, only once, and from both a browser and a server source, the setup is on the right track. You can also check the browser side with the Meta Ads Data Advisor extension (formerly Pixel Helper).

The test event arrives, but how quickly should it arrive?

According to the end-to-end implementation guide, sending events in real time or within 1 hour helps attribution, while a delay of 24 hours or more can cause serious problems in attribution and optimized ad delivery. Even if the event arrives, if it comes hours after the action, server sending should be moved to the moment of the action.

Conclusion

Meta Pixel is the browser side of the measurement layer and the Conversions API is the server side, and when the two are deduplicated with the same event_id, the ad system sees each action once and more completely. The order can be summed up like this: write the event list, install the Pixel through a single path, connect the Conversions API with the same Pixel ID, verify with Test Events, verify your domain, and apply the consent rule to both sides.

Strategy Call

Let's build your measurement layer together

Let's review your Pixel, Conversions API and event plan in a 30-minute call. We can talk concretely about which events are missing and which setup path makes sense. No commitment, no contract.

Book a call

You can see the scope of my Meta Ads consulting service on the service page.

Related guides: Meta Ads Manager Guide · What is Meta Ads · How to Increase Facebook Ads ROAS · What Is a Landing Page

Abdullah Çalış

Abdullah Çalış

Dijital Pazarlama Stratejisti & Otomasyon Mimarı

Framework odaklı, veri destekli dijital pazarlama stratejileri ve AI otomasyon çözümleri ile markaların sürdürülebilir büyümesini sağlıyorum.

Dijital Pazarlama Stratejinizi Güçlendirin

Framework odaklı yaklaşımımız ile markanızı büyütmek için hemen iletişime geçin.

Strateji Görüşmesi Alın