What is the Facebook Pixel, and why you need it.

What is the Facebook Pixel, and why you need it.
  • Chris Haycock
  • Tuesday, June 18, 2019
  • Comments

TL;DRThe Facebook Pixel a small piece of code that you paste into your website that tracks visitors, conversions, and clicks. If you are contemplating running Facebook ads or building targeted audiences either now or in the future, it's an essential piece of code that will help you to convert more visitors into customers.

Although there is evidence that suggests the number of Facebook users is in decline, the popular platform is still incredibly popular. 

Worldwide there are more than 2.38 billion monthly active users - of which 1.56 billion log onto Facebook each day.

That's a huge audience of people - and I guarantee that most of your customer base are using Facebook.

What's more, five new profiles are created every second, which means that your potential audience is still growing at a phenomenal rate.

But how do you possibly reach out to those who may be interested in your business in a cost-effective way?

Say hello to the Facebook Pixel.

What is the Facebook Pixel?

Don't let the name confuse you - it's not a pixel in the graphical sense.  It's a short snippet of code that is placed into your website.

It looks something like this:

Facebook Pixel Code

The pixel code is really rather special, because it can do some amazing things behind the scenes, such as:

  1. Making sure that your future Facebook Ads are shown to a highly-targeted audience of people that are likely to convert into customers.
  2. Targeting people who have taken a particular action on your website, such as downloaded a white paper or eBook.
  3. Creating custom audiences made up of people who have expressed interest in your products, i.e. 'lookalike audiences'.
  4. Understand the actions people take after seeing your ads, which helps track conversions and improve ROI.

When a visitor arrives on your website, the pixel is 'fired', which triggers cookies (which store a small amount of data) about how that visitor interacts with your website.  Information about that user's actions whilst they are on your site are sent back to Facebook servers, and are stored against their Facebook profile.

In other words, Facebook knows which users are visiting your website, which pages they view, and what they get up to.  When you run Facebook Ads in the future, you'll be able to (re)target those people who have visited your website, as well as create targeted ads to people who have similar attributes.

It all sounds rather scary, but in fact there is nothing really sinister about this - behavioural tracking has been going on for decades.

Why should you use the Facebook Pixel on your website?

Armed with useful information about your visitors (at least those with Facebook profiles), you are able to target future ads in a much more cost-effective way.

If you've previously run Facebook Ads, then you'll know how expensive it can be to target the right market.  It's dead easy to spend hundreds of pounds getting your advert seen.  If your targeting is not spot on, then you're throwing money down the drain, missing out on sales, and the chances are you're going to get the impression that Facebook Ads are a waste of time, effort and money.

But by adding the Facebook Pixel to your website, you can use the data it collects to create highly-targeted ads that are much, much more likely to attract attention - and clicks.  This will bring down the cost of running ads to your target market considerably, and result in far more prospective customers who visit your website.

Don't wait until you're ready to run ads - get the Facebook Pixel installed onto your website as soon as possible so it can start collecting information about your visitors right now.  I launched this website yesterday - and the Facebook Pixel was one of the first things to be installed.  The earlier you add the Pixel, the more data it'll collect, and the easier it will be to create targeted and custom audiences for your ads.

How do I install the Facebook Pixel?

Before you begin, you'll need to ensure you've first got a website.  If you've got this far and you don't have a website, then I'm afraid you're not going to get very far - it's essential!

Still here?  Good. 

First, you'll need the Facebook Pixel code.  Head over to Facebook Events Manager and then go to your Pixels tab.  If it's your first time, click on 'Create a pixel'.

Once your Pixel has been created, you'll see options that will help you to install the pixel code into your website.  Three options are available: 'Use an Integration of Tag Manager', 'Manually Install the Code Yourself', and 'Email Instructions to a Developer'.

Facebook Pixel Installation

If you select 'Manually Install the Code Yourself', you'll need to be drop that code into your website.  This is pretty easy using Wordpress by using the Official Facebook Pixel plugin.

Most other platforms have some type of plugin that help you to install the Facebook Pixel.  If you're unsure how to install it, let your developer know and they should be able to add it easily - it only takes a minute or two to drop in the code and get it up and running.

Tracking Actions from the Facebook Pixel

Once you've added the Facebook Pixel code to your website, you're then ready to create 'events', which give Facebook more data about the types of action that you're asking your visitor to perform on your website.  This can be as simple as adding a product to their shopping cart, viewing your contact page, or even clicking on a button.

Facebook lists 17 'standard' events that it can track automatically:

  1. Add payment info
  2. Add to cart
  3. Add to wishlist
  4. Complete registration
  5. Contact
  6. Customise product
  7. Donate
  8. Find location
  9. Initiate checkout
  10. Lead
  11. Purchase
  12. Schedule
  13. Search
  14. Start trial
  15. Submit application
  16. Subscribe
  17. View content

