Facebook Ads: The Beginner's Guide to the Facebook Pixel

Facebook advertising pixel.

I can’t be the only person who finds advertising on Facebook confusing. All the 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 calledretargeting. Once you advertise to past website visitors, Facebook pixels can also be used to track their behavior when they’re back on your website.

Table of Contents

What is a Facebook pixel?

A Facebook pixel is an analytics tool that consists of a code that you can put on your website. The pixel fires to track site visitors. This data allows you to retarget those users withFacebook adsin the future, as well as see what they’re doing on your site when they return. This allows you to gain more insights about your audience, send targeted messaging to users who already know your brand, and track the effectiveness of your paid social advertising efforts.

How do Facebook pixels 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.

Template Icon

Kit can help you with that.

Kit has helped thousands of Shopify store owners market their online store. Kit handles Instagram and Facebook advertising, email marketing, and social posting to help drive sales and grow your business.

Hire Kit for free

The thing is, although Facebook pixels are confusing, they makeadvertising on Facebookmuch more effective. Not only do you know exactly who you’re advertising to, you also have a better understanding of how your Facebook ads are performing. All in all, you can 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 Facebook pixel that replaced the older Facebook pixels, making it the only tracking pixel you now need. It was updated again in 2017 to make advertising on Facebook easier and more effective. This included more tracking, such as button click activity and page metadata.

Facebook pixel.

How to use Facebook pixels

The Facebook pixel offers three core functions to help you get a better return on investment:

  1. Custom audiences from your website
  2. Custom conversions
  3. Custom and standard events

1. Custom audiences from your website

Custom Audiences from your websiteare how Facebook helps you retarget website visitors. If you have the Facebook pixel installed, it will track the movements of any visitors on your website who are simultaneously logged into Facebook. It will record which pages on your site they visit, which pages they don’t visit, and when they visit. Using this data, you can advertise to very targeted groups of people.

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 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 1 and 180 days.

Create a 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.

Audiences are created independently from Facebook 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 tocreate Custom Conversionssimilar 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.
  • 谢谢你注册,你会收到你的第一个email from us shortly.
  • Thanks for your comment, here’s your free download.

Thank you page.

This means that you can create Custom Conversions independently of your Facebook ads, and then choose when to use them in the future.

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.


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.

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.

If you want to optimize your ad for a Custom Conversion, choose “Website Conversion”, type in your domain, and then select the one you’re looking for.

Campaign objective.

自定义转换的缺点是,你limited to 40, and you candelete Custom Conversionsat any time (previously, the limit was 20 and you couldn’t delete any).

3.Custom and standard events

Custom and Standard events are an advanced feature of the Facebook pixel. If you only use Custom Audiences and Custom Conversions, you’re in great shape. In the80-20of Facebook advertising, you’ll already be doing the simple things that have the biggest impact.

Custom and Standard events function similarly to the old Facebook conversion pixels. You can create Custom and Standard events with a bit of extra code. Custom and Standard events help get past your limit of 40 Custom Conversions, offer more robust analytics and reporting, and have greater accuracy. .

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

There are nine conversion types you can use with Custom and Standard events, each with its own line of code. This code will tell Facebook what to track, and will be inserted into the Facebook pixel code — but only on the page you want to track conversions on.

How do you find your Facebook pixel ID?

Your Facebook pixel ID is in the Ads Manager. Make your way to the navigation menu, and click on “Pixels” (under “Measure and Report”).

Find Facebook pixel ID.

If you’ve already created your Facebook pixel, you’ll see your Facebook pixel ID on this dashboard.

How to add the Facebook pixel to 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 on 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 theAds Manager. Go to the “Pixels” tabin Events Manager.

Create Facebook pixels.

Click “Create a Pixel.” Name your pixel and click “Create.”

Name Facebook pixel.

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

Install pixel code.

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

If your store is on Shopify,the process is simple. In your Shopify Admin, navigate to “Online Store” → “Preferences.”

Scroll down to the Facebook pixel section and paste your pixel ID.

Facebook pixel integration.

Now click “Save” 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 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 and before .

3.有开发人员安装Facebook像素鳕鱼吗e 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 theFacebook Pixel Helperto 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 toscale your ads.

Do you want to create your own online store?