Guide to Facebook Ad Pixels

facebook pixel guide

The Facebook Pixel is a necessary tool to track your Facebook Ad campaign performance.

With the Facebook Ad Pixel, you can do a number of things that create a successful ad campaign like:

In this guide, we are going to teach you everything you need to know about the Facebook Ad Pixel and how to use it to create successful advertising campaigns.

What is a Facebook Ad Pixel?

A Facebook Pixel is a small javascript code that you install on your website or landing pages to better track and optimize your Facebook Ad campaigns. it allows you to connect your website to your Facebook Ads for insights, retargeting, and conversion tracking.

According to Facebook:

“The Facebook pixel is an analytics tool that allows you to measure the effectiveness of your advertising by understanding the actions people take on your website.”

You can use the pixel to:

  • Make sure your ads are shown to the right people. Find new customers or people who have visited a specific page or taken a desired action on your website.
  • Drive more sales. Set up automatic bidding to reach people who are more likely to take an action you care about, like making a purchase.
  • Measure the results of your ads. Better understand the impact of your ads by measuring what happens when people see them.

Have you ever visited a website and then go to Facebook and you see an ad for the very website you just visited?

This is called retargeting and it works by installing the Facebook Ad Pixel on your website.

Why You Need Facebook Ad Pixel?

If you do any Facebook Advertising, then it’s vital that you set up the Facebook Ad Pixel on your website.

Here are some reasons why you need the Facebook Pixel:

  1. Track conversions on your website like sign-ups or orders.
  2. Analyze and optimize your sales funnel with Facebook Ad Insights.
  3. Build custom audiences to advertise or retarget to.
  4. Create lookalike audiences that are similar audiences to a defined audience of your Pixel.
  5. See direct ROI from Facebook Advertising and your revenue.
  6. Build dynamic product ads so you can retarget website visitors with the actual products they were viewing.
  7. It cost $0.

For these reasons, you should get started setting up the Pixel immediately. It’s really not as hard as it sounds and I will show you exactly how to do it below.

How to Create a Facebook Ad Pixel

Creating your first Pixel is actually pretty simple.

Just head to the Facebook Ads Manager or Business Manager and go to your Ad account that you use to advertise.

Click the top left stack icon to open the options and look for Pixels under Measure & Report.

facebook ad manager pixel settings

On the Pixels page, click create a new audience and a dialog will appear to start the Facebook Pixel creation process. Choose a name for your Pixel. If you are advertising on multiple sites you can use the same pixel and separate tracking by URL. If you are advertising for a single website, then you can enter your website’s URL for a quicker setup.

create facebook pixel

Once you are complete, click ‘Continue’ to go to the next screen where you will need to click ‘Set up the Pixel Now’.

set up pixel facebook

Now, you have 3 options on how you want to install your Facebook Pixel. If you are using a CMS like Shopify or WordPress, you can use a plugin to easily set up your pixel. You can also easily manually install your Facebook Pixel code into your website code.

how to install facebook pixel

Click ‘Manually add pixel code to the website, if you are going to be pasting the code in your website itself.

copy facebook pixel

Now simply copy the Facebook Pixel code and you will need to paste this in the <head> section of all the pages you want to track.

How to Install Facebook Ad Pixels

Installing your Facebook Pixel on your website its pretty simple. You don’t really need to know how to code to do it.

Simply copy the generated Pixel code from the step before and then we are going to paste it between the <head> and </head> tag on all your pages.

facebook pixel code

If you are using a CMS like WordPress, you can either paste the code in your header.php file or you can install a plugin that makes setup a breeze.

This is the same with any other CMS like Shopify, Wix or BigCommerce.

Alternatively, if you have a developer for your website, you can select to send the pixel code to your developer’s email so they can install it for you.

Now that your Facebook Pixel is installed, it will start collecting data and we can use it to optimize your website and build successful marketing campaigns.

