
What is
Meta Pixel?
Meta Pixel and Conversions API measure what happens after the ad click. Here is how to set up tracking correctly and in line with consent.
Meta Pixel is a JavaScript code placed on the website that sends information to Meta when visitors take certain actions, such as viewing a product, adding to cart or buying. Conversions API, often abbreviated CAPI, sends the same events directly from the website's server to Meta. Together they give more complete measurement of your ads.
The data is used for three things: measuring campaign results, building audiences for remarketing and lookalike, and giving the algorithm signals so it can find more people likely to convert.
The pixel runs in the browser and is affected by ad blockers, browser restrictions and missing consent. Conversions API is a form of server-side tracking and is less vulnerable to such losses. Meta therefore recommends using both:
Pixel captures behaviour in the browser, such as page views and clicks.
Conversions API ensures that important events such as purchases and leads get through.
Deduplication: the same event is sent with a shared event ID, so Meta does not count it twice.
Match quality: the more hashed customer data, such as email, sent with consent, the better Meta can link the event to the right user.
Define which events matter: standard events such as Purchase, Lead, AddToCart and CompleteRegistration.
Install the pixel via Google Tag Manager, a platform integration or code.
Set up Conversions API via a platform integration, server-side GTM or a partner solution.
Send value and currency with purchases, so you can measure ROAS.
Test in Events Manager and check that deduplication works.
Connect everything to the consent solution.
In Norway and the EU, using such tracking tools normally requires the user's consent, and cookies for marketing must not be set before consent is given. Server-side tracking does not exempt you from the consent requirement.
Double purchases because deduplication is missing.
Events sent on the wrong page, for example a purchase when the cart loads.
Missing value on purchase events, which makes value-based optimisation impossible.
Tracking that starts before consent is given.
Correct tracking is often the single measure that gives the biggest lift in results for advertising on Meta, because the algorithm gets better signals about each conversion.
Server-side tracking: tracking via your own server, of which Conversions API is an example.
Paid social: the advertising the pixel measures and optimises.
Conversion: the action you want visitors to take, and which the pixel records.
Cookies: the technology the pixel uses in the browser, which requires consent.
See all the terms in the glossary.