Ready to install the Facebook pixel on your site but not sure where to start?

This is the easy step-by-step guide showing you how to add the Facebook pixel to your website.

Maybe you have heard about the Facebook pixel but you still don’t really know exactly what it is.

What Is The Facebook Pixel?

It is simply just a small piece of javascript code that Facebook provides for you to place on the pages of your website. This small piece of code allows Facebook to better optimize your ad results and allows you to build custom audience of Facebook users who visit your website.

Why Do I Need The Facebook Pixel?

There are two main reasons why you want the Facebook pixel installed on your website:

#1 Building Retargeting audiences

Even if you are not currently thinking of running Facebook ads, you still want to install the pixel now so that you can start the process of tracking the visitors to your site.

With the Facebook pixel installed, Facebook will track and keep record of who visits your site. You will then have the ability to advertise only to those visitors (or a subset of them) on Facebook.

Retargeting is very powerful because you are adverting to only the people who are already familiar with your business or have expressed and interest in your products or services.

#2 Tracking actions from your Facebook Ad

You will now be able to track the effectiveness of your Facebook ad by tracking “conversions”. A conversion is when someone takes the action you were hoping they would after seeing your ad.

Here are some example of conversions:

  • Someone signs up for a free report or guide you are offering
  • Someone purchases tickets to an upcoming event you are running
  • Someone buys something you sell

With the Facebook pixel installed, you will now be able to track the conversion rate and cost per conversion from your Facebook Ads. This will help you identify which ads are working the best and which ones you may need to pause or adjust.

How Do I Install The Facebook Pixel?

Let’s get started, here are the 5 steps to add the Facebook pixel to your site!

Step 1

Start by visiting the Ads Manager. Once there, click on the hamburger icon (the stacked three lines) in the upper left-hand corner. A menu will appear. From this menu, choose “Pixels” under the “Assets” tab.

pixel menu

Step 2

If you haven’t even created your pixel yet, this is what you’ll see when you land on the pixel page. Click the Create a Pixel button.

create a pixel

Step 3

Next name your pixel, accept the terms, and click Next. Remember you only get one pixel per ad account, so name it after your business not a campaign you are thinking of running.

name the facebook pixel

Step 4

Now it is time to install your pixel code. To do this, click the Copy and Paste the Code option.

install the pixel

Step 5

Finally copy the pixel code and you will want to place it within the header section of your website’s code. See below for a more detailed explanation on how to do this.

The key point to remember is that you want this code to get added to EVERY PAGE on your website.

copy your pixel code

Where To Put The Facebook Pixel?

This pixel code needs to be placed on any page on your website that you want to track people visiting that page.

Best practice is to just add this code to all your website pages so that the tracking is their in case you ever need it.

Your pixel needs to be installed in the <head></head> section of your index page.

The <head></head> section can be found near the top of the code. There will also be a bunch of other code between the first opening <head> tag and the closing </head> tag. Scroll down to the closing </head> tag and paste your pixel code right above it.

where to place the pixel code

Don’t worry, if you are a non-techie, you can always just email this code to your web designer and they can install it for you.

Installing the pixel code if you have a wordpres site.

You need to add the Facebook Pixel code just before the </head> in your WordPress theme.

To make this super easy for yourself, simply use the Insert Headers and Footers plugin. After installing and activating the plugin, you need to go to the Settings » Insert Headers and Footers page.

You can paste your Facebook Pixel code in the header section and click on the save button to store your changes.

adding the pixel to wordpress

Installing the pixel code if you have a SquareSpace site.

In your SquareSpace account, open the menu and select Settings > Advanced > Code Injection.  And then add the FB pixel code to the “Header” section.

Installing the pixel code if you have a Shopify site.

For Shopify you will only need your Facebook Pixel ID.

In the Shopify admin, select “Online Store”, and then “Preferences”

Find the Facebook Pixel section, and then enter your Facebook Pixel ID:

Installing the pixel code on landing page builders.

If you’re using something like LeadPages or Clickfunnels or Optimize Press, all of these tools have an area where you can easily add a snippet of code to the page’s header section.

How To Verify The Pixel Is Working Correctly

You may be wondering… Did I install the pixel correctly, is it really working?

If you are using Chrome (for your internet browser) then you can download and install the Facebook Pixel Helper extension.

This is an easy way to verify your pixel is installed and working correctly.

the facebook pixel helper

Your Turn…

Comment below and let me know what questions do you still have about the Facebook pixel or how you intend to make use of it.