You can view your Pixels events and activity on the Events Manager dashboard.

facebook pixel insights

Using Facebook Ad Pixels

As we talked about before, there are plenty of reasons to use Facebook Ad Pixels.

Here are some of the awesome things you can do with the Facebook Ad Pixel installed on your website:

Custom Conversions

Tracking conversions is very important for a successful Facebook Ad campaign. When you know what’s working and can see direct ROI, it makes it easier to optimize your ads based on that information.

With custom conversions, you can track actions taken on your website and see that data inside Facebook Ads. This can be a number of actions like:

  • user sign-ups
  • newsletter sign-ups
  • reaching a certain page
  • joining a course
  • buying a product
  • clicking a button
  • watching a video

Setting up custom conversions can be a little difficult based on what you are trying to do but if you are using a CMS like WordPress, its pretty simple.

To create a custom conversion, go to the events manager page and click ‘Create Custom Conversion’.

create custom conversion facebook pixel

A large dialog will appear where you can create your custom conversion settings. Give it a name and choose your Pixel source.

create custom conversion options facebook

Next, you will need to choose an event to track. You can track multiple events like:

  • Add Payment Info
  • Add to Cart
  • Add to Wishlist
  • Complete Registration
  • Contact
  • Purchase

Ideally, the more things you track, the more data you will have to optimize your website, ads, and conversions.

choose custom conversion event

Choose the necessary event action and then you will need to choose which URL this event will fire on. For example, if you have a checkout process that lands on a thank you or confirmation page, this the URL you want to add as a rule in your custom conversion.

Every time someone visits this URL, Facebook will track this as a conversion for the event type you chose. You can also add a conversion value for this event if it results in monetary value.

custom conversion success

Once you are complete, click ‘Done’ and your custom conversion will now start tracking that URL.


Once your Facebook Pixel code is set up, you can also create custom events to better track user activity and campaign success.

Using the Facebook Events Setup Tool is an easy way to install event tracking without knowing any code.

set up events facebook pixel

Lookalike Audiences

Lookalike audiences are a very powerful way to build an audience that is similar to a defined audience.

For example, you can create a lookalike audience for people who have purchased from your site. Facebook will find similar people that would be interested in your product as well.

To create a lookalike audience, head to the Events Manager page in Facebook Ads Manager and click the Create audience button at the top. Choose ‘Lookalike Audience’ to start building a new audience to advertise your product or service to.

create lookalike audience button

A dialog will appear to create your Lookalike Audience. Create a name for your audience and then choose which event you want to create a similar audience from.

lookalike audience facebook pixel

If you want to advertise to a different location or other locations you can add them on step 3.

Step 4 will make you choose an audience size. The bigger your audience is, the less targeted (or similar) they will be to your original audience of buyers (or whatever you chose).

lookalike audience location

I would recommend staying in the 1-3% range depending on your advertising budget and LTV (lifetime value of a customer).

Click ‘Create Audience’ and Facebook will now build a similar audience of people who will be interested in your product or service. When you run ads, you can choose to select your lookalike audience as the targeting.

Custom Audience / Retargeting

One of the coolest and most effective ways to use the Facebook Ad Pixel is to use retargeting.

Retargeting is basically how it sounds. You can advertise to anyone who has been to your website and loaded a certain page.

You most likely have been the culprit of this before. You go to a website and then you see that companies ads all over the place after that. You are being retargeted!

To create a retargeting audience just go to the Events Manager in Facebook Ads and choose ‘Create Custom Audience’.

create lookalike audience button

In the dialog, you can choose multiple criteria to build your audience. If you want to only target people who visited your add to cart part, then you can choose to build an audience of only those people.

In this example, we are going to build an audience for anyone who has visited

retargeting facebook pixel

Name your audience something meaningful and then click ‘Create Audience’ to build your new custom audience.

custom audience created

That is all you have to do! Now, you can target people who have visited your website in the last 30 days and it will always update to that audience.