Skip to content
Strategy

How to Set Up Meta Pixel (Formerly Facebook Pixel)

If you’re using Facebook ads, there’s one tool you should start using to get the most out of your social ad budget: the Facebook pixel (now Meta Pixel).

Christina Newberry February 18, 2022 9 min read
cover illustration

One of the greatest benefits of social media advertising is the ability to test, track, refine and target your ads with laser precision. The Facebook pixel is a data-gathering tool that helps make the most of your ads across Facebook and Instagram.

As of February 2022, Facebook Pixel changed its name to Meta Pixel. You will see it referred to with both names throughout this article.

If you use Facebook or Instagram ads now, or plan to use them at any point in the future, the Facebook pixel (or Meta pixel) is a must-use tool. Read on to learn how it works.

Bonus: Get the Facebook advertising cheat sheet for 2022. The free resource includes key audience insights, recommended ad types, and tips for success.

What is the Facebook pixel (a.k.a. Meta pixel)?

The Facebook pixel is a piece of code that you place on your website. It collects data that helps you track conversions from Facebook ads, optimize ads, build targeted audiences for future ads and remarket to people who have already taken some kind of action on your website.

How does the Facebook pixel work?

The Facebook pixel works by placing and triggering cookies to track users as they interact with your business both on and off of Facebook and Instagram.

For example, I recently spotted a very cute bathmat in the Instagram Stories of interior design YouTuber Alexandra Gater. (At the time, I was thinking about my decorating my apartment, not the Facebook pixel, so I didn’t screencap – you’ll just have to trust me on this.)

I swiped up to check out the bathmat and even added it to my shopping cart. Then I got distracted by thinking about breakfast and put down my phone.

The next time I opened up Instagram, this ad popped up in Stories:

Instagram Stories Baba Souk ad

Source: Baba Souk on Instagram

And, sure enough, the next time I headed to Facebook on my laptop…

Facebook Baba Souk ad

Source: Baba Souk on Facebook

This is called retargeting. It’s a handy way for marketers to remind shoppers to come back and buy all those items they leave in various shopping carts across the web.

Remarketing is not the only function of the Facebook pixel. It’s also important for tracking, analytics, and overall ad optimization.

The pixel tracks various actions people take on your website, like making a purchase or adding something to their shopping cart. Facebook calls these actions “events.”

Facebook pixel standard events

The 17 standard Facebook pixel events for which you can simply copy and paste Facebook event code are:

  • Purchase: Someone completes a purchase on your website.
  • Lead: Someone signs up for a trial or otherwise identifies themselves as a lead on your site.
  • Complete registration: Someone completes a registration form on your site, such as a subscription form.
  • Add payment info: Someone enters their payment information in the purchase process on your website.
  • Add to cart: Someone adds a product to their shopping cart on your site.
  • Add to wishlist: Someone adds a product to a wishlist on your site.
  • Initiate checkout: Someone starts the checkout process to buy something from your site.
  • Search: Someone uses the search function to look for something on your site.
  • View content: Someone lands on a specific page on your website.
  • Contact: Someone contacts your business.
  • Customize product: Someone selects a specific version of a product, such as choosing a certain color.
  • Donate: Someone makes a donation to your cause.
  • Find location: Someone searches for your business’s physical location.
  • Schedule: Someone books an appointment at your business.
  • Start trial: Someone signs up for a free trial of your product.
  • Submit application: Someone applies for your product, service, or program, such as a credit card.
  • Subscribe: Someone subscribes to a paid product or service.

You can also add more details to standard events using extra bits of code called parameters. These allow you to customize the standard events based on factors like:

  • How much a conversion event is worth
  • Currency
  • Content type
  • Predicted long-term value

For example, you could use the Facebook tracking pixel to record views of a specific category on your website, instead of tracking all views. Perhaps you want to separate dog owners from cat owners based on which sections of your pet supply website they viewed.

The Facebook pixel and iOS 14.5

Because of changes to third-party tracking in iOS 14.5, some Facebook pixel functionality will be disabled for updated Apple devices. Before you panic, consider that only 14.7% of mobile Facebook users access the social network using iOS devices.

