The Complete Guide to Facebook Pixel for Digital Marketers

The Complete Guide to Facebook Pixel for Digital Marketers

Facebook recently replaced their Conversion Pixel and the Custom Audience Pixel with the new universal Facebook Pixel. The old ones will be discontinued by the second half of 2016. The Facebook Pixel can do a lot of things apart from tracking conversions.

fb pixel

Pixel is the most important component in Facebook Advertising. Even if you are not going to run ads on Facebook, the Pixel can help you with deeper audience insights.

According to Facebook: “You can now use the Facebook pixel to measure, optimize and build audiences for your ad campaigns, and no longer need to implement the conversion pixel and Custom Audience pixel.”

The Facebook Pixel can be used for three main functions:

  • Building Custom Audiences from your website for re-targeting.
  • Optimizing ads for conversions. (This excites me a lot – more on this later!)
  • Tracking conversions and attributing them back to your ads.

The Facebook Pixel is very powerful, but at the same time it can be intimidating for a marketer.

I have been using Facebook pixels for quite some time, and I assure you by the end of this article, you will completely understand the potential and the functionality of the Facebook Pixel.

How Conversion Tracking Pixels Work

Before we understand the Facebook Pixel and it benefits, let us first understand how conversion tracking pixels work.

Conversion tracking is used to find out what percentage of traffic to a website or landing page converts into desired actions. A conversion could be anything from a sign up to a purchase completion.

Basically the pixel is the link between the website that you advertise on and your own website (as illustrated in the diagrams below).

The most basic way to track conversions is to place a conversion tracking pixel on the “thank you” page or “confirmation” page that the user reaches after the desired action is complete.

It is called a pixel because it is a 1×1 pixel image that is not visible to the user. When this image loads on the specific page, the technology behind this tracks it. If the image doesn’t load, the user has not reached that page. That’s how the tracking system works. Usually the code is a javascript code.

pixel fire

The actual technology is far more complex, but as a marketer, we need to know the why use pixels and what it can do for us.

How‘ it works and the technology behind it can be ignored and we can safely leave it to the techies. 🙂

Conversion Tracking

Say, I have no pixels installed on my website and I am driving 100 visitors to a landing page where people can sign up for a free digital marketing course.

If 30 of these visitors end up registering on the page, then my conversion ratio is 30%. This is easy to track even without conversion pixels – if I have only one source of traffic.

I can also track them if I have multiple sources of traffic and if I drive traffic from each source to a separate landing page. However, it is cumbersome to create multiple landing pages for each traffic source. It is also not SEO friendly.

What if I have multiple sources of traffic to the same landing page? How can we track the conversions from different sources?

Let’s say I drive traffic to this page from Google AdWords and Facebook Ads.

Now, AdWords will give me a tracking code that I have to place on the page that the visitor reaches after completing the registration. And I will also use a conversion pixel from Facebook – The Facebook Pixel in this case.

attribution model

Now, inside the AdWords dashboard, I will be able to measure how many of these clicks converted into completed registrations.

AdWords is able to track this because when 100 people click on the ad and 30 people complete the registration, the AdWords tracking pixel loads on the thank you page on my website – which sends data back to AdWords. The same will happen on Facebook as well.

As shown in the diagram, if I have 2 sources of traffic, and if I have a total of 50 registrations (conversions), the only way to find out which channel performed better is to look at the conversion tracking data.

Now that you have a fair idea about what a conversion pixel is, let us deep dive into the Facebook Pixel.

Remember, Facebook Pixel is not just for tracking conversions. That’s why I love it more than the usual level of acceptable love that can exist between a marketer and a piece of technology 🙂

Understanding the Facebook Pixel

The Facebook Pixel is a universal code that you can place on all the pages of your website. You can get the code from your Facebook Ads Manager.

The code will look something like this:

fb pixel code

If you are using WordPress, there will be an option in your theme’s settings where you can add such scripts. I use thesis theme and it has a placeholder to include such scripts on my website.

This script should load on all the pages of your site. If your theme doesn’t support it, there are plenty of plugins that can help you insert JS codes on your websites. You will get some if you Google about it.

