Blog · Digital Marketing

What Is the Meta Pixel? How to Install It, Set Up Events and Add the Conversions API

By Yurian Barter · Academia Barter Rubio · Updated November 2026

Quick answerThe Meta Pixel is a snippet of JavaScript code you add to your website so Meta (Facebook and Instagram) can see what visitors do there, such as viewing a product or making a purchase. It lets you measure ad results, build audiences for retargeting, and help Meta's system find people more likely to take action. The Conversions API complements it by sending the same kind of data from your server.

What is the Meta Pixel, in plain English?

The Meta Pixel (often still called the Facebook Pixel) is a small piece of code that you place on your website. When someone loads a page or does something on it, the code sends a message to Meta saying what happened. Meta can then connect that action to people who saw or clicked your ads, when the data can be matched.

Think of it as a counter at the door of your shop that also notes which door visitors came through. Without it, you only know how many people clicked an ad. With it, you can know how many of them added something to a cart or filled in a form.

The pixel does not make ads better by itself. It gives you data, and that data is used for three main things:

How does the pixel actually work?

The pixel runs in the visitor's browser. Here is the basic flow:

  1. A person clicks your ad or visits your site.
  2. Your page loads the pixel's base code.
  3. The base code records a PageView and sends it to Meta along with technical information, such as the page address and browser details.
  4. If you set up additional events, the pixel sends those when the action happens (for example, when the thank-you page loads after a purchase).
  5. Meta tries to match the activity to a user account and reports it in your Ads Manager and Events Manager.

Because it depends on the browser, the pixel can be limited by ad blockers, browser privacy features, cookie restrictions and users who decline tracking. That is exactly why the Conversions API exists, which we cover below.

What do you need before installing the pixel?

Prepare these things first so the setup goes smoothly:

How do you install the Meta Pixel step by step?

Menus and names change over time, so treat these steps as the general path rather than exact button labels.

Step 1: Create the pixel (dataset)

Open Meta's Events Manager, choose to connect a new data source for your website, and give it a recognizable name. Meta has been moving toward calling this a "dataset", but the pixel is still the core of it. Copy or note the Pixel ID, a string of digits.

Step 2: Choose your installation method

Step 3: Verify it works

Install the Meta Pixel Helper browser extension (made by Meta for Chrome-based browsers), visit your site, and check that it detects the pixel without errors. Then look at the Test Events tool in Events Manager and confirm your visit appears.

Step 4: Add events

The base code only tracks page views. To measure actions, you need events, explained next.

Which Meta Pixel events should you set up?

Events are named actions. Meta offers standard events with fixed names that its system understands, and you can also create custom events.

EventWhen it firesTypical use
PageViewAny page loadsBase traffic data
ViewContentProduct or key page viewedRetargeting browsers
AddToCartItem added to cartCart abandonment audiences
InitiateCheckoutCheckout beginsFunnel analysis
PurchaseOrder completedSales optimization, with value and currency
LeadForm submittedLead generation
CompleteRegistrationAccount or sign-up createdRegistrations

You can add events by code, through your platform's integration, or with Meta's event setup tool, which lets you pick buttons or pages visually. Use whichever your site supports reliably.

Parameters add detail to events. For a Purchase, you would normally send the order value and currency so you can measure return on ad spend. Only send information you are allowed to collect, and never send sensitive personal data.

Tip: start with the two or three events that map to your real business goal. Tracking everything makes reports messy and does not help optimization.

What is the Conversions API and why use it with the pixel?

The Conversions API (CAPI) lets your server, or a connected platform, send events directly to Meta instead of relying only on the visitor's browser. It is not a replacement for the pixel in most setups. Meta generally recommends using both together.

Why combine them?

Deduplication

If the pixel and the API both send the same purchase, Meta could count it twice. To prevent this, send an event ID (and matching event name) with both versions so Meta can treat them as one. This is the most commonly missed step.

How to set it up

Availability and settings differ by platform and change often, so check your platform's current documentation.

What are the most common Meta Pixel mistakes?

How do you check that everything is working?

  1. Use Pixel Helper to confirm the pixel loads once and events fire at the right moments.
  2. Open Test Events in Events Manager and perform the action yourself, such as submitting a form.
  3. Check the event's source: it should show Browser, Server, or both if you use CAPI.
  4. Look at the deduplication and match-quality indicators if your account shows them.
  5. Compare your own records, like store orders, with Meta's counts. Small differences are normal because of attribution and privacy limits, but large gaps suggest a problem.

Review the setup after any site redesign, checkout change or platform update, since these often break tracking silently.

Frequently asked questions

Is the Meta Pixel the same as the Facebook Pixel?

Yes. Facebook Pixel was the original name, and it was later renamed Meta Pixel after the company rebranded. It works for ads on Facebook, Instagram and other Meta placements. You may still see both names in tutorials and platform menus.

Do I need the Meta Pixel if I don't run ads?

It is mainly useful for advertising, but you can install it early to start collecting audience data. Without ads, its value is limited. If you plan to advertise later, having it in place beforehand can help, as long as you respect consent and privacy rules.

Is the Meta Pixel free?

Creating and installing the pixel does not carry a charge from Meta. Your costs come from running ads, plus any developer time or third-party tools you use to implement tracking. Prices for those services vary by provider and country.

Does the Conversions API replace the pixel?

Usually no. Meta generally suggests running both so that browser and server data complement each other. If you do, use matching event IDs so Meta can deduplicate events and avoid counting the same purchase or lead twice.

Why is my pixel not firing?

Common causes include code placed in the wrong spot, duplicate installs, ad blockers, a consent banner blocking scripts, or an event tied to the wrong page. Use Pixel Helper and Test Events to see what loads, then check your platform integration or tag setup.

Want to practice setting up tracking and reading your results? Try our short lessons on digital advertising and ask the AI tutor to walk you through your own pixel setup step by step. See the course: Digital Marketing.

Keep learning

Learn this step by step in the super academy

Short lessons, challenges and Barty, your 24/7 AI tutor. One membership unlocks every school.

More guides

How to Run Facebook Ads: Step-by-Step GuideHow to Advertise on TikTok: Step-by-Step for Small BusinessAmazon Ads for Beginners: Ad Types, ACOS & First CampaignChatGPT Ads: How They Work and How to PrepareMicrosoft Advertising Guide: Bing Ads Step by StepCTR CPC CPM Explained: Ad Metrics With Examples