Still, changes to accommodate the iOS 14.5 requirements will impact all advertisers. One major change is that advertisers can only set up a maximum of eight standard events and custom conversions.

Advertisers will certainly have to change the way they think about the Facebook pixel as these changes take effect. We’ll address specific limitations and changes you need to know throughout this post.

Facebook pixel setup

Now that you know what you can track, and why you would want to do so, it’s time to create your Facebook pixel and put it to work on your website.

Step 1: Create a Facebook pixel

1. From your Facebook Events Manager, click Connect to Data Sources in the left-hand menu, then select Web. Click Get Started to continue.

Facebook events manager connect a new data source web

Source: Facebook Events Manager

2. Select Facebook Pixel, then click Connect.

Facebook pixel connect

Source: Facebook Events Manager

Name your pixel, enter your website URL, and click Continue.

connect website activity using Facebook pixel

Source: Facebook Events Manager

When choosing the pixel’s name, keep in mind that with Events Manager, you only get one pixel for each ad account. The name should represent your business, rather than a specific campaign.

If you want to use more than one pixel per ad account, you can do so using Facebook Business Manager.

Step 2: Add the Facebook pixel code to your website

To put the pixel to work gathering information on your website, you now need to install some Facebook pixel code on your web pages.

There are a few ways to do this depending on what website platform you use.

install Facebook pixel code on web page

Source: Facebook Events Manager

  • If you use one of Facebook’s integration partners, like WordPress or SquareSpace, choose Use a Partner Integration. This will walk you through a series of steps to connect your Facebook pixel without any coding.
  • If you work with a developer or someone else who can help you edit your website code, click Email Instructions to send your developer everything they need to install the pixel.
  • If neither of the above options applies, you need to insert the pixel code directly into your web pages. That’s what we’ll walk you through in this section.

1. Click Install code manually.

2. Click the green Copy Code button.

copy base code

Source: Facebook Events Manager

3. Paste the pixel code into the header code of your website, just above the </head> tag. You need to paste it into every single page, or into your header template if you’re using one. Click Continue.

4. Choose whether to use automatic advanced matching. This option matches hashed customer data from your website to Facebook profiles. This lets you track conversions more accurately and create larger custom audiences. Then click Continue.

automatic advanced matching

Source: Facebook Events Manager

Step 3: Set up Facebook pixel events

1. Click the Open Event Setup Tool button.

add events using event setup tool

Source: Facebook Events Manager

Choose your Facebook pixel ID, then click Settings and scroll down to Open Event Setup Tool.

open event setup tool

Source: Facebook Events Manager

2. Enter your URL and click Open Website.

setup events open website

Source: Facebook Events Manager

3. Facebook will provide a list of suggested events. Click Review next to each event, then choose to Confirm or Dismiss. Click Finish Setup to continue.

If you’re interrupted in your pixel setup, you can always come back to this later by going to Events Manager.

Step 4: Confirm your pixel is working with the Facebook pixel helper

Before you start relying on the data from your Facebook pixel, you should confirm that it’s tracking properly.

1. Add the Facebook Pixel Helper extension to your Google Chrome browser. (It’s only available for Chrome, so if you use a different browser, you’ll need to install Chrome to use the Pixel Helper.)

Facebook Pixel Helper Google Chrome extension

Source: Chrome Web Store

2. Visit the page where you have installed the Facebook pixel. A popup will indicate how many pixels it finds on the page. The popup will also tell you if your pixel is working properly. If not, it will provide error information so you can make corrections.

Facebook pixel error information pop-up

Source: Facebook Pixel Helper

Step 5: Add a Facebook pixel notice to your website

To comply with Facebook’s terms (and, in some cases, the law), you need to make sure visitors to your website know you’re collecting their data.

That means you need to provide clear notice that you’re using the Facebook pixel and that their information may be collected through cookies or other methods. You also need to let users know how they can opt out of having their data collected.

To get all the details, go to the Facebook Business Tools Terms and scroll down to point 3: Special Provisions Concerning the Use of Certain Business Tools. Or, check out Facebook’s Cookie Consent Resource.