Now if you deploy the Facebook Pixel code on your website and do nothing nothing else, Facebook still collects all the information about Facebook users on your website.

Whenever someone visits your website, and if they have logged into Facebook using the same browser, Facebook tags this that the specific user has visited this website and also records their behaviour such as the URLs of all the pages visited!

These visitors will have different kinds of behaviour on your website. One person may visit 10 pages on your site, another person may visit only 5 pages.

Facebook Pixel collects all these information and stores it on their servers. You can use this information on a later date to create custom audiences and custom conversions (explained in the later part of this article).

You Can’t Tag 100% of Your Visitors

Let’s say 100 visitors come to your website and navigate to different pages. Usually 70-80% of this audience are also on Facebook and have used the same browser to login into Facebook. In some industries the numbers could be low.

The others (remaining 20-30%) may have a Facebook account, but Facebook can’t know who they are and the tagging doesn’t work since they are not logged into Facebook using the same browser or device. This is still OK because almost everyone is using Facebook and 70% tagging is still great.

Creating & Installing the Pixel

So it is recommended that you install the Facebook Pixel today. I mean now. You can go and install the FB Pixel and come back to this page to read the rest of the article!

If you already have a Facebook Ads account, this will be inside Tools -> Pixels in your Facebook Ads manager.

install pixel

After a month you will have so much data inside your Facebook ads account. You can get deeper insights into your website visitors, boost posts efficiently, create ads that convert and retarget people with intelligent rules.

So when I am running an Ad campaign on Facebook for my free digital marketing course, I exclude the people who have already subscribed to my course. I don’t want them to see the ad because they have already subscribed. This is explained in detail in the custom conversions and conversion optimization section in this article.

However when I am sharing a blog post on my Facebook page, I run a ‘Boost Post’ campaign only targeted at the people who have already visited my website – because they are more familiar with my brand and are more likely to visit the blog post and read it. More on this later!

Before we get into Boosting Posts and Optimizing the ad for conversions, let us understand everything about Facebook Audiences:

Audiences & The Facebook Pixel

Facebook ads are all about the right targeting. It can make or break a campaign. The best Facebook marketers differ from the mediocre marketers because the best marketers target the right people who are likely to convert – resulting in low ad cost and high conversions.

You just can’t ignore targeting as a digital marketer and you can’t ignore Facebook. And if you can’t ignore these two, you definitely can’t ignore the mighty Facebook Pixel.

There are three types of Audiences in Facebook:

  • Saved Audiences
  • Lookalike Audiences (FB Pixel has a minor role here)
  • Custom Audiences (here’s where Facebook Pixel plays major a role)

First let us learn what Saved Audiences and Lookalike Audiences:

1. Saved Audiences

This is the simplest form of targeting. Here the Facebook Pixel is not required. You can categorize your audience based on specific data points and save it for future use.

For example, you can target all the people in Bangalore in a specific age group, who have interests in certain topics. You can save this audience and inside the audiences tab they show up as ‘Saved Audiences’.

A store which sells baby products can target new parents who have kids between 0-3 years (believe it or not, such type of targeting is available and it actually works!).

Here’s a saved audience from my account:

saved audience

In my case, it is people who are interested in digital marketing and related topics, who are from major cities in India and who are aged between 24-45.

I used this targeting option a while back for a campaign to promote my free digital marketing course. I am not using Saved Audiences any more (you will learn why in the conversion optimization part of this article).

Saved audiences are the most basic type of audience segmentation. There is not much to get excited here. Such type of audience segmenting can be done with Google, Twitter and LinkedIn ads as well.

Almost all the ad platforms have some targeting options – otherwise there isn’t going to be any difference between traditional advertising and digital advertising!

2. Lookalike Audiences

You custom audience is not going to be very large. Your saved audience may not be targeted enough.

Instead of trying to create a saved audience that is most likely to convert on your site, you can seek Facebook’s help in extrapolating a specific type of audience that you already have.


I can create a lookalike audience based on the people who ‘Like’ my Facebook page and Facebook will create a list who look like the people who have Liked my page.

