How to Create a Facebook Pixel

Aashish Kasma|5/19/2021, UTC|6 MIN READ|
//How to Create a Facebook Pixel


Facebook pixels collects data that helps you track conversions from Facebook ads, optimize ads, and build targeted audiences for future ads.

Step 1: Create your pixel

  1. Go to Facebook Events Manager page and click the three horizontal bars icon (≡) in the top left, and choose Pixels.                                                                                                                                    
  2. Click the green Create a Pixel button.
  3. Name your pixel, enter your website URL, and click Create.

Step 2: Add the pixel code to your website

Next you need to install the pixel code on your website to begin gathering the data. You have the following ways to set up your pixel:


  1. If you use an e-commerce platform like Shopify you can install your pixel without having to edit your website code directly. Check this Facebook Help article on how to.
  2. If you work with a developer or someone else who can help you edit your website code, click “Email Instructions to a Developer” to send your developer everything they need to install the pixel.
  3. If neither of the above options apply you need to insert the pixel code directly into your web pages as follows:
        1. Click Manually Install the Code Yourself.
        2. Copy-and-paste the pixel code into the header code of your website. That is, post it after the <head> tag but before the </head> tag. You need to paste it into every single page, or into your template if you’re using one.
        3. Select automatic advanced matching if you want to track conversions more accurately and create larger custom audiences.
        4. Check whether you’ve installed the code correctly by entering your website URL and clicking Send Test Traffic. Once your Facebook pixel is tracking activity click Continue.

      Step 3: Start tracking the right events for your business

      Check out our previous article, What is a Facebook Pixel and 5 Ways to Use It,  to learn about the 17 Facebook events you can track. For each event you need to choose whether to track on page load or on inline action.

      • Track event on page load: Use this to track actions that involve going to a new page, like a purchase complete or sign-up success page.
      • Track event on inline action: Use this to track actions within a page, like clicking an “add to cart” button that does not open a new page.

      If you want to track custom events, go to your Facebook Events Manager, choose Custom Conversions from the top left menu, then click Create Custom Conversion to define your custom conversion event using URL rules.

      Step 4: Confirm your Facebook pixel is working

      Before you use Pixel data, check if it is being collected properly.

      • Add the Facebook Pixel Helper extension to your Google Chrome browser. (It’s only available for Chrome.)
      • Visit the page where you have installed the Facebook pixel. If the extension finds the pixel, the </> extension icon will turn blue and a popup will indicate how many pixels it finds on the page.                                                                                                                                                                                

      Step 5: Add pixel notice to your website

      You need to let your customers know that you are collecting all this data through Pixel. This is a rule as per facebook.

      Read our other articles in our Series on Facebook Advertising:

      Lucent Innovation is a full-service Shopify web design and development company. We build ecommerce websites that are ready to sell, scale, and grow.

      Contact us for your next project:


      Aashish Kasma

      Looking for



      Lets Discuss

      Why Lucent...



      Learning comes not only with training but it comes as we facilitate the learning of the organization as well as individuals and the clients continuously refurbishing ourselves.



      We believe in Innovation and have started our company based on that concept. When you don't transform you become stagnant.
      Innovation arrow Transformation
      arrow Growth.


      Team Work

      We work efficiently as a team. We self-monitor. We deliver results efficiently with the help of multiple perspectives and skill sets. We form strong working relationships as we communicate well with each other.

      Lucent innovation
      We are a family filled with talented experts that help global brands, enterprises, mid-size businesses or even startups with innovative solutions.
      Accelerate your tech projects with us. Get in touch with us.
      Follow us
      lucent innnovation: cltuch

      Lucent Innovation, © 2023. All rights reserved.Privacy policyDMCA compliant image