Circle Separator4 mins read

How to Create a Meta Pixel

A Meta Pixel is browser-based code that records actions people take on a website, including page views, leads, purchases and product views. Meta uses this data to measure advertising results, build audiences and optimize campaigns.

This guide covers 9 setup steps. Meta may label the web data source as a dataset in some parts of Business Suite because it now groups web, app and server-side event data under datasets.

Creating a Meta Pixel at a Glance

StepWhat to do
1Sign in to Meta Business Suite
2Open Events Manager
3Select Connect data sources
4Choose Web
5Select Meta Pixel or the equivalent web dataset option
6Enter your pixel name and website URL
7Copy the Pixel ID or choose an installation method
8Install the pixel on your website
9Test events in Events Manager

1. Open Meta Events Manager

Sign in to the Meta Business account that owns or manages the relevant Facebook Page, Instagram account or advertising assets.

Open Events Manager from Meta Business Suite. Depending on the interface, you may find it under All tools, Events Manager or Business settings.

Look for one of these options:

  • Connect data sources
  • Connect data
  • Add data source
  • Data sources
  • Datasets and pixels

Meta changes its navigation and labels from time to time. The setup starts by connecting a Web data source.

2. Choose Web as the Data Source

Select Web when Meta asks what you want to connect.

Choose Connect or Get started, then select the Meta Pixel option if Meta shows more than one connection method. Some accounts create the pixel as part of a new dataset rather than showing a separate pixel record.

3. Name Your Meta Pixel

Use a name that identifies the business and website.

Examples:

  • Acme Dental Website
  • Northstar Clothing Store
  • Bright Legal Services Website

Use a business or website name instead of a campaign name. One pixel can support measurement and campaign optimization across multiple campaigns for the same website.

Select Create, Continue or the equivalent confirmation button.

Meta then creates the data source and provides a unique Pixel ID. Save the ID because your website platform, developer or tag manager may need it during installation.

4. Enter Your Website Address

Enter the full website URL when Meta requests it.

Meta may use the address to identify available partner integrations, including Shopify, WordPress and other supported platforms. If your platform supports a direct integration, it is usually easier than editing the website code yourself.

5. Install the Meta Pixel on Your Website

Creating a Meta Pixel does not start website tracking by itself. You must install the pixel before Meta can receive browser events.

You have three common installation options.

Use a Partner Integration

Choose a partner integration when your website uses a supported platform such as Shopify.

For Shopify, install or open the Facebook and Instagram by Meta sales channel. Connect the correct Meta business assets, then select or create the pixel in the data-sharing settings.

Shopify warns that adding another pixel manually after using its integration can create duplicate or inaccurate reporting.

Other website builders and ecommerce platforms may provide their own Meta Pixel field or integration. Use the platform integration when it is available.

Add the Base Code Manually

Choose Do it yourself or Manual setup in Meta's installation flow.

Meta provides a JavaScript base code snippet. Add it to the <head> section of every page, or place it in the global header so it loads across the site. Framer's implementation guide describes copying the base code into the beginning of the site's <head> tag and republishing the site.

The base code normally records a standard PageView event. Actions such as purchases and lead submissions require event configuration.

Use Google Tag Manager

If the website uses Google Tag Manager, add the Meta Pixel base code as a custom HTML tag.

Set the tag to fire on the relevant pages, publish the container and test the implementation in Events Manager. Google Tag Manager lets you manage the tag without editing the website templates each time.

6. Configure the Events That Matter

The base pixel can record page visits, but most advertising campaigns also need events tied to customer actions.

EventWhen to use it
ViewContentSomeone views a product or service page
SearchSomeone searches the website
AddToCartSomeone adds an item to a cart
InitiateCheckoutSomeone starts checkout
PurchaseSomeone completes a purchase
LeadSomeone submits a lead form
CompleteRegistrationSomeone completes a registration
ContactSomeone takes a contact action

You can configure events through:

  1. A website platform integration
  2. Meta's Event Setup Tool
  3. Manual event code
  4. Google Tag Manager
  5. A server-side Conversions API integration

For an ecommerce website, start with ViewContent, AddToCart, InitiateCheckout and Purchase. For a lead-generation website, prioritize Lead, Contact or the event that represents a completed booking.

7. Test Whether the Meta Pixel Works

After installing the pixel:

  1. Open Events Manager.
  2. Select the relevant dataset or pixel.
  3. Open the Test Events tab.
  4. Enter your website URL.
  5. Open the website in the new browser window.
  6. Trigger the actions you want to measure.
  7. Check whether the events appear in Meta.

Test the main customer actions separately:

  • Load the homepage
  • Open a product or service page
  • Submit a form
  • Add a product to the cart
  • Start checkout
  • Complete a test purchase, if possible

Meta should show incoming activity when the browser sends events successfully. Framer also recommends testing events in Events Manager and notes that browser extensions such as ad blockers can prevent test activity from appearing.

Meta Pixel Versus Conversions API

The Meta Pixel sends website activity from the visitor's browser to Meta. Conversions API sends event data from your server or another trusted system.

Conversions API is not required to create a Meta Pixel. Many businesses use both to improve event coverage when browser restrictions, ad blockers or cookie limits prevent some browser events from being received.

If both systems send the same event, configure event deduplication. Without deduplication, Meta may count one purchase or lead twice.

Common Meta Pixel Setup Problems

The Pixel Is Not Detecting Activity

Check that:

  • The Pixel ID is correct.
  • The code is installed on the published website.
  • The code loads on the page being tested.
  • Your ad blocker is disabled during testing.
  • You are testing the correct dataset or pixel.
  • A cookie-consent tool has not blocked the script before consent.

Events Are Duplicated

Duplicate events often occur when a website uses both a platform integration and manually added pixel code.

Remove the duplicate installation and keep one controlled implementation. Shopify specifically warns that using its Meta integration alongside separately added pixel code can create duplicate or incorrect data.

The Purchase Value Is Missing

A Purchase event should send the transaction value and currency. If the event fires without those parameters, Meta may record the conversion but report incomplete revenue data.

Check the ecommerce platform integration or purchase-event code. Do not add a second pixel to fix the problem.

The Pixel Exists but Cannot Be Selected for Ads

Confirm that:

  • The pixel or dataset belongs to the correct Meta business portfolio.
  • Your ad account has access to the data source.
  • Your user account has the required business permissions.
  • The website domain and event configuration meet Meta's requirements.

How Many Meta Pixels Should You Create?

For most websites, create one clearly named Meta Pixel or web dataset and install it once through the website platform or global site header.

Do not create a new pixel for every advertising campaign. Create another data source only when you have a separate business, website or data ownership requirement.

Next Read