How can we help you?

How to set Up Facebook Pixel?

Last updated on January 26, 2025

The Facebook Pixel is a piece of code you add to your website to track user activity, measure conversions, and optimize your Facebook ad campaigns. It helps you understand how your website visitors interact with your content and refine your targeting strategies. Here’s how to set it up:

Step 1: Access Your Facebook Ads Manager

  • Log in to your Facebook Ads Manager account at https://www.facebook.com/adsmanager.

  • From the top menu, click on the Hamburger icon (three horizontal lines), go to Events Manager, and click on Pixels under the Data Sources section.

Step 2: Create a New Pixel

  • Click the Add button to create a new pixel.

  • Name your pixel (e.g., "My Website Pixel") and click Create.

  • Accept the terms and conditions if prompted.

Step 3: Install the Facebook Pixel Code

  • Once your pixel is created, you’ll receive the Facebook Pixel ID and the pixel code.

  • Copy the entire Facebook Pixel code.

Step 4: Add the Pixel Code to Your Website

  • Paste the Facebook Pixel code into the <head> section of your website’s HTML.

  • This code should appear on every page of your website where you want to track user behavior.

  • If you're using a tag manager like Google Tag Manager, you can add the Facebook Pixel through the platform’s interface.

Step 5: Set Up Events (Optional)

You can track specific actions that users take on your website, such as page views, purchases, or form submissions. Facebook provides several standard events to track common actions, such as:

  • PageView – for tracking when a user visits a page.

  • Lead – for tracking form submissions or sign-ups.

  • Purchase – for tracking when a user completes a purchase.

Here’s how to set up an event:

  1. After creating the pixel, click on Set Up Events.

  2. Select the event type you want to track (e.g., Purchase, Lead, Add to Cart).

  3. Follow the instructions to add event-specific codes on the relevant pages (e.g., adding the "Purchase" event code to the confirmation page after a successful transaction).

Step 6: Verify the Pixel Installation

  • Once you’ve added the Facebook Pixel code to your website, you need to verify that it’s working properly.

  • Use the Facebook Pixel Helper Chrome extension to check if the pixel is firing correctly.

  • This tool will show you whether your pixel is installed properly and if the events are being tracked.

Step 7: Monitor and Optimize Campaigns

  • After your Facebook Pixel is installed and collecting data, you can start to track website activity and conversions from your Facebook Ads Manager.

  • Use the data to improve your ad targeting by creating custom audiences and lookalike audiences based on user behavior.

  • You can also optimize your ad campaigns by adjusting the bidding strategy based on the conversion data.


Troubleshooting Tips for Facebook Pixel

  • Pixel Not Firing: Ensure the code is placed correctly in the <head> section of your website. Double-check that it’s on every page you want to track.

  • No Data Showing: It can take up to 24 hours for data to appear in your Facebook Ads Manager. Be sure to wait a bit before troubleshooting.

  • Event Tracking Not Working: If you set up specific events, make sure the event-specific code is on the correct page. For example, the "Purchase" event code should be on the order confirmation page.


Additional Resources

Did not answer your question?
Contact us