Facebook Pixel: How to Create Better Facebook Ads for More Conversions

Woman looking at phone

If you find Facebook advertising pretty confusing, know that you’re not alone. 

All its features make it a very powerful advertising platform, but they also add complexity. One of the things I used to get particularly frustrated by is pixels.

Pixels are common across most advertising platforms. They’re used to drop a cookie that will track visitors on your website so you can advertise to them later. This is called sequential retargeting. Once you advertise to past website visitors, the Facebook Pixel can also be used to track their behavior when they return.

Use this walkthrough to learn more about what the Facebook Pixel is, how to create a pixel, and different ways to use a pixel to improve conversions and drive ROI for your ads. 

What is the Facebook Pixel?

The Facebook Pixel is an analytics tool that helps you measure how effective your Facebook ad campaigns are by monitoring the actions people take on your website. 

The Facebook Pixel is a piece of code that tracks events on:

  • Page views
  • Add to cart
  • Purchase
  • Scroll depth
  • Time on page
  • and more

Discover different events to track in this Facebook Pixel Events guide from Facebook.

The Facebook Pixel helps you optimize your ads and make sure they are shown to the right audience. You can also use the pixel to improve your Facebook retargeting and remarket to people who have visited a specific page or taken a desired action on your website. 

In short, the Facebook Pixel helps you better understand the impact of your ads by understanding what people do after they see them. So you can reach people more likely to take meaningful action, like purchasing a product. 

Social media strategy and planning templates

Ready to get started with your social media strategy? These free, customizable templates give you tools to plan and execute a strategy that connects you with your target audience while keeping your content calendar organized.

How does the Facebook Pixel work?

Facebook used to have a custom audience pixel for retargeting website visitors and conversion pixels for tracking website conversions such as sales. While each advertising account had only one custom audience pixel, you could create many conversion pixels—one for each web page you wanted to track conversions on.

Although Facebook pixels can be confusing, they make advertising on Facebook much more effective. Not only do they tell you exactly who you’re advertising to, they give you a better understanding of how your Facebook ads are performing. All in all, you can use them to make your messaging much more effective, leading to a better return on your advertising dollars.

In 2015, Facebook simplified this process by introducing a new single Facebook Pixel to replace the older ones, making it the only tracking pixel you now need. The Facebook Pixel was updated again in 2017 to make advertising on the platform easier and more effective. This included more tracking, such as button click activity and page metadata.

The Facebook Pixel works in six steps:

  • Install the pixel. Everything starts by adding a snippet of tracking code to your website.
  • Collect insights. You’ll begin receiving insights about site visitors, such as where traffic is coming from, what device they’re using, and other demographic information.
  • Review behaviors. See how people act on your website, whether they explore a specific product page or put something in their shopping cart.
  • Build audiences. Use the data collected from pixel events to create Facebook Custom Audiences, lookalike audiences, and ads tailored to those specific people.
  • Optimize bidding. Take advantage of the lowest cost bid strategy to reach people likely to take a desired action—for example, buying a product—to spend your budget efficiently. 
  • Analyze events. Assess conversion events to decide the best Facebook ads strategy for your business.

If all this talk about conversion tracking and Facebook pixels is a bit overwhelming, don’t worry.

How to use the Facebook Pixel

The Facebook Pixel offers five core functions to help you get a better return on investment:

  1. Custom Audiences from your website
  2. Custom conversions
  3. Standard and custom events
  4. Dynamic ads
  5. Conversion optimization

1. Custom Audiences from your website

Custom Audiences from your website are how Facebook helps you retarget website traffic. If you have the Facebook Pixel installed, it will track the movements of any visitors on your website who are simultaneously logged into Facebook.

The pixel will track activities such as:

  • What pages a user visits
  • What page a user doesn’t visit
  • When a user visited a page
  • Scroll depth
  • Time spent on page

Using this data, you can advertise to very targeted groups of people. You can also use this data to create lookalike audiences and reach customers likely to buy your products. It’s also helpful to exclude specific groups, so you don’t keep targeting users who may have converted or are not highly engaged. 

To be clear, when advertising on Facebook, you can’t choose a specific website visitor and advertise to them. Instead, you can advertise to groups of users (Custom Audiences from your website) based on shared behavior. A few examples include:

  • People who have visited your website in the past 24 hours
  • People who have visited your website in the past 180 days but have not been back in 30 days
  • People who have visited a specific landing page on your website
  • People who have visited a specific page on your website but not another specific page

You can define Custom Audiences from your website based on which pages they did or did not visit and by when they visited your website. You can choose a timeframe between one and 180 days.

