Back
September 27, 2026 · Tracking & Measurement · 4 min read

Meta Pixel setup: a step-by-step guide for 2026.

The Meta Pixel is the first thing to get right in Meta advertising, and the thing most often done wrong. This guide walks through, as of 2026, how to create the pixel, install it, test it and make it compliant with cookie consent rules. If you want to know why the pixel matters so much and how to build audiences from its data, read our overview of the Meta Pixel and CAPI.

It assumes you have a Meta business portfolio and access to your website's code or platform settings. For a simple site the whole process takes about an hour.

1. Create the pixel in Events Manager

Open Meta Events Manager and check you are in the right business portfolio. Click Connect Data, choose Web as the data source and give the pixel a clear name, such as your business name plus Pixel. Meta generates a Pixel ID, which you can find later in the dataset settings.

Do not be confused that Events Manager now calls the pixel a dataset. It is the same thing: the dataset ID and the Pixel ID are identical. Create one pixel for the business and use it on every page. Several pixels on one domain split your data and the algorithm learns more slowly.

2. Install the pixel on your site

If you use Shopify, WooCommerce or WordPress, use the official Meta integration or plugin. It installs the base code, usually with the standard ecommerce events, and is generally more reliable than a manual install.

If your site is custom-built, paste the base code Meta gives you into the head of every page, just before the closing head tag. If you use Google Tag Manager, install the pixel there as its own tag, not in the code as well. Two installs on the same page send every event twice.

3. Choose the right events

PageView tells Meta nothing about who buys. The algorithm optimises for the event you choose in the campaign, so the pixel has to send the event that means money for your business.

For ecommerce, the events that matter are ViewContent, AddToCart, InitiateCheckout and Purchase. For a service business whose conversion is an enquiry or a booking, the core event is Lead. Always send the value and currency with Purchase, or Meta cannot optimise for value or ROAS.

Older guides tell you to configure and rank eight web events and verify your domain to do it. Meta has dropped that requirement, and the event ranking view is gone from Events Manager. Domain verification is still worth doing because it proves the domain is yours, but you no longer need it to set up events.

4. Test before you trust it

Install the Meta Pixel Helper Chrome extension and open your site. It shows whether the pixel loads and which events fire. Then open the Test Events view in Events Manager, enter your site address and complete one real action: add a product to the cart or submit an enquiry form. The event should appear within seconds.

Check three things: PageView fires on every page, the conversion event fires only on the right page and only once, and purchases carry the right value and currency. Reloading the thank-you page and sending Purchase a second time is one of the most common mistakes this test catches.

5. Cookie consent in the EU and UK

This is where most European sites go wrong. Under EU and UK rules, advertising and analytics cookies need the visitor's prior, freely given consent, and data protection authorities say so explicitly. The Meta Pixel is an advertising cookie, which means it must not send data before the visitor has agreed in your cookie banner.

The Meta Pixel has a built-in consent command for this. A revoke command is called before the pixel initialises, and a grant command only once the visitor agrees. Most consent management tools, such as Cookiebot or CookieYes, can do this for you. It is how we run our own site: the Meta Pixel only starts after consent.

Consent has to be as easy to withdraw as it was to give. Keep a permanent link to your cookie settings on the site, for example in the footer.

6. Add the Conversions API

Even a well set up pixel does not see every conversion, because ad blockers, browser restrictions and closed tabs hide some of them. The Conversions API sends conversions from your server straight to Meta and fills that gap. The official Shopify and WooCommerce integrations usually set up CAPI for you; on a custom site it is a developer's job.

The detail that matters most is deduplication: the browser and server events must carry the same event_id, or Meta counts every conversion twice. We wrote a separate guide on Conversions API deduplication.

The most common mistakes

The pixel is installed twice, for example in both the theme and a plugin, and every event is counted double.

Purchase events are missing a value or carry the wrong currency, and the ROAS report shows zero or absurd numbers.

The pixel fires before cookie consent, which is a legal risk in the EU and UK.

An event was never tested. Everything looks fine until a campaign has spent a week optimising for the wrong signal. If results have already dropped suddenly, read how to tell a tracking break from creative fatigue.

The takeaway

Setting up the Meta Pixel means one pixel, the right events on the right pages, a test before any campaign, consent-gated firing, and the Conversions API to fill the rest of the gap. Do those properly and everything that comes after, from creative testing to scaling, rests on a clean signal. If you want someone to check your setup, book a 30-minute audit.

Frequently asked questions

How long does Meta Pixel setup take?

For a simple site, about an hour including testing. Shopify, WooCommerce and WordPress are fastest, because the official Meta integration installs the base code and the standard events for you. A custom-built site takes longer, mostly because consent gating and the Conversions API need a developer.

Is the Meta Pixel the same as a dataset?

Yes. Events Manager now calls the pixel a dataset, and the dataset ID and the Pixel ID are identical. Use one pixel for the whole business, because several pixels on one domain split your data and slow down learning.

Does the Meta Pixel need cookie consent in the EU?

Yes. Under EU and UK rules the Meta Pixel is an advertising cookie, so it must not send data before the visitor has agreed in your cookie banner. Use the pixel's consent command, revoke before it initialises and grant after consent, or let a consent tool such as Cookiebot or CookieYes handle it.

How do I check that my Meta Pixel is working?

Install the Meta Pixel Helper Chrome extension to see whether the pixel loads and which events fire. Then open Test Events in Events Manager and complete one real action, such as a purchase or an enquiry. Check that the conversion event fires once, on the right page, with the right value and currency.

Do I still need domain verification and eight ranked events?

No. Meta has dropped the eight-event configuration requirement, and the event ranking view is gone from Events Manager. Domain verification is still worth doing because it proves the domain is yours, but you no longer need it to set up events.