AdEspresso

Facebook Advertising Optimization Tool

  • How it works
    • For Agencies
    • For e-Commerce
    • For Small Medium Businesses
    • For Every Advertiser
  • Features
    • Create
    • Manage
    • Analyze
    • Collaborate
    • Learn
    • All Features
  • Academy
    • Blog
    • Guides
    • Webinars
    • eBooks
    • Facebook Ad Examples
    • Case Studies
  • Services
  • Pricing
  • Signup
  • Login
You are here: Home / Blog / How to Master the Facebook Pixel Like a Pro (in 2021 and beyond)

Academy

  • Guides
  • eBooks
  • Webinars
  • Blog

How to Master the Facebook Pixel Like a Pro (in 2021 and beyond)

December 17, 2020 28 Comments Ana Gotter

Out of all of the incredible tools Facebook has created for marketers, perhaps the most useful is the Facebook Pixel.

The pixel allows you to monitor how successful your Facebook Ads actually were—giving you more accurate conversion stats—and create custom audiences based on site traffic. Anyone running Facebook Ads should absolutely, without a doubt have the pixel installed.

AdEspresso mascot shooting arrows at targets, "Facebook Pixel Complete Guide"

In this post, we’re going to go over everything you need to know about the Facebook Pixel, including what you can do with it, how to install it,  tools that can help,  and how to sidestep new pixel limitations caused by privacy concerns and updates. 

8 Reasons Why You Need the Facebook Pixel

Simply put, if you’re sending traffic to your website the Facebook pixel is the difference between success and failure.

The Facebook pixel gives you powerful audience building and tracking options, plus a few more perks including:

  1. Track the number of conversions like newsletter signups or purchases, the cost per conversion (CPA) and the conversion rate (CVR).
  2. Revenue reporting: most e-commerce carts can pass the actual order value back to Facebook. This allows you to measure return on ad spend (ROAS).
  3. Analyze your sales funnel. For example, at AdEspresso we might analyze Leads > Trials > Purchases as our customer journey. In e-commerce you would look at the number of products viewed and compare to the number of add to carts, the number of checkouts initiated and the number of purchases. If the conversion rate is lower than expected at any stage that’s where you can focus your efforts when refining the sales funnel.
  4. Build website custom audiences (WCAs) of all website visitors for retargeting.
  5. Create audiences of people that have taken the desired action (leads, purchases etc) to exclude from retargeting. This saves you money and stops leads and customers from getting annoyed.
  6. Create lookalike audiences in seconds. These pixel-based lookalikes will dynamically update over time so they will always be relevant when using them in cold traffic campaigns.
  7. You can optimize for conversions. A recent AdEspresso $1,000 experiment showed that optimizing for link clicks cost 3.4 times more per conversion than when optimizing for conversions. Simply put the pixel allows you to get the same results for $1,000 that you’d get by spending $3,400 on ads when not using the pixel.
  8. Dynamic product ads can be created, allowing you to retarget recent website visitors with the exact products they viewed.

via GIPHY

Keep in mind that the pixel can’t work retrospectively, it can only create audiences and track conversions going forward once it has been installed. With increased concern about user privacy, an increasing number of changes on and off-Facebook are impacting the pixel’s true reach. We’ll look at this more later on.

The website custom audiences are valid for up to 180 days so if you install the pixel now it could still be helping your Facebook advertising six months down the line.

How to Create Your Facebook Pixel

Each pixel has its own unique 15 digit ID, which you’ll install on every page you want to track on your site.

There’s two ways to generate your unique code: Through Ads manager and through Business Manager.

Method 1: Through the Ads Manager

Click on the drop-down menu in the top left corner once you’ve navigated to the Ads Manager, and click on “All Tools” at the very bottom of the options.

Then select “Pixels.”

Facebook's business manager showing the "Ads Manager" highlighted

This is what you’ll see when you land on the pixel page:

Facebook pixel page

When you hit “Create a Pixel,” all you’ll have to do is name the pixel in order to create it.

"Create a Pixel" page requiring you to name your Facebook pixel

Method 2: Through your Business Manager

Within Business Manager navigate to the pixel section on the left-hand menu and create a new pixel.

Facebook pixel installation

Just as with the ads manager option, give your pixel a name.