Why should you install the Facebook pixel?

Increase the ROI on your Facebook ad spend

Facebook pixel data helps ensure your ads are seen by the people who are most likely to take your desired action. This allows you to improve your Facebook ad conversion rate and get better ROI.

Even if you’re not using Facebook or Instagram ads yet, you should install the Facebook pixel now. It will start collecting data right away so that you don’t have to start from scratch when you’re ready to create your first Facebook ad.

Use Facebook conversion tracking

The Facebook pixel allows you to see how people interact with your website after viewing your Facebook ad.

You can even track customers across their devices. This is why I saw an ad for the bathmat on my laptop, even though I added to it the shopping cart on my phone.

This lets you see if people tend to see your ads on mobile but switch to a desktop before buying. Or, maybe it’s the other way around. This information can help you refine your ad strategy and calculate your return on investment.

This Facebook pixel function is impacted by the iOS 14.5 change, but Facebook will ensure advertisers still get some conversion tracking data through its Aggregated Event Measurement.

To ensure you continue to get the best conversion tracking data, you need to verify your website domain. You also need to stick to one domain for conversion tracking, since iOS 14.5 won’t allow tracking across multiple domains.

Use Facebook retargeting

Facebook retargeting pixel data and dynamic ads allow you to show targeted ads to people who have already visited your site. You can choose to get really granular here.

For example, you can show people an ad for the exact product that they abandoned in a shopping cart or added to a wishlist on your website – as happened with the bathmat I was ogling earlier.

Retargeting audiences will shrink as more people update to iOS 14.5. But they won’t disappear.

Create lookalike audiences

Facebook can use its targeting data to help you build a lookalike audience of people who have similar likes, interests, and demographics to people who are already interacting with your website. This can help expand your potential customer base.

iOS 14.5 will affect the input data for lookalike audiences, because the tracked audience the lookalike is based on will shrink. However, because iOS users are in the minority, the lookalike functions will still have plenty of information to work with. You won’t likely notice a major change to functionality here.

Optimize Facebook ads for value

As Facebook collects data on who buys from your site and how much they spend, it can help optimize your ad audience based on value. That means it will automatically show your ads to the people who are most likely to make high-value purchases

Enhance Facebook pixel data with Conversions API

To help counter the data-loss effects of iOS14.5 changes, Facebook introduced Conversions API. Rather than relying on cookies and web and mobile browsers for data, Conversions API collects information directly from your servers.

By combining Conversions API with the Facebook pixel, you’ll have access to more reliable data, even as the pixel loses information.

If you’re using one of Facebook’s integration partners, like Shopify or WooCommerce, you can turn Conversions API on without writing any code.

1. From Events Manager, click Data Sources in the left column, then click Settings in the top menu.

Events manager data sources

Source: Facebook Events Manager

2. Scroll down to the Conversions API section and click Choose a Partner.

conversions API choose a partner

Choose your partner and follow the steps. Facebook also provides detailed instructions for setting up the Facebook pixel Shopify Conversions API integration.

If you don’t use one of Facebook’s integration partners, you’ll have to create some code, and you’ll likely need to work with a developer. Follow Facebook’s detailed steps for implementing Conversions API manually.

Conversions API can help fill in data your Facebook pixel is missing. For example, in late 2020, the bedding company Lull found their pixel was missing about 8% of purchase events.

Once they added Conversions API, they were able to track nearly 100% of purchase events. They also saw a 12.9% reduction in cost per action on a one-day click, one-day view attribution window.

Publish and analyze your Facebook, Instagram, and LinkedIn ads alongside your regular social media content with Hootsuite Social Advertising. Stop switching from platform to platform and get a complete view of what’s making you money. Book a free demo today. 

Request a Demo

Paid 🤝 Organic

Easily plan, manage and analyze ads and organic content from one place with Hootsuite Social Advertising. See it in action.

Free 30-day trial

Become a better social marketer.

Get expert social media advice delivered straight to your inbox.

By Christina Newberry

Christina Newberry is an award-winning writer and editor whose greatest passions include food, travel, urban gardening, and the Oxford comma—not necessarily in that order.

Related Articles