Here, Facebook uses its own algorithm to come up with the list. It may include things like age, demographics and psychographics (that’s a scary area – FB knows a lot about you).

If I want to target more users who are similar to the users who have purchased an ebook on my site, I can create a Lookalike audience on Facebook!

But to create this audience, Facebook needs to know who purchased my ebooks in the first place. How would Facebook know that? The Pixel of course! (For this we have to develop the custom audience first, as explained in the next section).

There are different sources from which Lookalike audiences can be built:

  • Custom audiences (Customer list upload)
  • Website Custom Audiences (Users who visit your website) – FB Pixel Plays a Role
  • Conversion Pixels (Users who convert) – FB Pixel Plays a Role
  • People who like your page – your fans and followers
lookalike audiences fb

As you may have noticed from the above list and screenshot, some types of Lookalike audiences doesn’t need the Pixel, and some do.

Obviously, the Lookalike audiences that you build using the Pixel will be far more powerful than the other types of audience.

3. Custom Audiences

To create a custom audience, click on Create Audience and click on Custom Audience.

create custom audience

There are three types of custom audiences:

  • Customer List (You upload a list of emails and/or phone numbers)
  • Website Traffic (People who visit your site and various pages)
  • App Activity – We will not cover this today in this article, let’s learn about apps some other day
custom audiences

Customer List: is an audience created by uploading a list of contacts. Obviously, there is no need of the pixel here. If you have, say 5,000 people registered on your website, you can upload them and Facebook will match the email IDs from your list to email IDs registered on Facebook.

Since people usually use multiple email IDs for different purposes, you can expect around 70-80% of the emails to match in the B2C segment and around 30-50% match in the B2B segment.

While you are running the ads, you can include or exclude this audience depending on what type of ad you are running.

If you are going after new audiences, exclude your existing customers. If you are releasing a new feature, you can advertise it only to your existing customers.

And you can create lookalike audiences based on this custom audience. List based audience has its limitations. It is not scalable and not all the emails match. The real power of Facebook audiences is in the Website Custom Audience.

Website Traffic: With this type of audience you are creating a list of people who visit your website. As we have already discussed, this is the most important area where we put the Facebook Pixel to work. This type is also called: Website Custom Audiences.

Note that there is going to be only one Pixel per Facebook ads account. But you can use the same Pixel on multiple websites. (The only downside here being: anyone can find out all the websites that you own if they notice that all your websites use the same Facebook Pixel).

The first custom audience that I built was: Website Visitors in the past 180 days.

The Pixel is on all the pages of my website and anyone who visits my website comes under this custom audience.


Till date I have more than 25,000 people tagged on Facebook under this segment.

180 Days is the maximum number of days you can save this audience segment. Anyone who visited your site before 180 days will not be counted here.

But anyone who did not visit your website for 6 months is not going to remember you anyway, so it is as good as a new audience. There is some logic in it, right?


I use this Custom audience segment in multiple ways. If I am running a campaign to gain more subscribers for my free digital marketing course, I exclude this audience since they have been to my site and seen my offer already.

If I am running a Boost Post campaign to get more traffic back to my blog post, I target the ad only to the people who have visited my site before. More on this is explained later in this article.

Website Custom Audience aggregation is like building a subscriber list – except that you can’t have their email ID and since they are Facebook’s users, you have to pay Facebook to reach them.

Intelligent Audience Combinations

With Facebook Pixels you can create intelligent combinations for various campaigns.

For example, if someone has visited your home page but not your pricing page, you can create an ad that is targeted only to these people.

Here’s an example from my Facebook Ads account for my website.

Here, there are 2,700 people who have visited my home page but not my Books page. I can run a campaign showcasing my books to this audience and get them back to my books page (and hopefully make some sales out of it).

Screen Shot 2016-02-10 at 10.16.19 PM

Note that all these audiences are rounded off to the nearest 100.

Such audience sets can be really used well in certain contexts. For example, if someone visits your website but they have not visited the demo page, you can now follow them around the web and ask them to visit the demo page so that they can get an idea about how your product works.

This can also be used for Hiring!

Let’s say someone visits the jobs page of your website but has not applied yet, you can run an ad such as “Are you still looking for a job with us? Apply now”.