Finally, you’ll want to assign the pixel to certain ad accounts so that it can be used in your ad campaigns.

facebook pixel assign to ad account

Once you’ve done either of these methods, you just have to decide how you want to install it.

Which brings us to our next section…

How to Install the Facebook Pixel

When you create your pixel and once it’s time to set it up, Facebook will automatically present you with several different ways to install your pixel.

For this guide, we’re going to show you:

  • how to install the tracking pixel manually
  • and how to easily install the pixel on Shopify stores.

If you’ve found us because you’re actively searching for how to install the pixel, read through this post in its entirety before starting to add it to your website.

We’re also going to show you how to install specific events into the code, so wait to read that before clicking away and starting the installation process!

Traditional Manual Installation

Manual installation is the traditional and most common way to install Facebook’s tracking pixel. When you’re on the Pixel page in the Ads Manager, you’ll see the option to “Finish Setting Up Pixel” if it’s not installed yet. Click this.

When you see this, you’ll be shown three different options. Go ahead and choose “Install Manually”.

On the next screen, you’ll see an enormous box of text code in step 2.

That’s your pixel. Copy it.

You’ll install it into the header of every individual page on your site that you want to track.

Facebook tracking pixel installation showing the pixel code

When you click to your site get behind the scenes and, go to each page’s code.

You’ll then install the pixel in the header:

Facebook pixel code

 

As you can see in the screenshot below, you can also set advanced options (like custom events) and choose to delay pixel firing by a custom number of seconds.

Advanced Facebook pixel features

Need more help? Watch this tutorial:

[/box]

Installing the Facebook Pixel in Shopify

Have a Shopify store you want to install the tracking pixel on? This is actually pretty easy.

First, find your pixel ID.

This can be found on the main Pixel Page, under the pixel’s name.

Example of Facebook Ads Pixel ID

Copy the pixel ID, and then head to your Shopify Store.

Once there, navigate to Preferences, located towards the very bottom of “Sales Channels”.

Once there, scroll down until you see “Facebook Pixel.”

All you have to do now is paste the pixel ID that you’ve already copied from Facebook right into this box:

Shopify dashboard to set up Facebook pixel

Aaaaand you’re set!

How to Add Events to Your Facebook Pixel

After installing the Facebook pixel, you’ll want to add “events” to it in order to determine what you’re actually tracking.

You would, for example, place an extra snippet of code to the end of the pixel when someone adds an item to their cart. You can create custom events, even outside of the ones offered by Facebook.

add events to facebook pixel

How Privacy Concerns & Data Limitations Can Impact Pixel Efficiency

Over the past two years, it’s been nearly impossible to avoid hearing about user concerns relating to privacy and data collection from social media, and Facebook in particular.

Many users have become uneasy about how much information Facebook stores about their off-platform activity, like what sites they use and where they purchase from. As a result, there has been an abundance of new features to give users more control over data collection… both on and off platform.

Facebook allows users to go through their settings and shut off data tracking. While some privacy-focused users did this almost immediately, the reality is that most did not. They didn’t seem to realize it was an option, or didn’t want to go through the hassle. Pixel performance wasn’t impacted significantly.

Facebook's dashboard that allows you to turn off tracking activity

The biggest change that can impact the pixel’s efficacy, however, has most recently come from Apple. Their latest big iOS update rolled out new features that actually require users to opt in to data collection for each app; if they don’t the default is that the apps can’t access information.

Since mobile usage is so significant, dominating Facebook usage, this is actually a pretty significant hit. If the pixel isn’t able to track data from large numbers of users, it can reduce your custom audience sizes, impact conversion data, and affect optimization.

How to Get Around the New Pixel Limitations

If you felt your heart start to pound thinking about a less-than-effective or not-so-far-reaching Pixel, we hear you.

The good news, however, is that there is a way around this. Facebook’s Conversions API tool allows you to track data on your own site like pages viewed and conversions event and then send that information to Facebook’s servers… no pixel required.

You can have your own cookies tracking this information and still use it to create retargeting campaigns, custom audiences, and more without the pixel needing to be in use.

In your Events Manager, go to view your pixels, and then choose “Connect Data Sources.”

Image of the Facebook Events Manager

You’ll then set up web events using the Converesions API.

Facebook manager for Conversions API set up

