How to set up Meta Pixel: create it in Events Manager, install it, add events and test it

Author: · · 18 min read

Short answer: To set up Meta Pixel, go to Meta Events Manager, click Connect data, choose Web, name your pixel and click Create pixel. Put the base code on every page (through your website platform's partner integration, Google Tag Manager or your site's `<head>`), add events such as Purchase with the order value and currency, then confirm each event arrives once with the Test events tool. Meta also recommends adding the Conversions API. Once purchases are tracked, you can compare cost per sale on Meta, Google Ads and TikTok in one dashboard instead of guessing.

What you need before you start

Meta lists two requirements:

  • A business website or app.
  • Access to your site's code or tag manager, for you or your developer, if you set it up manually.

Also decide what counts as a result: a purchase for a store, a form (Lead) or a call or message (Contact) for a service business. One pixel can cover your whole site, Meta says; two agencies running your ads may each need their own.

Step 1: Create the pixel in Events Manager

"On Facebook" here means Meta's Events Manager, not your Facebook Page. Meta's current flow:

  1. Go to Meta Events Manager.
  2. Click Connect data, select Web, then click Connect.
  3. Enter a name for your pixel and click Create pixel. This creates a new pixel ID you can see in Events Manager.
  4. Enter your website URL and click Check. If an easy partner integration is available for your site, it appears on screen.
  5. Choose Get guidance (Meta's recommendation; you then follow the on-screen steps) or Do it yourself.
  6. If you chose Do it yourself, pick Conversions API and Meta Pixel or Meta Pixel only, then click Next.

With Meta Pixel only, you choose Install code manually or Check for partner; Email instructions sends the code to a developer.

Step 2: Put the base code on your website

The base code must run on every page. There are three ways to get it there.

Option A: a partner integration. Meta's partner list includes WordPress, WooCommerce, Shopify, BigCommerce, Squarespace and Wix Premium, among others, and Meta describes most integrations as plug and play, with no code editing. If your platform showed up at the Check step, click Next and follow the instructions in Events Manager; Meta says partner-specific steps are shown there and in the partner's own help center, so follow those rather than a generic tutorial. For Shopify, Meta's free Ads Data Advisor browser extension can also connect the store, including the pixel and Conversions API.

Option B: paste the code manually. Meta's instruction: paste the pixel code between the `<head>` and `</head>` tags of your pages, underneath any code already there but above `</head>`. Meta's best-practice page adds a check: everything between `<script>` and `</script>` must match your base code exactly.

Option C: Google Tag Manager. If your site already uses Google Tag Manager, Meta's own steps are:

  1. In Events Manager, select your dataset under Data sources, click Add Events > Add New Integration > Meta Pixel > Set Up, choose Manually Add Code to Your Website, click Get Started, then Copy code.
  2. In Tag Manager, open your website's container, click New Tag, choose Custom HTML as the tag type and paste the base code.
  3. Under Advanced Settings, set the tag firing option to Once per page.
  4. Add the All Pages trigger and save.

You need admin access to your Tag Manager account. If you'd rather not build tags yourself, Meta says Ads Data Advisor can set up the pixel, Conversions API and standard events through Google Tag Manager without developer knowledge; it needs full access to your ad account and admin access to Tag Manager.

Step 3: Set up events

Meta says the page view event is part of the base code. Everything else is a standard event you add. The ones most advertisers need:

  • Viewing a product or key page — `ViewContent`
  • Adding to cart — `AddToCart`
  • Starting checkout — `InitiateCheckout`
  • Completing a purchase (usually the thank-you or confirmation page) — `Purchase`
  • Submitting a form or signing up for a trial — `Lead`
  • Contacting you by phone, SMS, email or chat — `Contact`

Where the event code goes. Manually, it goes inside your pixel code, above `</script>`, on the page where the action happens. In Tag Manager, Meta's steps are one Custom HTML tag per event with a trigger such as Some Page Views where the URL contains your product path. Without code, Meta's point-and-click event setup tool is the alternative.

Spell events exactly. Events are case sensitive: Meta notes that `viewcontent` instead of `ViewContent` creates a custom event, not the standard one.

Send value and currency with purchases. Meta's default purchase code says `value: 0.00, currency: 'USD'`. Replace it with the real order value: a decimal number with a decimal point, no currency symbols or commas, and a three-letter currency code. Without a value, a $20 order and a $500 order both show up as "1 purchase", and the return on your ads can't be measured (the formula is in our guide on how to calculate roas). If your platform's integration sends the value for you, still check it in the test below.

Which event to optimize for. Choosing between Purchase and an earlier event such as AddToCart is a budget decision as much as a tracking one: our guide on how much do facebook ads cost covers the learning phase and how many results Meta looks for each week.

Step 4: Test that it works

Meta's test events tool:

  1. In Events Manager, click Data sources in the left menu and select your pixel.
  2. Click Test events.
  3. In the browser events section, enter your website URL and click Open website.
  4. Browse, add a product to the cart and, if you can, place a test order. Events should appear in the Test events tab.
  5. Click Clear activity when you're done.

Activity is only recorded while the Test events page is open, and Meta says new events can take 30 minutes or more to appear in analytics.

Meta's best-practice page adds three checks. When the page view arrives, the pixel's status in Events Manager turns Active. The Diagnostics tab lists setup problems and fixes. And Ads Data Advisor, a free Chrome and Edge extension (formerly Meta Pixel Helper), shows which pixel and events fired on a page and flags missing parameters such as price or currency; Meta says to disable ad blockers so it can see the pixel.

After a test order, check that Purchase fires once, with the right value and currency. If it fires twice, the code is probably running in two places, for example in your theme and in Tag Manager.

Add the Conversions API, and avoid double counting

Meta says browser data can be blocked or lost because of browser settings or connection issues. The Conversions API sends events from your server, so Meta recommends a redundant setup: the same key events, such as purchase and contact, sent through both.

The catch is deduplication. If the same purchase arrives from both the pixel and the server, Meta counts it once only when:

  • the event name (for example `Purchase`) matches on both, and
  • the event_id is identical on both.

Meta can also match the event name plus external_id or fbp, and keeps whichever event arrived first. Many partner integrations, such as Shopify and WooCommerce, handle these parameters automatically, Meta says; in a manual setup you add them yourself. Once purchases are counted once, the next step is comparing them with Google Ads and your real orders; our guide on how to track ad performance covers that.

Common mistakes

  1. Installing only the base code. You get page views, not purchases.
  2. Two copies of the pixel. Theme code plus Tag Manager, or pixel plus Conversions API without a matching event_id, inflates conversions.
  3. Ignoring consent. If your site uses a cookie banner, check with your legal adviser how consent rules apply to the pixel.
  4. Launching ads first, tracking later. A pixel installed later doesn't show past sales. Finish the test before your first campaign.

How Examenda helps

Once the pixel counts sales, the question is which channel brings them in more cheaply. Examenda connects your Google Ads, Meta (Facebook and Instagram) and TikTok accounts through official permissions and shows them in one dashboard with one set of definitions: spend, sales and cost per sale. The Starter plan includes budget suggestions and a weekly report every Monday across all accounts. AI suggestions to shift budget arrive as approval cards; nothing changes until you approve it. On the Growth plan you can set rules such as "alert me if cost per sale misses my target for 3 days" and connect your sales data to measure profit, not just revenue.

No time to do it yourself? With "Let us run your ads", our team runs your ads with Examenda, and setup (account, conversion tracking and first campaigns) is part of the service. Managed Starter covers Google Ads; Meta (Facebook, Instagram) is included from Managed Growth ($299 a month). Other channels are on request.

The Starter plan is $49 a month, excluding tax, and billed yearly you get two months free.

See Examenda →

FAQ

Is the Facebook pixel the same as the Meta Pixel?
Yes. It's the same tracking code under the company's current name. You create and manage it in Meta Events Manager, and it measures the results of your Meta ads, whether they run on Facebook or Instagram.

Can I set up Meta Pixel without a developer?
Often, yes. If your website platform has a Meta partner integration, Events Manager walks you through it. If you use Google Tag Manager, Meta's Ads Data Advisor extension can set up the pixel and standard events for you. Passing the exact order value on a custom-built site may still need a developer.

How do I know my Meta Pixel is working?
Open Test events in Events Manager, launch your site from there and place a test order. If Purchase appears once with the correct value and currency, and the pixel shows Active, it's working.


Sources: Meta Business Help Center, "Set up and install the Meta Pixel", "Best practices for Meta Pixel setup", "About Partner Integrations in Events Manager", "Add the Meta Pixel in Google Tag Manager", "Specifications for Meta Pixel Standard Events", "Set the value and currency of your Meta Pixel standard events", "Test events tool: verify app and web browser events for Meta", "About Meta Ads Data Advisor" and "About Deduplication for Meta Pixel and Conversions API Events". Information as of 29 October 2026.

More on this topic