Expand Navigation HeaderCollapse Navigation Header
Create Ads from a Facebook Page
Beginner's GuideFeaturesBoost PostsPage LikesCall-to-ActionWebsite VisitorsWebsite PurchasesWebsite Purchases With Your CatalogAutomated Ads
Create Ads from Ads Manager
Create Campaigns, Ad Sets, AdsEdit CampaignsEvent AdsOffer AdsLead AdsDynamic CreativeCreative TipsMobile App AdsFacebook Ads Manager for ExcelBid StrategiesBudgetsDelivery
Create Ads from Instagram
Beginner's GuideAdvertising from InstagramInstagram Shopping
Create Ads from the Ads Manager App
Ads Manager App
Objectives
Brand AwarenessReachLead GenerationBrand ConsiderationMessagesDynamic AdsAutomotiveTravelCollaborative AdsConversions
Audiences
AudiencesCustom AudiencesLookalike Audiences
Formats
ImageCarouselCollectionInstant ExperienceVideo & SlideshowStoriesBranded Content
Placements
Placement OptimizationInstagramMessengerAudience NetworkMarketplaceFacebook In-Stream Video
Track Ongoing Campaigns
Track Ads in Ads ManagerAutomated Rules in Ads Manager
Ads Reporting
MetricsFacebook Ads Manager for ExcelAudience InsightsView Results & Run ReportsAnalyze Results
Optimization
Facebook Attribution
Events
Offline ConversionsApp EventsFacebook Pixel
Experimentation
Experiment ConceptsA/B TestingExperiments ToolFacebook-Managed Tests
Payments Settings
Monthly Invoicing
Billing
How Billing WorksPayment MethodsSpending LimitsTaxesAbout Manual paymentsBudgets
Management Tools
Business ManagerUsers in Business ManagerAccounts in Business ManagerData Sources in Business ManagerSecurity and Safety in Business ManagerLeads CenterCatalogsCreative HubConnect Your WebsiteBrand SafetyAd Account PermissionsBusiness Suite
Policies
Ads About Social Issues, Elections or PoliticsPersonal HealthCryptocurrencyAdvertising Policy on Real Money Gaming and Gambling (RMG)Drug and Alcohol Addiction Treatment

Business Help Center

Business Help Center

Create and Install a Facebook Pixel

Get help, tips, and more...
Last updated: Dec 18, 2020

Create and Install a Facebook Pixel

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
    • Click Launch Event Setup Tool to add events and parameters without additional coding.
    • Follow the onscreen instructions to add events to your website.
  13. Click Done.
Use a partner integration
  1. Go to Events Manager.
  2. Select the pixel you want to set up.
  3. Click Continue Pixel Setup.
  4. Click Use a partner.
  5. Select a partner from the list.
  6. Follow the onscreen setup instructions.

You can also set up your Facebook pixel on your website by going to the Partner Integrations page, selecting your partner and following the onscreen instructions. Learn more about the benefits of using partner integrations to set up your pixel.

If you don't see your platform, use 1 of the other 2 ways to set up your pixel.

Email instructions

If someone else updates the code on your website, follow these steps to email them your Facebook pixel setup instructions.

  1. Go to Events Manager.
  2. Select the pixel you want to set up.
  3. Click Continue Pixel Setup.
  4. Click Email Instructions.
  5. Enter the recipient’s email address.
  6. Click Send at the bottom of the page.

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.

Was this information helpful?

EVENTS |

Facebook Pixel