How to set up the Facebook (Meta) pixel step by step - Digital Growth Tutor

How to Set Up the Facebook (Meta) Pixel: Step-by-Step (2026)

Quick answer: Open Events Manager, click Connect data, choose Web, name your dataset and click Create (the dataset ID is your pixel ID). Install it with a partner integration such as Shopify, WordPress or Wix, or paste the base code into the head of every page or add it with Google Tag Manager. Add standard events like AddToCart and Purchase (with value and currency), turn on the Conversions API, check events in Test events, then pick your conversion event and dataset in Ads Manager.

If you run Meta ads to a website, the Meta pixel (formerly the Facebook pixel) is the one thing you can’t skip. It tells Meta who visited your site and who bought, so your ads can be tracked and optimized. This guide walks through the full setup, from creating the dataset to testing events and using it in your ads.

https://youtu.be/fqY8nYEqwVg

Prefer to watch? The video above walks through every step.

What the Meta pixel does

  • It’s a small piece of code on your website that sends events to Meta, such as page views, add to carts and purchases.
  • Meta uses these events to measure results, build retargeting audiences, and find more people who are likely to convert.
  • In Events Manager the pixel now lives inside a dataset. The dataset ID is the same as your pixel ID.

How to set up the Meta pixel (step by step)

Step 1: Create your dataset in Events Manager

Open Events Manager and click Connect data. Choose Web, give your dataset a name (for example your business name) and click Create. The dataset ID is also your pixel ID.

Creating a Meta pixel dataset in Events Manager: Connect data, Web, dataset name and dataset ID
Events Manager > Connect data > Web. Your dataset ID is also your pixel ID.

Step 2: Install the pixel on your website

Choose the easiest method for your site:

  • Partner integration: if your site runs on Shopify, WordPress, Wix or another supported platform, connect it from the list and the pixel is added for you.
  • Base code: copy the pixel base code and paste it into the <head> section of every page.
  • Google Tag Manager: add the pixel as a tag that fires on all pages.
Installing the Meta pixel with a Shopify, WordPress or Wix partner integration or the base code in the head
Use a partner integration if you can; otherwise paste the base code in the head.

Step 3: Add standard events

The base code only tracks PageView. Add standard events for the actions that matter, such as ViewContent, AddToCart, InitiateCheckout, Lead and Purchase. For purchases, send the value and currency too, so Meta can report your return on ad spend.

Meta pixel standard events: PageView, ViewContent, AddToCart, InitiateCheckout, Lead and Purchase with value and currency
Add standard events, and send value and currency with Purchase.

Step 4: Turn on the Conversions API

The Conversions API sends events from your server, so you lose less data to ad blockers and browser privacy settings. Many partner integrations can turn it on in a few clicks. When you use the pixel and the Conversions API together, send the same event ID from both so Meta removes the duplicates.

Meta pixel and Conversions API sending the same purchase, deduplicated by event ID
With the pixel and Conversions API together, matching event IDs are counted once.

Step 5: Test your events

In Events Manager, open your dataset and go to Test events. Enter your website address and open it, visit a few pages, add a product to the cart, and watch the events appear in real time. You can also use the Meta Pixel Helper Chrome extension.

Meta Events Manager Test events showing PageView, ViewContent and AddToCart received
Open your site from Test events and watch events arrive in real time.

Step 6: Use the pixel in your ads

In the ad set, choose Website as the conversion location and pick the event you want, like Purchase. In the ad, under Tracking, make sure Website events is on and your dataset is selected.

Common Meta pixel problems and fixes

No events show up in Test events

Check that the base code is on every page and inside the head, that you opened the site from the Test events link, and that an ad blocker isn’t blocking it in your own browser.

Purchases are counted twice

You’re sending the same purchase from the pixel and the Conversions API without a matching event ID, or the purchase event fires twice on the thank-you page. Add a shared event ID and make sure the event fires once.

Purchase shows no value

Send the value and currency parameters with every Purchase event, using your order total and a valid currency code like USD.

Quick tips for Meta pixel setup

  • Install the pixel before you launch ads, so retargeting audiences start filling straight away.
  • Use one dataset per website; don’t install two different pixels on the same pages.
  • Check the event match quality and diagnostics in Events Manager after a few days.
  • Re-test your events after any website, theme or checkout change.

What should you do next?

  1. Build retargeting audiences with Meta Ads custom and lookalike audiences.
  2. Learn which numbers to watch with Meta Ads metrics explained.
  3. See what competitors run with how to use the Facebook Ads Library.

Frequently asked questions

What is the Facebook (Meta) pixel?

It’s a small piece of code on your website that sends events such as page views, add to carts and purchases to Meta, so you can measure results, build audiences and optimize your ads.

Where do I create a Meta pixel?

In Events Manager: click Connect data, choose Web, name your dataset and click Create. The dataset ID is your pixel ID.

Do I need the Conversions API as well as the pixel?

It’s recommended. The Conversions API sends events from your server, so you lose less data to ad blockers and browser privacy settings. Use an event ID so Meta removes duplicates.

How do I check my pixel is working?

Use Test events in Events Manager: enter your website address, open it and click around, and watch events arrive in real time. You can also use the Meta Pixel Helper Chrome extension.

Which events should I track?

Start with ViewContent, AddToCart, InitiateCheckout and Purchase for e-commerce, or Lead for lead generation. Send value and currency with every Purchase.

Want more step-by-step tutorials? Subscribe to Digital Growth Tutor on YouTube for short, no-jargon guides.

Leave a Comment

Your email address will not be published. Required fields are marked *