The essentials
- Its role: the Meta pixel (formerly the Facebook pixel) records visits and actions on your site to measure the conversions of Facebook and Instagram campaigns, build audiences and optimise delivery.
- Recommended method: a single dataset (pixel) per site, deployed through Google Tag Manager, with the standard events (ViewContent, Lead, Purchase) and their parameters.
- Essential in 2026: the conversions API alongside the browser pixel, and consent management (the pixel only fires after agreement).
- Checking: Meta Pixel Helper, the Test events tab, the event match quality score.
The aim of Meta pixel is the tracking code for Facebook and Instagram. Without it, advertising campaigns measure no conversion, cannot optimise delivery and build no retargeting audiences. Badly installed, it double counts, misses conversions or breaches the GDPR. This guide covers creation, deployment through Google Tag Manager, events, the conversions API, consent and checking. The pixel is also presented from the advertising side in the Meta Facebook pixel in social ads.
Creating the pixel (dataset)
- In Meta Business Suite, open Events Manager, then “Connect data sources”, “Web”.
- Name the dataset (Meta now says “dataset” rather than pixel) with the name of the site, and enter the URL.
- Choose “Install code manually” to get the pixel ID (15 to 16 digits); deployment will be done through Google Tag Manager.
- One pixel per site and per company. Several pixels on the same pages create duplicates and inconsistent audiences.
Deploying the pixel with Google Tag Manager
Deploying through Google Tag Manager avoids touching the site code and makes it possible to condition firing on consent.
| Step | In GTM | Detail |
|---|---|---|
| 1. Base tag | New tag, community template “Facebook Pixel” (or custom HTML with the base code) | Pixel ID, PageView event |
| 2. Trigger | All pages, with a consent condition (see below) | The pixel only fires after advertising consent |
| 3. Standard events | One tag per event, same template, chosen event | Trigger on the action: thank-you page, click, purchase through the dataLayer |
| 4. Parameters | value, currency, content_ids, content_name fields | Conversion value, products; essential for ROAS |
| 5. Event ID | A unique event_id variable per event | Allows deduplication with the conversions API |
| 6. Test and publish | Preview mode, then publish the container | Check each event before publishing |
The events to configure
| Standard event | When | Useful parameters | Who for |
|---|---|---|---|
| PageView | Every page | None | Everyone |
| ViewContent | Product page, service page | content_ids, content_name, value | E-commerce, services |
| Lead | Form submitted, call clicked | value (estimated value of a contact) | Services, B2B |
| CompleteRegistration | Sign-up, account creation | status | SaaS, newsletter |
| AddToCart, InitiateCheckout | Add to basket, start of payment | content_ids, value, currency | E-commerce |
| Purchase | Order confirmation page | value, currency, content_ids (mandatory) | E-commerce |
| Schedule, Contact | Appointment booked, contact | None | Local, services |
Use the standard events rather than custom events: they are the ones campaigns can optimise for. A services site configures PageView, ViewContent and Lead as a minimum; an e-commerce site adds the basket-to-purchase chain with the values.
The conversions API: essential
The browser pixel loses a growing share of events: ad blockers, Safari and iOS limiting cookies, consent refusals. Theconversions API (CAPI) sends the same events from your server or through an integration (Shopify, WooCommerce, PrestaShop, server-side GTM, or Meta's “gateway” integration). Meta deduplicates events received twice thanks to the shared event ID. Advertisers who switch it on generally recover 10 to 30% additional conversions and improve the event match quality score, which lowers the cost per result. On an e-commerce CMS, the native integration takes a few clicks; on a brochure site, the hosted Meta gateway or server-side GTM are the options.
Consent and GDPR
- The pixel drops advertising cookies: it is subject to prior consent (the French regulator). No event must fire before agreement.
- In GTM, add a consent condition to the Meta tags (parameter
ad_storagegranted, or your CMP's consent event); the mechanism is described in Consent Mode v2 with GA4 and GTM. - Switch on Limited Data Use if you have visitors from certain US states; no effect for France.
- Declare the pixel and the conversions API in the privacy policy, with the purpose and the retention period.
Checking the installation
- Meta Pixel Helper (Chrome extension): on each key page, the pixel must appear once only, with the expected events and no warning.
- Events Manager, “Test events” tab: enter your site URL, perform the actions, and check that each event comes through with its parameters and that the browser and server events are deduplicated.
- Diagnostics: the Manager flags missing parameters, duplicates and deduplication problems.
- Event match quality score: a mark out of 10 for each event; above 6, the match is correct; the conversions API with hashed email and phone improves it.
- Consistency with GA4: compare the number of Lead or Purchase events with the GA4 key events over the same period; a gap of 10 to 20% is normal, more than that signals a problem; see GA4 and social ads.
The frequent mistakes
- Two pixels on the same pages (one in the theme, one in GTM): duplicate events.
- Purchase with no value and no currency: ROAS is impossible to calculate and value optimisation does not work.
- Lead fired on the button click rather than on successful submission: inflated conversions.
- A pixel that fires before consent: non-compliant, and a different count from GA4.
- No conversions API: a loss of 10 to 30% of conversions and incomplete audiences.
How GreenRed helps
Rather than juggling several tools, GreenRed's social media tracking brings these metrics together in a single dashboard, compares them over time and tells you which actions come first. You can try it free, with no card, from the Pricing.
Frequently asked questions
Do you still need to install the Meta pixel with the conversions API?
Yes, both together. The browser pixel remains the simplest and most complete source for visitors who accept cookies; the conversions API recovers what the browser loses (blockers, Safari, refusals). Meta recommends the hybrid setup with deduplication by event ID.
Is the Meta pixel GDPR compliant?
It is, provided it only fires after the user has consented to advertising cookies, is declared in the privacy policy and does not transmit sensitive data. Deployment through Google Tag Manager with a consent condition is the safest method.
What is the difference between a pixel and a dataset?
None in substance: Meta has renamed the pixel a “dataset” in Events Manager, to group web (pixel), server (conversions API), app and offline events under a single ID. The code and the ID stay the same.
How do you know whether the pixel is double counting?
Meta Pixel Helper shows the pixel twice on a page, or Events Manager reports a number of PageView events higher than GA4's page views. The usual cause is a pixel in the site theme or in a plugin, on top of the one in GTM; remove one of the two.