How (and WHY) to Use the Facebook Pixel on Your Site

on August 28, 2017

If you use Facebook Ads Manager to promote your business or if you’re planning to start, you’ve likely heard about the Facebook pixel.

This guide is relevant for the folks out there who want to make the most out of their Facebook marketing and haven’t started to use the pixel yet. Whether you are a small business owner, a freelancer, or an online store marketer, if you would like to increase traffic to your website, generate leads, or get more sales, it’s important to be familiar with the pixel’s capabilities.

Using the Facebook pixel opens up an entire world of opportunity for businesses and marketers. Since the ad platform offers multiple features and tools you can really start seeing much better results from your marketing efforts.

By placing your own unique pixel on your website’s code, you allow Facebook to use cookie-tracking and send data back to your Ads Manager account whenever a user interacts with your ads and website.

To help you better understand this special tool and the serious benefits it brings to your paid campaigns, we answered some of the most frequently asked questions so you can master the Facebook pixel. Let’s get started.

What is the Facebook pixel anyway?

The Facebook pixel is a piece of code that you can add to your website or landing page. This simple implementation actually creates a consecutive flow of information between whatever happens with your Facebook ads and what that is going on outside of Facebook, i.e your website.

This is what the code looks like:

facebook pixel

The information that goes through the pixel back to Facebook relates to three main facets regarding your users/audiences:

  • Who visited your site
  • How they got to your site
  • What they do on your site

Who visited your site

When the pixel is placed on a webpage, it “marks” each and every visitor (no matter the visitor’s source or referrer) so later it can recognize these visitors and connect this data to their Facebook profiles (as long as they are logged-in).

So, for example, let’s say Jessica visited your online store on Thursday, while logged into Facebook, checked out some items, and left without buying them.The next time she opens Facebook, you can target her with an ad post that presents items she may like and, with that ad, Jessica is reminded of your store and now more likely to make a purchase.

How they got to your site

This data is particularly relevant to Facebook traffic, especially for conversion tracking. In order to optimize your campaigns as much as possible, you want to know as much as you can about your conversions (leads, purchases, button clicks). You want to know where each conversion came from exactly–which campaign, ad group, and which specific ad brought them to you.

What they do on your site

When the pixel is implemented along with the basic and/or custom events tracking, you can track every action that you find important or interesting. Once you have enough history for a specific action (conversion), you can optimise your ad delivery to people who are likely to take this action as well.

Going back to our example, Jessica added a new item to her cart while on your site. This is a predefined “add to cart” conversion. With the pixel implemented, your site will track all of the “add to cart” conversions that occur from other users, like Jessica, visiting your store. This enables you to create a campaign with a conversion objective of “add to cart” and now the pixel will find other people like Jessica who are most likely to perform an “add to cart” action. Keep in mind, you can track all of Jessica’s actions on your site by adding more predefined conversions (we talk more about this later in the article).

How to setup the Facebook pixel

Implementing the pixel is pretty simple and straightforward. While you can find detailed instructions from inside the Ads Manager, the basic implementation happens when you take the base code directly from the system and insert it into a specific section of your website code. But all of that can seem super confusing, especially for those of us just getting started. So let’s break down the steps together.

Step 1: Generating your unique pixel
From either your simple Ads Manager account or the Facebook Business Manager account, go to “Menu” and click on “Pixels.”

Once you click “Pixels,” then click the “Create a Pixel” button, name your pixel, and click “Next.”

Step 2: Installing the base pixel code AND defining specific events on your website
There are two ways to install the pixel itself: using one of the integrations or using the simple copy and paste option.

For this article, we’re focusing on the copy and paste option:

facebook pixel

First, copy the entire pixel base code and paste it in the header of your website (learn more about how to find your website header here).

Find the <head></head> tags in your web page code (or locate the header template in your CMS or web platform) and paste the copied code there. Then click “Next.”

Second, you want to start defining the events that you want tracked. Start by copying each relevant specific event code and paste it in the relevant location on your website code (e.g. below the </head> of the thank-you page OR attached to a specific JS or HTML element like submit button click).

During this phase, Facebook offers three templates for each event code: basic, recommended, and advanced. Read more about them here in order to understand which method works best for you.

How do I check if the pixel is working?

Now that you’ve gone through all of the steps to implement the pixel, you want to make sure it’s actually doing all the hard work for you. To check this process, simply go back to “Pixels” in the Ads Manager menu and check if the status is labeled as “Active.” If so, your pixel is up and running. (Keep in mind that it may take up to 20 minutes for your pixel status to change after installing it.)

