Of all the tools that Facebook has provided marketers in their arsenal of weaponry, the Facebook Pixel is by far the one that marketers should familiarise themselves with and learn how to use.

The Facebook Pixel allows you to retarget people who visit your website, create customised audiences, and understand how many conversions your ads are delivering so you can see which adverts are working best.

The conversion pixel will soon become your new best friend as you will be able to determine which ads are delivering results to meet your campaign and business objectives.  Conversions could be as simple as a click to your website or web page, a completed lead form or sign up, to a product purchase.

How to Create the Facebook Pixel

Your first step is to create the Facebook Pixel.  You can read about how easy it is to create the pixel in our previous post.  If you haven’t had a chance to create the pixel and need to understand how to do it, head on over to the post here.  It will take 2 minutes…

How to Install the Facebook Pixel

Now that you’ve created your pixel, it’s important to understand what it exactly is.  The Facebook Pixel is essentially a piece of code that can be inserted into your website and on every page.  

The Facebook pixel code contains two key elements:

  1. Main Pixel Code
    1. The Main Code sets a benchmark for you to track how many Page Views you receive, and should be installed on every page.  
  2. Event Pixel Code
    1. The Event Code tracks ‘events’, or ‘actions’, that people take, i.e. registration form completion, product purchase, and should be installed on specific pages.
    2. You can create Standard Events (Facebook specified actions) or Custom Events (specified actions by you).
To install the Main Pixel Code:
  1. Go to the Pixels page in Facebook Business Manager
  2. Click Actions > View Pixel Code (see below)
  3. Facebook Pixel Code
  4. Hover over the code and click Copy Code to Clipboard
  5. Click Done
  6. In the back end of your website or in your website template settings section, paste the code after the <head> tags on each web page.
    1. If you use a website client like WordPress, there will likely be a plugin that you can use to ensure this is seamless.
  7. By default your Main Pixel Code will now start measuring how many Page Views you are receiving
To install the Event Pixel Code:
  1. Go to the Pixels page in Facebook Business Manager
  2. Click Create Conversion and then click Track Conversions with Standard Events
  3. Copy the Event Code that you want to add to a specific page
    1. For example, if you want to measure how many users fill out a registration form, copy the Complete Registration code
  4. Again, in the back end of your website, place the relevant code on the relevant pages.
    1. Add your Event Code separately before </script>

Here is an example of what your Facebook Pixel Code will look like with a standard event included.

Full Facebook Pixel Code

  1. Your website original code
  2. Your Facebook Main Pixel Code
  3. Your Facebook Event Pixel Code

These are the 9 x types of Standard Events (and their corresponding code) that you can add:

Website action Standard event code
View content fbq(‘track’, ‘ViewContent’);
Search fbq(‘track’, ‘Search’);
Add to cart fbq(‘track’, ‘AddToCart’);
Add to wishlist fbq(‘track’, ‘AddToWishlist’);
Initiate checkout fbq(‘track’, ‘InitiateCheckout’);
Add payment info fbq(‘track’, ‘AddPaymentInfo’);
Make purchase fbq(‘track’, ‘Purchase’, {value: ‘0.00’, currency: ‘USD’});
Lead fbq(‘track’, ‘Lead’);
Complete registration fbq(‘track’, ‘CompleteRegistration’);
Place the Standard Event Code on the page where Facebook knows the conversion has happened.

For example, if you are after registration forms completion, you would put the Lead code on the page where the user will land to fill out the form, and your Complete Registration code on the ‘thank you’ page after the Lead has been completed.

So there you go!

You’ve now created and installed the Facebook Pixel on your website – which means not only are you avoiding the 1 critical mistake many Facebook marketers make, but you’re now able to get a greater degree of insight into which adverts are doing well, which campaigns and ads are converting, and how best you can manage your budget.

If you have any questions on the Facebook Pixel, or want some help with your Facebook marketing, be sure to let us know and we’ll help you straight away!

PLUS: If you’d like to receive our FREE Facebook Advertising Planning Template, you can download it here.