Creating custom audience

Audiences are created independently from ads. Once an audience is created you can choose when to advertise to it and which ads to use. Or you can let it percolate for future use.

2. Custom conversions

One of the most exciting parts of the Facebook Pixel is the ability to create custom conversions similar to how you create Custom Audiences. A custom conversion is created by selecting a completion page and naming the conversion. Typically the completion page is some kind of thank-you page. 

For example:

  • Thank you for shopping. Your order is on the way.
  • Thanks for signing up. You’ll receive your first email from us shortly.
  • Thanks for your comment. Here’s your free download.

REI thank you page

This means you can create custom conversions independently of your Facebook ads and then choose when to use them in the future.

Because the tracking pixel already fires on all your website pages, it can easily track when someone visits a completion page—especially people who have clicked on your Facebook ads.

Create Custom Conversion

You can also choose the category for the conversion and add a monetary value. For example, if you create a custom conversion that tracks visitors to an ebook download page, you can include the cost of the ebook. This feature will help you figure out if your ad campaigns are profitable. If you charge $20 for your ebook, but you’re spending $25 for every purchase that comes from Facebook ads, you’ll probably want to make some changes to that campaign.

The custom conversion categories that you can choose from include:

  • Add Payment Info
  • Add To Cart
  • Add To Wishlist
  • Complete Registration
  • Initiate Checkout
  • Lead
  • Purchase
  • Search
  • View Content

The interesting thing about custom conversions when advertising on Facebook is that once it’s created, it’ll be tracked for all of your ads, whether you choose to optimize for it or not. 

All of your custom conversions are always being tracked. At any time, you can create a report for one of your Facebook ads that will show the conversion rate for any of your custom conversions.

You’re limited to 100 custom conversions per ad account, and you can delete custom conversions at any time (at one point, the limit was 20 and you couldn’t delete any).

3. Standard and custom events

When someone takes an action on your site, the Facebook Pixel logs it as an event. You can use the pixel to track two different types of events: 

  1. A standard event, or predefined actions Facebook recognizes across ad products.
  2. Custom events, or an event not covered by Facebook, which you give a name to.

Facebook Pixel standard events

There are 17 standard Facebook Pixel events you can use by copying and pasting a simple event code:

  • Add payment info. For adding payment information during checkout.
  • Add to cart. For adding an item to a shopping cart.
  • Add to wishlist. For adding an item to a wishlist.
  • Complete registration. For signing up for an event or email subscription.
  • Contact. For getting in touch with your business.
  • Customize product. For customizing a product on your website, like choosing a color.
  • Donate. For allowing a visitor to donate to your business.
  • Find location. For helping to find one of your locations.
  • Initiate checkout. For starting the checkout process by clicking a Checkout button.
  • Lead. For allowing a visitor to identify themselves as a lead on your website, such as submitting a form or starting a trial.
  • Purchase. For when a visitor completes a purchase and ends up on a Thank You landing page or confirmation page.
  • Schedule. For booking an appointment with your business.
  • Search. For searching for something on your website or app.
  • Start trial. For beginning a trial of a product or service you offer.
  • Submit application. For submitting an application for a product, service, or program.
  • Subscribe. For signing up for a paid product or service.
  • View content. For when a visitor visits a landing or product page you care about. 

Standard events also support parameters, which let you include additional information about an event, such as:

  • Product IDs
  • Categories
  • Number of products purchased
  • Content type
  • Conversion value

Say you want to track events such as scroll depth from a specific category on your website, instead of all pages. You can separate audiences based on their conversion-related activities on your site and further define any Custom Audiences you create. 

Custom events

While custom conversions are tied to a URL (usually for some kind of thank you or completion page), custom events don’t need to be. Instead, conversions can be tracked by adding an additional snippet of code to the page of interest.

Custom events are commonly used to collect more data than a standard event can provide. 

4. Dynamic ads

If you run an ecommerce site, you can use the Facebook Pixel to run dynamic ads. These ads, also referred to as catalog sales in your ad account, automatically show products from your catalog based on your target audience.

Catalog sales selection

If your business has thousands of products, creating individual ads based on specific pages visited and actions taken may not be an efficient option. Instead, you can create dynamic ad templates so that what a potential customer sees will depend on their behavior. 

Take 9Five for example. The luxury eyewear retailer wanted to increase global sales and reach new customers. 

To achieve this, they used data gathered from the Facebook Pixel to build a custom audience of people who viewed at least one product on their ecommerce website but didn’t buy anything. They then target a dynamic ad, which is filled with the image of one of the products each individual person viewed, to this specific audience. 