The possibilities are endless and only limited by your imagination!

Boost Post to Custom Audiences

One of the best uses of Facebook Pixel is in boosting your Facebook Posts.

If you have a Facebook page with 1000s of likes and if a good percentage of likes came from internal Facebook promotion – you will eventually find out that the people who like your page are not your target audience.

In fact, the quality is so low that it feels like they are fake profiles ‘Liking’ us.

Some even complain that Facebook sends you fake likes from fake profiles. I am yet to completely investigate that part.


For example, this guy who runs the channel called Veritasium made a video calling out Facebook as Fraud and the video got 4 million views.


I wouldn’t go to that extent calling them a fraud. It’s just that boosting your Facebook page for likes doesn’t seem to work that well.

But there are things with Facebook that work. In fact, this video was detrimental to me because it created a -ve perception of FB ads for me and I delayed implementing FB ads.

So, do not pay Facebook just to get more likes to your page. The people who like your page are not going to be highly engaged users. They will just hit the Like button without ever leaving Facebook.

You need visitors who live more of their life outside Facebook, reading articles and engaging on websites like your’s.

If your FB page likes are gained from your website visitors by placing a Like button on your website, then those likes are going to be more targeted users. I recommend doing that. I see most of the bloggers doing it and it works well.

Retargeting Your Website Visitors

In my opinion, the people who visit my website through search engines, direct traffic or from other sites are a far more targeted audience for reading my blog posts again than people who like my page on Facebook.

Returning visitors are more likely to remember my brand, feel familiar with my brand, engage in my posts and more likely to share it again on social media.

If I want to boost my posts within my Facebook page, I would do it only to the people who have visited my website already.

Whenever I publish a new blog post, I spend a few dollars in boosting the post and when I do that the target audience is people who have visited my website in the past 180 days. I end up getting clicks for less than $0.10 a click.

For example, here’s a Facebook Post (that links to my blog post) that I boosted.

It has reached 4,219 people and it has got 54 likes. This reach is paid + organic reach.


If you click on the number link (in this case the 4,219 people reached), you will get a popup which shows all the stats for this specific post as shown below.

Here you can see that there has been 71 clicks to my website. The other clicks can be ignored. They are just clicks inside FB, not clicks leading to your site.


But here’s the interesting part, though 2,591 people have been reached organically through this post, the organic reach has given me only 23% of the clicks.

The paid boosting reached only 1,628 people (38% of total reach) but it has given me 77% of the clicks.

That’s because when Boosting the post, I have set the targeting as – 180 days of website visitors.

The paid reach was sent to people who have visited my site before. The organic reach mostly went to the people who have ‘Liked’ my page.


If you click on View Results instead of the number of people reached, you will see separate stats for only the paid promotion.

Here, you can see that I have spent only $2 on the boost, but I have got 55 clicks which means that I paid only $0.036/click – around Rs.2.5/click.

Since I have a conversion pixel installed on the site, this Boost Post shows me that I even got a subscriber to my free digital marketing course.

And 9 people have liked my page! These are people who have visited my website before, so here, the Likes are of more quality.

Boost Post with No External Links

Such promotions work even better if you are just boosting a post with pictures or videos in it. They are even cheaper because users are not leaving Facebook and you are rewarded with cheaper reach. People also engage better in such posts because they are not leaving Facebook while viewing your photos.

For example, I recently boosted a post containing 3 pictures of me conducting a digital marketing workshop at IISC.

I wanted as many of my website visitors to know that I conduct workshops so that they can look forward to the next workshop.


I spent only $5 on this promotion – targeted at the people who have visited my website before and I got 957 photo clicks.

That’s just $0.005 per photo view. Rs.0.34 or 34 paise in INR!

I have also got 50 Page Likes – from people who have visited my website before.


You may wonder why I spent $5 on a post which is not going to give me traffic. But the people who view this post are not random people, they are people who have visited my website before.

Such engagement helps brand recall and deepens the relationship between my brand and my followers.

When I launch another workshop, I am likely to get more attention because now most of my followers know that I conduct workshops.

