How the Meta Pixel works
The pixel is a short script added to every page of a website, either directly, through a plugin or through Google Tag Manager. When a visitor does something important, the pixel sends an event to Meta (the company that owns Facebook and Instagram). Standard events have fixed names, for example:
- PageView: a page view,
- ViewContent: a product view,
- AddToCart: adding to the basket,
- InitiateCheckout: starting an order,
- Purchase: a purchase, including the order value,
- Lead: a submitted enquiry or sign-up.
Meta matches these events with people who saw or clicked on your ad.
Why ads don't work well without it
The pixel measures results: in Ads Manager you can see how many purchases each ad brought in and for how much. It also helps optimisation, because once the system knows who bought, it shows the ad to people similar to them. And it enables remarketing, reaching people who viewed a product or left something in their basket. Without the pixel, Meta ads can only optimise for clicks.
Conversions API: a second route for data
The pixel runs in the browser, so it loses some data to ad blockers, browser restrictions and people who decline cookies. Meta therefore recommends using the Conversions API alongside the pixel: the same purchase is also sent directly from the online shop's server. To avoid counting it twice, both messages carry the same event ID and Meta merges them.
A real-world example
An online shop selling home décor advertises on Instagram. Its pixel only tracked page views, so the ads optimised for visits and brought cheap clicks without purchases. Once the shop adds purchase events with values, connects the Conversions API and sets the campaign to optimise for purchases, the system starts looking for people who actually place orders.
The most common mistakes
- Firing before cookie consent. The pixel is marketing code and under GDPR it may only run after consent.
- Duplicate purchases: the pixel added by a plugin and the theme at the same time.
- Missing value and currency on the Purchase event.
- An unverified domain in the Meta Business settings.
Setting up the pixel and Conversions API is the first step I take with Meta advertising, and I verify the events with test orders.