Meta Pixel

The Meta Pixel, once called the Facebook Pixel, is a snippet of code on your website that reports what visitors do after seeing your Facebook or Instagram ads.

Checked 27/11/2026 against 5 sources. Next review 27/05/2027.

The Meta Pixel is a snippet of JavaScript code that loads a small library of functions you can use to track Facebook ad-driven visitor activity on your website [1]. It relies on Facebook cookies to match your visitors to their Facebook accounts, then counts their actions in Ads Manager so you can judge your conversion flow and tune your campaigns [1]. Many people still search for it as the Facebook Pixel. It is the Meta counterpart to a GA4 tag and feeds conversion tracking, remarketing audiences and lookalike audience targeting.

What does the Meta Pixel base code look like?

Meta's base code contains your Pixel ID in two places. You find it in Events Manager [1]. It also calls the PageView event on load, and Meta recommends you leave that call intact [1].

<!-- Facebook Pixel Code -->
<script>
  !function(f,b,e,v,n,t,s)
  {if(f.fbq)return;n=f.fbq=function(){n.callMethod?
  n.callMethod.apply(n,arguments):n.queue.push(arguments)};
  if(!f._fbq)f._fbq=n;n.push=n;n.loaded=!0;n.version='2.0';
  n.queue=[];t=b.createElement(e);t.async=!0;
  t.src=v;s=b.getElementsByTagName(e)[0];
  s.parentNode.insertBefore(t,s)}(window, document,'script',
  'https://connect.facebook.net/en_US/fbevents.js');
  fbq('init', '{your-pixel-id-goes-here}');
  fbq('track', 'PageView');
</script>
<!-- End Facebook Pixel Code -->

Meta recommends placing it between the opening and closing head tags on every page where you track visitor actions. That reduces the chance of browsers or third-party code blocking it, and runs it sooner [1]. It works in most tag managers too, including Google Tag Manager, though Meta still recommends the direct install [1].

Which events can I track with the Pixel besides page views?

There are three ways to track conversions with the Pixel: standard events, custom events and custom conversions [2]. Standard events are predefined visitor actions such as searching for a product, viewing a product or purchasing a product [2]. You report one by calling fbq('track') with the event name and, optionally, parameters [2].

fbq('track', 'Purchase', {currency: "SGD", value: 30.00});

Meta's own example uses USD with a value of 30.00 [2]. For a Singapore shop you would pass SGD as the currency. Fire the call on the order confirmation page or when the buy button is clicked, after the base code is already installed [2].

Why does Meta suggest the Conversions API alongside the Pixel?

The Conversions API sends events from your own server, website platform, app or CRM straight to Meta, instead of relying only on the visitor's browser [3]. Server events are processed like Pixel events, and they can feed measurement, reporting and optimisation in a similar way [3]. Meta recommends using it alongside the Pixel, which it calls a redundant setup [4].

If you send the same event both ways, you must set up deduplication so Meta can tell the copies apart. The recommended method adds an event_id to both, and the Pixel's event name must match the API's event_name [4]. If you never send the same event twice, you do not need deduplication [4].

  • Pixel's eventID must equal the Conversions API event_id [4].
  • Pixel's event name must equal the API's event_name [4].
  • If you already have a Pixel, Meta says you can switch on the Conversions API for website events in one click from Events Manager [3].

Does the Meta Pixel collect personal data under Singapore's PDPA?

The Pixel matches visitors to Facebook accounts through cookies [1]. The PDPC's guidelines say data counts as personal data if it is about an individual who can be identified from that data on its own, or from that data and other information the organisation has or is likely to have access to [5]. The same guidelines say an organisation must get consent before collecting, using or disclosing personal data for a purpose [5]. The guidelines do not mention the Pixel or cookies by name. For the full rules, start with the PDPA guide. Related terms: PDPA, cookie consent.

Questions people ask

Is the Facebook Pixel the same as the Meta Pixel?

Yes. Meta's current documentation calls it the Meta Pixel, while its sample code still carries the comment Facebook Pixel Code [1]. If a guide mentions the Facebook Pixel, it means the same snippet.

How do I know the Meta Pixel is working?

Load a page that has the Pixel, then open your Pixel's details in Events Manager. A new PageView event means it is installed. If you do not see it, wait a few minutes and refresh, then try Meta Ads Data Advisor [1].

Can I install the Pixel through Google Tag Manager?

Yes. Meta says the Pixel works in most tag management solutions, but recommends adding it straight to the head tags. Follow your tag manager's own documentation for the steps [1].

Blog posts that use this term

See also

  • Conversion tracking Conversion tracking records when a visitor does something you care about, such as sending a form or tapping WhatsApp, and ties it back to the ad that brought them.
  • Google Tag Manager Google Tag Manager is a web tool from Google that lets you add and change the tracking tags on your website without editing the site's code each time.
  • GA4 GA4 is the current version of Google Analytics, which records what visitors do on your website and app as events and shows them in reports.
  • Remarketing Remarketing is showing ads to people who have already visited your website, used your app or given you their details.
  • Lookalike audience A lookalike audience is a Meta ads audience of new people who share characteristics with the customers or contacts you already have.
  • PDPA The PDPA is Singapore's Personal Data Protection Act, the law that sets rules for how organisations collect, use, disclose and look after personal data.

References

  1. Get started with the Meta Pixel, Meta for Developers. Read 27/11/2026.The Meta Pixel is a snippet of JavaScript code that loads a small library of functions you can use to track Facebook ad-driven visitor activity on your website.
  2. Conversion Tracking, Meta for Developers. Read 27/11/2026.predefined visitor actions that correspond to common, conversion-related activities, such as searching for a product, viewing a product, or purchasing a product.
  3. Conversions API, Meta for Developers. Read 27/11/2026.Server events are linked to a dataset ID and are processed like events sent using the Meta Pixel
  4. Handling Duplicate Pixel and Conversions API Events, Meta for Developers. Read 27/11/2026.Advertisers who do not send the same event twice via both the Conversions API and Meta Pixel do not need to set up deduplication for those events.
  5. Advisory Guidelines on Key Concepts in the PDPA, PDPC Singapore. Read 27/11/2026.An organisation must obtain the consent of the individual before collecting, using or disclosing his personal data for a purpose.