In this article, we'll cover how to create and install a pixel on your website. To learn more about the pixel before getting started, check out the benefits of installing a Facebook pixel.

If you already created a pixel and want to find your pixel base code, skip to section 2, Add the Facebook pixel to your website. Follow the instructions to Manually add pixel code to website.

Before you begin

  • You need a website for your business.
  • You must be able to update your website's code.

Create a Facebook pixel

  1. Go to Events Manager.
  2. Click Connect Data Sources and select Web.
  3. Select Facebook Pixel and click Connect.
  4. Add your Pixel Name.
  5. Enter your website URL to check for easy setup options.
  6. Click Continue.

Add the Facebook pixel to your website

Once you've created your pixel, you're ready to put the Facebook pixel code on your website. For instructions on how to do this, choose your setup option:

Manually add pixel code to website

  1. Go to Events Manager.
  2. Select the pixel you want to set up.
  3. Click Continue Pixel Setup.
  4. Select Install code manually.
  5. Copy the pixel base code.
  6. Find the header of your website, or locate the header template in your CMS or web platform.
  7. Paste the base code at the bottom of the header section, just above the closing head tag.
  8. Click Continue.
  9. Optional: Toggle on Automatic Advanced Matching and verify the customer information you want to send.
  10. Click Continue.
  11. Add events using the Event Setup Tool or by manually adding code to your website.
  12. Event Setup Tool
  13. Click Launch Event Setup Tool to add events and parameters without additional coding.
  14. Follow the onscreen instructions to add events to your website.
  15. Manual setup
  16. Click Done.

Use a partner integration

Email instructions

Set up events

After you add the pixel base code to your website you can set up events to measure the actions you care about, like making a purchase. You can do this by manually installing the code or by using the point-and-click Event Setup Tool. Then, make sure that your pixel is working correctly.

Note: You can use one pixel across your whole website, including multiple pages of your website. However, there may be a need to use two pixels on one website. For example, if two different agencies run ads for your business, they may each need to set up a separate pixel on your website. Learn more about setting up multiple pixels on Facebook for Developers.

Did this answer your question?