The ads displayed a lifestyle image from the company website and ad copy that changed based on different locations and promotions. For example, 9Five targeted dynamic ads to its Canadian lookalike audience to promote a 20%-off site-wide sale for the Labour Day holiday.

9Five Eyewear Ad

9Five runs an ongoing campaign, which began in August 2017, and achieves:

  • 3.8x return on ad spend
  • 40% lower cost per acquisition 
  • 2.6x lift in return on ad spend

All thanks to the Facebook Pixel. 

5. Conversion optimization

If you don’t use standard events or custom conversions to track events on your website, you can’t optimize for conversions. You can optimize for traffic, link clicks, or video views, but those metrics don’t always mean more sales. 

When you install the pixel, Facebook knows what a conversion is for your business and will target ads to people more likely to convert. 

Facebook Pixel Conversion Optimization

Social media strategy and planning templates

Ready to get started with your social media strategy? These free, customizable templates give you tools to plan and execute a strategy that connects you with your target audience while keeping your content calendar organized.

How to install the Facebook Pixel on your website

The current Facebook Pixel works similarly to the old custom audience pixel. It needs to be in the head section of your index page so that it appears on every page of your website. No matter which page is loaded, the pixel will fire and track where the visitor is.

First, if you haven’t already, you’ll need to create your pixel. Start by visiting Events Manager.

Click Connect Data Source. 

Events Manager dashboard

Then select Web as a data source. 

Web data source

Then Add pixel details.

Add website conversion activity

There are three ways to add the Facebook Pixel to your website:

  1. Use an integration or tag manager
  2. Manually install the code
  3. Email instructions to a developer

Setting up the Facebook Pixel

1. Use an integration to add the Facebook Pixel code to Shopify

If your store is on Shopify, the process is simple

  1. In your Shopify admin, click Facebook in the Sales channels section.
  2. Click Settings, and then click Data sharing settings.
  3. In the Customer data-sharing section, click the Enable data-sharing toggle.
  4. In the Choose data-sharing level section select Standard, Enhanced, or Maximum.
  5. Select your pixel from the list. Or if you're yet to create a pixel, follow the instructions to create one.
  6. Now click Confirm and you’re finished!

2. Add the Facebook Pixel code to your website manually

For your pixel to work properly, it needs to be displayed on every page of your website. The best place to put the code is in the global header of your website. Look for <head> </head> in your code or find your header template to update the global header. Paste your Facebook pixel code in the middle of the header code, after <head> and before </head>.

3. Have a developer install the Facebook Pixel code to your website

If you have a web developer who maintains your site, you can also email the code and instructions to install the Facebook Pixel. You can do this by selecting the third option, Email Instructions to a Developer, and entering their email address.

Once the code is installed, you can use the Facebook Pixel Helper to make sure it’s working properly.

After you’ve verified that it’s working, you’re ready to go back to the Ads Manager and start creating your own Custom Audiences and custom conversions to start advertising on Facebook. With enough time, and enough monitoring, you can begin to scale your ads.

Getting the most from the Facebook Pixel

If you want to get the most out of your social media advertising dollars, you want to use the Facebook Pixel. With this one snippet of code, you can measure, optimize, and build highly targeted audiences for your ad campaigns, resulting in more conversions, more revenue, and better ROI for your business.

Facebook Pixel FAQ

Should I use the Facebook Pixel?

Yes, you should use the Facebook Pixel. The Facebook Pixel offers valuable customer information you can use to create more effective Facebook ads and improve ad targeting. The data from the Facebook tracking pixel data also helps ensure your ads are seen by people who are most likely to take an action.

What data does the Facebook Pixel collect?

The Facebook Pixel collects data that enables you to track conversions from Facebook ads, including website behavior and cross-device activity. This lets you optimize ads, build more refined audiences for future ads, and retarget people who have taken specific actions on your website.

How do I get a Facebook Pixel?

You can create a Facebook Pixel by following these six steps:
  1. Go to Events Manager in your Facebook Ads Manager account.
  2. Click Connect Data Sources and select Web.
  3. Choose Facebook Pixel and click Connect.
  4. Name your pixel.
  5. Add your website URL to check for setup options.
  6. Click Continue.

How many Facebook Pixels do I need?

You can create up to 100 pixels in your Business Manager account. But unless you have different websites with different audiences, you don’t need multiple Facebook Pixels. One Facebook Pixel with a lot of data will perform better than many different pixels with less.