As you can tell from the list above, these events are predefined by Facebook, and can be used to log conversions, optimise for conversions and build audiences.

Adding 'events' is a great way to refine your Pixel so that your advert targeting, optimisation and audience insights becomes even more targeted.

Why?  Let's use my new website as an example.  Say I wanted to create a new Facebook Advert that is only shown to people that have visited my website over the last 30 days and have visited my FITS-ACE Workshop page.  I want to run a special incentive, giving them 20% off if they register in the next 48 hours.  By setting up an 'event' in my Pixel, I can do just that.  I can run an advert that will only target people that match the above.

That's how powerful 'events' are, so I recommend that you use them whenever you can. 

To set up 'events', go back to the Pixels tab in Events Manager, and click on 'Set Up' > 'Set Up New Events' in the top right hand dropdown of that Facebook page.

Facebook Pixel Events

You can either use Facebook's event setup tool or manually install the event code yourself.

Facebook Pixel Event Code

If you opt to install the event code yourself, you'll need to add the Javascript 'event code' to your website whenever you need to track a action.  Although this is a fairly simple procedure, it requires a little knowledge of how code works.  If you're unsure, email the instructions (provided) to your developer.  Again, installing event code is a quick and easy job, and shouldn't take more than a couple of minutes to install the code so that it fires the pixel when an action takes place.

For more information on Facebook Pixel Events, see https://www.facebook.com/business/m/one-sheeters/facebook-pixel-events.

Advanced Facebook Marketer Jon Loomer has an excellent guide to Facebook Pixel Events on his website.  In his guide he shows you additional reasons why you should use 'events', including building Dynamic Ads, Conversion Optimisation, Conversion Tracking, Analytics and more.  Facebook have a page that guides you through setting up custom events that you can use for non-standard events.

Check the Facebook Pixel is firing

You don't need to create 'events' for your pixel, but it will make your future targeting much easier.  Either way, you're now ready to confirm whether your Facebook Pixel is working - or not.

Once you're getting traffic to your website you'll know if the pixel is working because the Pixel Manager page will let you know.

To speed things up and verify if your pixel is firing, there's a Chrome Plugin that you can use to see if the Facebook pixel is installed (and running) on your website.  It's called Facebook Pixel Helper, and you can get it through the Chrome Web Store.

Facebook Pixel Helper

Once you've installed the Facebook Pixel, you'll see a notification that the plugin has been added to your website.

Complying with Privacy Legislation

As you probably guessed, there are some terms and conditions that you need to comply with.  When you're collecting data about your visitor's activities you need to ensure that those visitors are aware that you are collecting data about them.

If you're in the EU then GDPR (General Data Protection Regulations) is taken very seriously by the authorities.  This means you'll need to tell your visitors that you are using the Facebook Pixel in your Privacy Policy and/or GDPR Statement.

In Facebook's Terms and Conditions, it states that "For websites, a clear and prominent notice on each web page where our pixels are used that links to a clear explanation (a) that third parties, including Facebook, may use cookies, web beacons and other storage technologies to collect or receive information from your websites and elsewhere on the Internet and use that information to provide measurement services and target ads, (b) how users can opt out of the collection and use of information for ad targeting, and (c) where a user can access a mechanism for exercising such choice (e.g. providing links to: http://www.aboutads.info/choices and http://www.youronlinechoices.eu/)."

Luckily, I built a service for small businesses to easily create GDPR-compliant Privacy Statements.  Check it out and use it - it's there to make your life much easier and to ensure that your business complies with privacy regulations.

What Next?

Well, that's it.  Everything you need to know about setting up the Facebook Pixel is right here.

When you create new Facebook Ads you're able to select audiences based on the data that your pixel has been collecting about your website visitors.  This will result in higher conversions, lower marketing costs, and much more effective ad campaigns.

I'll cover Facebook Ads and custom audiences in another post - or at least I'll add it to my growing list of featured articles.

Good luck.


About Chris Haycock

Chris Haycock, Author

Chris is the Managing Director of digital media company CliqTo Ltd. He is responsible for creating a portfolio of more than 30+ online businesses that attract almost 1 in 6 of the UK population. Chris also works as a consultant, offering a range of services that are designed to help businesses improve and refine their digital strategies.


  1. Chris Haycock Chris Haycock says:

    Agree? Disagree? Want to give your two pennies to this blog post? Pop your thoughts into the spaces to leave a reply.

Have your say

Add my comment



You really can get something for nothing. Let me know where to send it, and you'll get a weekly email newsletter (BOOST!) that's brimming with all my latest tips, advice, news and insider techniques.

I want to...

Visa, Mastercard, Amex, Solo, Discover Credit Cards

Your payment is 100% secure, and processed by Stripe.