I had also made a blog post about the workshop I conducted and also sent an email to all my subscribers, but not everyone would have seen it.

Usually only 30% of emails get opened, even if 100% are active subscribers. Facebook helps bridge that gap.

Pixel Helps in Refining the Targeting

Facebook Pixel helps a lot when I am advertising for new audiences on Facebook. When I want to gather new subscribers to my blog, I don’t want to target existing website visitors or customers. I am going after new audiences who have never heard about me.

ad set

Such exclusions helps in increasing the conversions because it would cost money to show the ad to someone who has already been to my blog and registered to my course.

Do not get confused with Custom Audiences and Custom Conversions – they have a lot of similar characteristics.

For example, custom conversions can be included as custom audiences in your ad. You will understand it when you run a few campaigns.

Setting Up Custom Conversions

The next part where Pixels help is in advertising directly to Facebook’s audience. In the beginning of this article I explained that the Facebook Pixel helps in Conversion Optimization and Attribution. To make this work we first have to setup Custom Conversions.

Go to Tools -> Custom Conversions

setup custom conv

Since we have Facebook Pixel loading on all the pages by default, there is no need to place a separate conversion pixel on the final page.

Here you just have to define the conversion as people visiting a specific page by using ‘URL Contains or URL Equals’

custom conversions

I have only one conversion setup in my account and that is people who have registered for the free digital marketing course.

People who complete the registration after clicking on the confirmation link on their email, reach this page: /registration-confirmation-free-dmcourse/ (This is the URL I give in the field as shown in the screenshot above)

So anyone who reaches that page after clicking on the ad means that they have converted! This is a custom conversion!

custom conv

One thing you can note here is that there are only 20 custom conversions available per ad account.

And as mentioned before any audience inside custom conversions can also be used as a custom audience! You can notice it in the exclusions I have setup (the 4th screenshot above, from here).

Conversion Optimization Using Pixels

The real magic of Facebook Pixel is in Conversion Optimization.

This is the sweetest part and I have saved it for the last. Remember that I told you I am not using Saved Audiences anymore?

That’s because now I am using Facebook’s conversion optimizer while I am running the ads.

Facebook knows who click on the ad and convert because you have the Facebook Pixel installed on our website.

The Facebook ad engine can auto optimize the ad to be only shown to the people who are likely to convert. This targeting is not just based on the interests but a lot of other factors.

How it Works:  Facebook will do a mega split test inside the system. Here’s how to understand this in a simple way: It will show the ad to 100 people with a set of similarities and check how many people convert. It will show the ad to another set of 100 people with similar characteristics and check the conversion.

Once it understands what type of audience is more likely to convert, it will show the ad only to those people.

So here, Facebook helps you target better, because you are letting Facebook know who converts (using the Pixel).

This part is very important, so let me repeat:

“Facebook ad engine can auto optimize the ad to be only shown to the people who are likely to convert.”

So you can target a very broad audience and let Facebook optimize the ad for you and narrow your targeting – while you sleep. Literally!

To run such an ad, you just have to select: Optimize for Conversions when you are setting up your ad in the power editor.

op for convert

My ad performed extremely well because I ran an ad targeted at conversions and not just clicks to my landing page.

This means that instead of trying to get more clicks from the ad, Facebook will try to get more conversions.

These conversions are not just people filling up the form but double-optin confirmed subscribers who land on the final page after confirming their email ID!

ad 2

Note that this metric (cost per conversion) is only for ease of understanding the efficiency of the ad campaign. Facebook doesn’t actually charge for conversions.

They charge for impressions based on how many people are targeting the same audience. The do the math and show you the metric in cost per conversion.

Final Words

I hope you found this guide useful. This is one of the most detailed articles I have written in recent times. Facebook is a great platform and you can grow your business if you know how to make Facebook Ads work for you.

This article was possible because I am writing from personal experience and not just after reading other blog posts about Facebook ads!

There are still some things which are not covered in this guide because they are more technical and most us wouldn’t use it for now:

These topics will be covered in future posts.

Some references from Facebook:

Other Related Articles on my Blog:

Thank you for reading! Any Questions?