This will generate an access token, which you’ll keep somewhere safe.  You can then choose to have a developer install the API or to implement it yourself. You’ll do this by sending a server event to yourself, which you can see how to do here.

Facebook Conversions API set up with a prompt to generate an access token

 

How to Set Up Advanced Matching with the Pixel

Do you have advanced matching turned on for your pixel? It’s turned off by default so most advertisers aren’t using it… but you can activate it in under 60 seconds.

Advanced matching allows Facebook to take user-submitted data from your website (such as email addresses and phone numbers) to give more accurate matches and larger custom audiences for retargeting.

Facebook Ads dashboard showing how to set up advanced matching

Don’t Forget to Protect Your Pixel

A few days ago we discovered the AdEspresso Facebook pixel had been installed on a website for people looking for “clubs and bars” in Tokyo. That means we were retargeting people not interested in our product and wasting our money. A simple, quick audit of our Pixel fixed the problem.

This could be happening to your business too, right now. But do you know how to stop this?

With Facebook advertising, it’s important to audit your assets every so often. Pixel auditing should be part of your routine Business Manager auditing.

Every time I take on a new client I generally find old employees still with admin access, old pixels on their website and all sorts of junk that need tidying up. You can see who has access to your pixel, and remove anyone if necessary. And if you notice anything suspicious happening with your business or ad account, make sure you contact Facebook directly here.

Conclusion

Even with recent changes that give users more control over data tracking (or that even opt-them out on default), the pixel is still an invaluable tool that all businesses should be using. You can still gain  information from it, especially since plenty of users don’t have data collection disabled.

Facebook can’t fully optimize your campaigns without information coming from the pixel, so installing it correctly, adding to your data with the Facebook Conversions API, and letting Facebook do the rest is the way to go.

What do you think? How much do you benefit from Facebook’s tracking pixel? Leave us a comment and let us know what you think!

You may also like reading:

  • Social Commerce 101: How to Make Money Selling on Social
  • 63 Instagram Caption Examples for 2023 (And How to Write Your Own)
  • 15 Fresh Facebook Ad Examples to Inspire Your Next Campaign [2022]
  • How to Create a Facebook Business Page (The Easy Way)