If your pixel status reports “No Activity Yet,” then your pixel isn’t working. To get more information and guidance visit the Facebook help center or try reaching out to their support team.

Another way for you to check if your pixel is working is to use the FB Pixel Helper extension. Once installed to your web browser (Chrome, Firefox, etc), this extension will report the status of the pixel found on the website where you installed it. The extension marks the pixel as “Live” if it is firing (and with what events) on your webpage.

After the extensions installation there will be a small icon next to the URL line (see the image below). Each time you go to any website, it will show if there is a pixel installed, which events were triggered, and if the pixel is working properly.

This is what the installed FB Pixel Helper extension looks like:

facebook pixel

Is it enough to put the pixel on the website to collect visitors and count conversions?

The short answer is no.

It’s important to understand that nothing will happen if you just place the pixel on your website and not activate any other action. The pixel will collect data, yes, but without further actions, the Facebook Ads system won’t do anything productive with this information.

When it comes to audiences, you need to let the pixel know exactly which audiences you want to target (all visitors, specific page’s visitors, etc). You can set this up in the Audiences tab:

facebook pixel

For example, you can create an audience named, “All Visitors–30 Days Back.” To do this, choose the value, “All website visitors,” from the drop down box found here:

facebook pixel

When it comes to conversions, the pixel doesn’t know what is considered a conversion unless you define it correctly in the system first.

The simplest way to do this is to create a “Custom Conversion” based on a specific page visit (e.g. thank-you page post form submission):

facebook pixel

facebook pixel

Now that you defined your first conversion for Facebook, a new row will be created in the “Custom Conversions” page. You can track the status of the conversion activities under the “Activity and Status” columns.

facebook pixel

Now, in order to track this conversion on your campaigns’ reporting dashboard, you simply add it as a “Customize Columns” to your original column section.

facebook pixel

How can I use the pixel to make my ads perform better?

Once you have enough counts of specific conversions reported back to Facebook (about 8-10 a day), you’ll be able to optimize your ad delivery to people who are most likely to perform your predefined conversion. You do this by setting the campaign objective as conversions.

On each ad set level, you will be asked to input which conversion you want to use for your ad’s delivery.

facebook pixel

After setting your targets, schedules, and placements, you’ll then tell the system how much you are willing to pay per conversion. Now armed with all the important information and budget, the system it will do its best to show the ad(s) to people who are most likely to perform this conversion inside the defined bid options you set.

The pixel works and the conversions are defined, but the campaign isn’t reporting any conversions. What do I do?

Start by simply checking that your “Custom Conversion” is up and running. If everything is running correctly, remember there is always a chance these conversions are generated from non-Facebook activity (e.g email/organic).

facebook pixel

Another reason you might not see your conversions is because the “pixel tracking” radio button on the ad’s creation was marked as “off.” To avoid this problem, always make sure that you choose the option to “track all conversions from my Facebook pixel.”

facebook pixel

I have a few different Facebook pages/websites and product lines. Can I use the same pixel or do I need a different pixel for each one?

Basically, yes. It is possible to use the same pixel for different pages. Just remember to create distinct custom audiences from those that visited a specific website where you added your pixel.

However, it’s truly best, performance wise and as recommended by Facebook, to use one pixel per domain and install it on every web page domain you would like to track.

Tip: If you use the Facebook Business Manager and own more than one page and ad account (which pretty much share the same audiences), you can use the “share pixel” or “share audiences” function between your Ad Accounts. By doing this, you’re assigning existing pixel/audiences to a new Ad Account which can save you a lot of time and effort.

How do I set up the pixel on my Shopify store?

If you’re in ecommerce, the pixel can help you better understand your current and potential customers. It provides so much valuable information on which to build your campaigns and messaging and helps you convert “window shoppers” to buyers.

Adding a pixel to your Shopify store is super easy and simple. See Facebook’s guide for instructions.

How do I set up the pixel on my Wix website?

Not only is making a website with Wix easy, so is adding the Facebook pixel. Just like any other website, the pixel will help you track and identify all the conversions on your Wix site. Learn how to implement the pixel on a Wix website here.

With great power, comes great results

The Facebook pixel offers you so much flexibility and power in understanding your ads, audience, and, even, product as a whole. It will help you better define audiences, use your budget more effectively, and create video ads that get amazing results. We’re excited to see how this helps your Promo videos get the results you want.

Already using the pixel? Tell us how it’s working for you in the comments.


Marketing acquisition manager, w/ 5 years experience in running campaigns on social media, search engines and native platforms.

Comments are closed.