Business and Marketing

How to add Facebook pixels on WordPress websites?

Facebook pixel is an essential tool for any business that wants to track the effectiveness of its Facebook ads and understand its audience better. It’s a piece of code that is added to a website and tracks user behaviour, such as page views, purchases, and clicks.

If you have a WordPress website, adding the Facebook pixel is a relatively simple process that can be completed in just a few steps. In this blog post, we will follow the steps to add a Facebook pixel to your WordPress website.

Step 1: Create a Facebook Pixel

The first step is to create a Facebook pixel. To do this, you need to have a Facebook account and access to the Facebook Ads Manager. Once you are logged in to your Ads Manager, navigate to the “Pixels” tab and click “Create a Pixel.” Give your pixel a name, and you will receive a unique code that you will need to add to your website.

Step 2: Install the Facebook Pixel Plugin on WordPress

The next step is to install the Facebook Pixel plugin on your WordPress website. There are several plugins available, but the most popular ones are PixelYourSite and Facebook Pixel. To install the PixelYourSite plugin, go to your WordPress dashboard and navigate to “Plugins” -> “Add New.” Search for “PixelYourSite,” and click “Install Now.” Once the plugin is installed, click “Activate” to activate the plugin.

To install the Facebook Pixel plugin, follow the same steps, but search for “Facebook Pixel” instead.

Step 3: Add the Facebook Pixel ID to the Plugin

Once you have installed the plugin, the next step is to add the Facebook Pixel ID to the plugin. To do this, go to your Facebook Ads Manager and navigate to the “Pixels” tab. Click on the pixel you created in step 1, and you will see the pixel ID. Copy the ID, and go back to your WordPress dashboard.

Navigate to the plugin’s settings page, and you will see a field where you can enter the Facebook Pixel ID. Paste the ID into this field and save the changes.

Step 4: Configure the Facebook Pixel Plugin

The next step is to configure the Facebook Pixel plugin to track the events you want to track. Facebook offers several standard events, including page views, add-to-cart, and purchase. To configure the plugin, navigate to the plugin’s settings page and select the events you want to track.

For example, if you want to track purchases, you can select the “Purchase” event and specify the currency and value of the purchase. You can also choose to track custom events by adding custom event codes to the plugin.

Step 5: Test the Facebook Pixel

The final step is to test the Facebook pixel to ensure that it is working correctly. To do this, navigate to your website and perform the actions you want to track, such as adding a product to your cart or making a purchase. Then, go back to your Facebook Ads Manager and navigate to the “Pixels” tab. Click on the pixel you created, and you should see data for the events you just performed.

If you don’t see any data, double-check that the pixel ID is correct, and the plugin is configured correctly. It’s also worth noting that it can take up to 24 hours for data to appear in your Facebook Ads Manager.


Adding Facebook pixels to your WordPress website is a simple process that can help you track the effectiveness of your Facebook ads and understand your audience better. By following the steps outlined in this blog post, you can add the Facebook pixel to your website and start tracking the events that matter to your business. Once you have installed the pixel, test it to ensure it’s working correctly.

Show More

Raj Maurya

Raj Maurya is the founder of Digital Gyan. He is a technical content writer on Fiverr and When not working, he plays Valorant.

Leave a Reply

Back to top button