Skip to content

Term

What is Meta pixel? Seeing which click became a customer

What the code measures, why it may only load after consent in Europe, and how two events per kind of customer make better campaigns.

Three reels from the launch of Les Terrasses de Durbuy that ran as Meta ads, measured with the Meta pixel after consent
Meta pixel
The Meta pixel is a piece of JavaScript on your website that reports visits and actions, such as a contact or a lead, to Meta, so you can measure and steer ads on Facebook and Instagram.
Also calledFacebook pixelpixel codeMeta pixel tracking

By , COO

5 min read
On this page
  1. 01A click is not yet a customer
  2. 02What happens when someone opens your page
  3. 03Ask first, load later, in the EU
  4. 04Browser or server: the Conversions API
  5. 05Two kinds of customer, two events
  6. 06Free code, expensive mistakes

A click is not yet a customer

With the Meta pixel, Meta sees not only who clicked your ad but also what that person did on your site afterwards. Without a pixel, Meta only knows about the click. With it, Meta sees the form that followed and can steer your campaign towards more people like them. That turns advertising into performance marketing: paying for and steering on results.

The name misleads a little: it is not a dot in an image but a piece of code. It used to be the Facebook pixel; since the company became Meta on 28 October 2021, it is the Meta pixel. Many people still use the old name.

What happens when someone opens your page

The pixel does three things. Measure: how many leads or sales an ad brought, so what each result cost. Build audiences: people who visited your site can be reached again with retargeting. Optimise: Meta looks for people who resemble those who already became a lead, and shows your ad to them more often.

Each action is an event. Meta keeps a fixed list of standard events, such as PageView for a page viewed, Contact for someone getting in touch, Lead for a completed form and Purchase for a sale. You choose which to send, and which one your campaign should chase.

The code, line by line

What the pixel looks like in the code (pixel ID replaced by zeros)

1// only after “Yes, fine” in the cookie banner

2fbq('init', '000000000000000');

3fbq('track', 'PageView');

// click on WhatsApp

4fbq('track', 'Contact');

// fleet form sent

5fbq('track', 'Lead');

  1. 1Consent firstThe pixel loads only when the visitor says yes. If they decline, nothing is sent.
  2. 2Which pixelThe ID ties the site to your ad account at Meta.
  3. 3Page viewEvery page viewed. That is what you build a retargeting audience from.
  4. 4ContactA Meta standard event: someone gets in touch, here through WhatsApp.
  5. 5LeadThe Lead event: a completed form. This is what you let campaigns steer on.

Two kinds of customer, two events: Meta learns who is a private customer and who runs a fleet.

Ask first, load later, in the EU

In the EU, an advertising pixel is not needed for your site to work. Under the ePrivacy rules it may only load once the visitor consents. A pixel that loads on the first visit, or a banner where only "accept" stands out, is a risk in every EU country. Whether you need a cookie banner and what goes in it is on our question page; your privacy policy has to mention the pixel too.

It also means you never measure everyone. People who decline do not appear in your figures. Do not rely on the pixel alone: hold its numbers against your own count of leads.

Browser or server: the Conversions API

WhatMeta pixelConversions API
Where it runsIn the visitor's browserOn your own server or platform
What it sendsPage views and actions on the siteActions from your site, app or CRM, also after the visit
Hit by ad blockers and browsersYesLess
Consent needed in the EUYesYes, for the same data
Work to set upA snippet, often through a pluginA server-side integration

The Conversions API is not a way around consent. It is a second, more reliable route for the same data, for example a quote that only becomes a customer in your CRM days later. If you run your own custom software, it can send that event directly.

Two kinds of customer, two events

Park & Wash, a car detailer in Ghent, has two kinds of customer: private people who ask for a price on WhatsApp, and companies with a fleet who fill in a fleet form. We built the site with a plain-language consent banner and a Meta pixel that only loads after "yes", with two events: Contact for a click on WhatsApp and Lead for a sent fleet form. A campaign for private customers steers on Contact, one for fleet managers on Lead. Meta learns per campaign who the right customer is.

Free code, expensive mistakes

The pixel is free. The work is in the setup: the consent banner, the right events in the right place, and checking in Meta Events Manager that everything arrives. On a custom site that is a few hours; in WordPress a plugin does part of it, often without clean consent. What it returns: campaigns that steer on leads instead of clicks, and numbers that show your ROAS or cost per lead per campaign. What Meta ads cost is in Facebook ads cost.

A clean install in five steps

  1. Pick your resultWhich action is a customer worth: a contact, a lead, a booking, a purchase?
  2. Put consent firstNo yes, no pixel. Equal buttons for yes and no, in plain language.
  3. Place pixel and eventsPageView on every page, and a standard event at the moment of the action, not on loading a thank-you page anyone can open.
  4. Test in Events ManagerDo the action yourself and check the event arrives, once, with the right name.
  5. Let your campaign steer on itChoose the event as your campaign goal. Give Meta a few weeks to learn.

What advertisers ask about tracking

Is the Meta pixel the same as the Facebook pixel?

Yes. Facebook the company has been called Meta since October 2021, and the pixel took the same name. It works for ads on Facebook and Instagram.

Can I use the Meta pixel without a cookie banner in the EU?

No. An advertising pixel is not needed for your site to work, so it may only load after the visitor's consent.

What is the difference between the pixel and the Conversions API?

The pixel runs in the visitor's browser, the Conversions API on your own server. The API is more reliable because ad blockers and browsers hinder it less, but it needs consent for the same data too.

Do I need the pixel if I only run message ads?

Not necessarily: ads that lead to WhatsApp or Messenger are measured inside Meta's own apps. As soon as people go to your site, you need the pixel to know what they do there.

Facebook and Instagram

How VBS builds the tracking behind your ads

We set up the tracking that fits your business: a consent banner that follows EU law, the Meta pixel and where needed the Conversions API, with events per kind of customer, as for Park & Wash above. Then we build the campaigns that steer on them, with a landing page per audience. See Facebook and Instagram ads, Meta or Google Ads, or book a call.

Does Meta know which click became a customer?

We set up pixel, consent and events so your campaigns steer on leads.

Optional, if you prefer a call.

What do you want to achieve, and what is already there?

We only use your details to reply to you.