Comments

  1. Imran Nazish says

    September 27, 2017 at 1:36 pm

    Thank you sharing such a nice article about FB Pixels, I was skeptical about it and now understand its benefits. Actually, I have added it a year ago but never used for marketing purposes or anything else but will utilize it for next campaign.

    Reply
    • Rome Ali says

      January 21, 2018 at 6:57 pm

      I have an FB PIXEL installed in my website. But I do not know how it is doing or to read it.

      Reply
  2. Prashant says

    September 28, 2017 at 11:27 pm

    Hi,

    I have a concern that, if a payment method is not added in Facebook ad account then the Facebook lead event will be tracked or not?

    Awaiting your response.

    Thanks,

    Reply
  3. Natalia says

    October 9, 2017 at 12:26 pm

    Hi Ana! Another incredible article 🙂

    Question: how many “events” does the Facebook pixel need to register before it’s considered statistically useful? E.g. if I install the pixel and get 10 subscriptions, should I wait until I’ve gotten 100 before I build audiences based off the event? 1000? 500?

    Reply
    • Gil says

      October 18, 2017 at 9:11 am

      Hi Natalia,

      The minimum size to build a lookalike audience is 100; however, you really want at least 500-1000 to give FB better data to work with.

      Another great article, Ana, I need to give Pixel Caffeine a try next time I’m working with a client with a WP site!

      Reply
  4. Sanju Joseph says

    October 17, 2017 at 8:58 am

    Great content & Great Plugin! Will surely give it a try. Thank you

    Reply
  5. bill says

    November 2, 2017 at 10:13 am

    Very helpful article, and I’ll have to check out the plugin.

    What about having more than one pixel on a site? Does that cause problems?

    Reply
  6. Karol says

    January 5, 2018 at 5:17 am

    wonderfull article! thanks! I’ve installed Pixel yesterday but i still do not understand 3 things about it.
    1. I assume that it tracks only logged in facebook users, right?
    2. I understand that i cannot simply tell from it that particular ppl who for example used contact form were brought to my site with a particular ad? Please, correct me if I’m wrong 🙂
    3. If I used the Pixel’s collected data to create custom ad audiences – will facebook use these data as representation of target audience OR ppl who visited and performed actions will be used as the target?

    Thanks in advance! Best wishes!

    Reply
    • Rome Ali says

      January 22, 2018 at 7:52 pm

      Karol, I do not know anything about FB PIXEL, but I do have one installed on my website. HOW DO I COLLECT PIXEL DATA?

      Reply
  7. K Prakash says

    January 8, 2018 at 2:16 am

    A great thank’s for share such a helpful post. I am beginner in Facebook marketing, I am running a Facebook campaign but unable to track it like web tracking through analytic. Your post relay help me to track visitor..

    Reply
  8. Rachael says

    April 29, 2018 at 1:52 am

    Thank you so much for your article! It’s really helped me a lot thus far.

    I sell event tickets through Resident Advisor, they state they can currently only install the pageview and purchase events on our pages. We currently have 3 different event pages that register pageviews. However, when a purchase is completed, it always ends on the same purchase page and is only tracked there. How do I track which purchase event is which?

    Additionally, how do I add a purchase value? We have 3 tiers of purchasing (earlybird, first release and final release). Is this possible?

    Thank you so much for your help!

    Reply
  9. PurchaseTheme says

    May 6, 2018 at 8:43 am

    It helps me lot. Thanks for the same.

    Reply
  10. Gazzaly says

    June 12, 2018 at 5:04 am

    Do you think Facebook pixel capture conversion # pages? Example –> book-a-room#/confirmation

    Reply
  11. Milan says

    July 25, 2018 at 12:43 am

    How can I track people who visited a certain page but haven’t clicked the sign up button?

    Reply
  12. Subhash says

    September 3, 2018 at 3:36 am

    Hi Guys, I am using a Signup form on my website. So there are 2 pages, one page includes the “Form” Second page is “Thank you” page. But I got confused about “Pixel Standard Events” on Both pages. What “Standard Event” should I use for the page(with form) and for “thank you” page. I found Facebook instruction is confusing

    https://www.facebook.com/business/help/community/question/?id=10212934455707679&rdrhc

    Reply
  13. Amy says

    October 3, 2018 at 2:33 am

    ***HELP*** I can’t connect my Facebook manually or via the connect Facebook button, I get this error message:

    “Cannot save on facebook account because of something gone wrong during facebook connection”

    WHYYYYYYY? I have tried on Safari and Chrome, I have downloaded the latest version of the plug-in & have tried over & over again.

    Reply
  14. micari says

    October 7, 2018 at 6:56 am

    I have 4 products that i sell in my womens boutique, so do i need a pixel for each product???

    Reply
  15. Mike Thomas says

    October 15, 2018 at 1:12 am

    I’m going to start FB ads campaign for a new Shopify store. Is facebook pixel app is a good option to start with?

    Reply
  16. art says

    October 16, 2018 at 10:08 am

    how do you read the results after the pixel is installed?

    Reply
  17. Michael Lewis says

    January 3, 2019 at 5:48 am

    Good Content
    I totally agree with post’s content.
    It is really helpful to facebook users.
    Thank you for sharing your great knowledge with us.
    Looking forward to your further tips on similar topics Thanks for sharing these wonderful tips

    Reply
  18. Dewan Rakib says

    January 5, 2019 at 11:24 am

    Thanks for the great article. I have a question. As I can create up to 10 pixels from business account, how should I implement this pixels when I have more than 10 different websites in different niche to manage? Any advice would be appreciated. Thanks!

    Reply
  19. Santhosh M M says

    February 9, 2019 at 3:59 am

    great post on managing Facebook pixel track.

    Reply
  20. viks says

    February 28, 2019 at 4:16 am

    i was wondering how the facebook pixel work and i just came across this article which clearly explain everything. thank you so much for this article.

    Reply
  21. Rich says

    March 21, 2019 at 5:15 pm

    Do you know what Facebook’s data collection and storage policies are? Does Facebook own this data?

    Reply
  22. Abdullah Prem says

    August 31, 2019 at 11:55 pm

    I would like to know, whether pixel start to record immediately or it will take time?
    I’ve installed pixel yesterday where my blogs gets 300+ traffic per day. But today i went and checked custom conversion it shows “Zero”.

    Reply
  23. Mohtashim Khan says

    May 13, 2020 at 3:32 am

    Hi there,

    I have a shopify website – mypoojabox.in in which I have installed this script recommended by you on Checkout but I have noticed that still the no. of conversions are counting twice. Refer below screenshot –

    https://uploads.disquscdn.com/images/899422c041c11c84bef1855e4b0b4515429e9dbe9c38532021aad125fcc9b7b4.png?w=800&h=365

    Here is the customized script that I have been using on checkout –

    {% if first_time_accessed %}

    !function(f,b,e,v,n,t,s){if(f.fbq)return;n=f.fbq=function(){n.callMethod?
    n.callMethod.apply(n,arguments):n.queue.push(arguments)};if(!f._fbq)f._fbq=n;
    n.push=n;n.loaded=!0;n.version=’2.0′;n.queue=[];t=b.createElement(e);t.async=!0;
    t.src=v;s=b.getElementsByTagName(e)[0];s.parentNode.insertBefore(t,s)}(window,
    document,’script’,’//connect.facebook.net/en_US/fbevents.js’);

    fbq(‘init’, ‘294416497709223’);
    fbq(‘track’, “PageView”);
    fbq(‘track’, ‘Purchase’, {
    value: ‘{{ total_price | money_without_currency }}’,
    currency: ‘{{ shop.currency }}’,
    order_id: ‘{{ order_number }}’,
    content_ids: [{% for line in order.line_items %}’shopify_{{ line.product_id }}_{{ line.variant_id }}'{% unless forloop.last == true %}, {% endunless %}{% endfor %}],
    content_type: ‘product’,
    num_items: ‘{{ item_count }}’
    });


    {% else %}
    {% endif %}

    Could you please check once and help me out. Thanks in advance!

    Reply
    • Paul Fairbrother says

      May 13, 2020 at 4:52 am

      Hi Mohtashim as all your other pixel events are firing (add to cart, initiate checkout etc) it’s likely that your purchase pixel event is being fired by Shopify. So, if you add a script to fire the purchase pixel as well, it will fire twice. The best solution most likely would be to leave the pixel events to Shopify to avoid duplication.

      Reply

Trackbacks

  1. Facebook Pixel going AUTOMATIC! – Sam's Digital Marketing Adventure: an MKF 3881 Blog says:
    August 13, 2018 at 1:14 am

    […] quote from a blog post on adespresso.com says it all: “Facebook’s tracking pixel has two major capabilities: tracking users who took […]

    Reply

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Top Resources

Your 6 Easy Steps to become a Facebook Ads Pro

  1. Beginner's Guide to Facebook Ads
  2. Facebook Ads DOs & DON'Ts
  3. The Ultimate Guide to Facebook Custom Audiences
  4. Discover how to save time & money with AdEspresso!
  5. Start your 14 Day Free Trial Now!
  6. Join our Weekly Webinars to get started!

Popular Resources

  • Facebook Ad Examples From Every Industry
  • The Complete Guide to Facebook Ads Cost
  • A Breakdown of Facebook Ad Types
  • How to Set Up Your Facebook Business Manager and Facebook Ads Manager Accounts
  • 12 High ROI Facebook Advertising Strategies

Start your free trial now!

Start Your Free Trial Now

Learn more

  • About Us
  • FAQ
  • Work with Us
  • Press
  • Contacts
  • Support
  • Marketing Services
  • What’s new

Education

  • Blog
  • eBooks
  • Guides
  • Webinars
  • Examples
  • Facebook Ads Beginners Guide
  • Google Ads Beginners guide
  • Academy

From the Blog

  • Top Facebook Updates You Can’t Miss (December 2022 Edition)
  • 63 Instagram Caption Examples for 2023 (And How to Write Your Own)
  • 17 Call To Action Examples (+ How to Write the Perfect Social CTA)

Follow us

  • Facebook
  • Instagram
  • Linkedin
  • Twitter

© 2025 · AdEspresso LLC · Terms & Privacy Policy · Copyright

This site uses cookies and other tracking technologies to assist with navigation, monitor site usage and web traffic, assist with our promotional and marketing efforts, and customize and improve our services, as set out in our privacy policy