How to Add the Meta Pixel (Facebook Pixel) to Your Website

Create a pixel in Meta Events Manager, copy its ID, then put the base code in the head of every page, or use your builder's own Meta connection. The base code logs a PageView on each load. Add standard events such as Lead or Purchase for the actions you pay to get, then confirm them in Events Manager.

Which Meta standard event fits which goal
Your goalStandard eventFires when
Contact or quote formLeadThe thank-you message or page appears
Newsletter signupSubscribeThe signup succeeds
Booking a callScheduleThe booking is confirmed
Online shop salePurchaseThe order confirmation loads
Account creationCompleteRegistrationThe new account exists

Updated

The Meta Pixel, still called the Facebook Pixel by most people, tells Meta which ad clicks turned into leads or sales, so Facebook and Instagram ads can be measured and optimised. It is a small script plus one ID. Getting it on the page takes minutes; choosing events that match your real goals is what makes it useful.

Add the Meta Pixel on We.Inc, WordPress, Wix, Squarespace or plain HTML

We.Inc

  1. Open your site in the builder, click the "..." menu and choose Add-ons.
  2. Find Meta Pixel and paste the pixel ID from Events Manager.
  3. Flip its switch on; the panel confirms it saved and goes live at your next publish.
  4. Publish, then open the live site and check Events Manager for a PageView.

Custom events such as Lead on a specific form are not a field in Add-ons. Ask in the AI chat for the event you want on the page you want; chat edits use credits on a paid plan.

WordPress

  1. In WP Admin go to Plugins, then Add Plugin, and search for Meta pixel for WordPress (published by Facebook).
  2. Install and activate it, then open its settings page and click Get Started.
  3. Sign in to Meta and pick the pixel to connect; the plugin also supports the Conversions API.
  4. Visit your site and confirm events in Events Manager.

The Meta plugin needs a paid WordPress.com plan (Personal, Premium, Business or Commerce) if your site is hosted there.

Wix

  1. Verify your domain with Meta first.
  2. In the site dashboard open Marketing Integrations.
  3. Under Meta Pixel & CAPI click Connect, then Connect to Facebook.
  4. Sign in, grant the Wix Marketing Tools permissions and click Done.

Wix requires a premium plan and a connected domain for this integration.

Squarespace

  1. Open the Code Injection panel (listed under Custom Code at the bottom of the Pages panel).
  2. Paste the Meta base code into the Header box and save.
  3. For an event on one page, open that page's settings (gear icon), go to Advanced, and paste the event call there.

Code Injection is only on the Core, Plus and Advanced plans (and some legacy plans), and does not run on checkout pages.

Plain HTML

  1. Copy the base code from Events Manager.
  2. Paste it just before </head> on every page.
  3. Add fbq('track', 'Lead') or another event on the page or callback where the goal completes.
  4. Upload the files and test with Meta Ads Data Advisor.

Firing a standard event after the base code

This assumes the base code is already in the head. Put the event call only on the success page, such as the form's thank-you page.

<script>
  fbq('track', 'Lead');
</script>

Sources

  • Meta for Developers, Meta Pixel get started: https://developers.facebook.com/docs/meta-pixel/get-started (checked October 28, 2026, used for the Meta Pixel steps)
  • Meta for Developers, standard events reference: https://developers.facebook.com/docs/meta-pixel/reference (checked October 28, 2026, used for the Meta Pixel steps)
  • Meta for Developers, Meta Ads Data Advisor: https://developers.facebook.com/documentation/meta-pixel/support/meta-ads-data-advisor (checked October 28, 2026, used for the Meta Pixel steps)
  • WordPress.org, Meta pixel for WordPress plugin: https://wordpress.org/plugins/official-facebook-pixel/ (checked October 28, 2026, used for the Meta Pixel steps)
  • Wix Help Center, connecting a Facebook Pixel and the Conversions API: https://support.wix.com/en/article/connecting-a-facebook-pixel-and-the-conversions-api-to-your-wix-site-7351813 (checked October 28, 2026, used for the Meta Pixel steps)
  • Squarespace Help Center, using code injection: https://support.squarespace.com/hc/en-us/articles/205815908-Using-code-injection (checked October 28, 2026, used for the Meta Pixel steps)
  • WordPress.com Support, install a plugin: https://wordpress.com/support/plugins/install-a-plugin/ (checked October 28, 2026, used for the Meta Pixel steps)

Pixel, events and the Conversions API

The pixel runs in the visitor's browser. Ad blockers and browser privacy settings stop some of those signals, which is why Meta also offers the Conversions API: your server or your platform sends the same events directly. Many sites run both and let Meta remove the duplicates.

Meta lists 17 standard events, from AddToCart to SubmitApplication. Use a standard name whenever one fits, because ad optimisation and reporting understand them without extra setup. Custom events are for actions none of the 17 describe.

Consent before you switch it on

The pixel sets advertising cookies, so visitors in the EU and UK must agree before it loads. Put a consent banner in front of it; our guide on how to add a cookie banner to a website (/guides/how-to-add-cookie-banner-to-website) covers the options.

Meta also restricts what you may send: no health details, no financial account data, nothing that identifies a person in the URL or event parameters.

How it works

  1. Open Meta Events Manager, create a dataset or pixel for your site, and copy the numeric pixel ID.
  2. Add the base code or the ID to every page through your platform's integration.
  3. Pick one or two standard events that match what you sell and fire them on the success step.
  4. Load the site, accept cookies, and watch the events arrive in Events Manager's test view.
  5. Turn on the Conversions API if your platform offers it, so blocked browser events are still counted.

Tips

  • Meta's Chrome checker is now called Meta Ads Data Advisor (formerly Meta Pixel Helper); it lists every pixel and event a page fires.
  • Fire Lead on the confirmation step, not on the button click, or abandoned forms will count as leads.
  • Two copies of the base code double every PageView. If you used a platform integration, remove any pasted code.
  • Wix asks you to verify your domain with Meta before its Pixel and CAPI connection will work, so do that first.

Frequently asked questions

Is the Facebook Pixel the same as the Meta Pixel?

Yes. Meta renamed it when the company changed its name. The code, the ID and Events Manager are unchanged, and older tutorials still use the old name.

Where does the Meta Pixel code go?

Meta recommends the head section of every page you track, so it loads early and catches visitors who leave quickly. Builders that offer a pixel field place it there for you.

Do I still need the pixel if I use the Conversions API?

Meta suggests running both. The browser pixel captures on-page detail; the server events fill gaps from blockers. Send a matching event ID with each so duplicates are merged.

Why does Events Manager show no activity?

Common causes are a consent banner that was never accepted during your test, a typo in the ID, an unpublished site, or an ad blocker in your own browser. Test in a clean browser window.

Related: How to add a cookie banner, Google Ads conversion tracking, How to add Google Tag Manager, UTM builder, Privacy policy generator.

Start for free or see all free tools. We.Inc is free to start, with no card needed. AI building is on paid plans from $20 a month.

More in Guides

Product

Who It's For

Features

Resources

Company

View Sitemap