• Post author:
  • Post last modified:March 5, 2023
  • Reading time:10 mins read

Are you finding it difficult to add Facebook Pixel to your WordPress Website?

Facebook pixel, is a great and essential tool if you are running any kind of Facebook ads. The Facebook pixel helps you retarget visitors who have previously viewed your content. It lets you target your ads and see how effectively they are converting.

This is a great way of optimizing your ads to help you better market to your audience with the aim of converting visitors into customers.

In this article, I will show you the easy way to add Facebook Pixel to WordPress Website.

I am very sure you must have prior knowledge about Facebook pixel and how it works. So let’s get started.

What is Facebook Pixel?

The Facebook Pixel is a piece of code on your website that can help you better understand the effectiveness of your advertising and the actions people take on your site, like visiting a page or adding an item to their cart. source

How does Facebook pixel work?

Have you ever visited a website and after leaving that site to a social media platform like Facebook or Instagram you start seeing ads from that website that you just closed? This art of marketing is known as remarketing or retargeting. 

Those websites make use of Facebook pixel or Meta pixel as it is currently called to retarget their visitors with the goal of converting those visitors into customers.

Trust me, Facebook pixel is a must-have tool if you are looking for ways to make more sales through your website.

Let me quickly show you how you can add this plugin manually using a WordPress plugin called Wpcode. This can be done in two steps:

  1. Create your Facebook pixel from Events Manager, and copy the code.
  2. Insert the code into the header section of your website.

How to create a Facebook pixel

To create a Facebook Pixel, you need to log in to your Facebook account and visit the Meta Business Suite. Then, click on All Tools » Events Manager.


Next, click on the green plus ‘+’ icon to connect Data Sources. Please note that the interface might look different as the  Facebook Team is always working to serve us better.

facebook pixel

After clicking on “Connect Data Sources”, you will have to select a medium through which data will be fetched from. Since we are talking about websites, simply select the website option and click on continue.


You will be asked to give your pixel a name, you can give it any name of your choice. Also, you will be prompted for your website URL to run a check to know if your site is eligible for integration but that is optional, you can skip that.


Once you finish with this step, your Facebook pixel will be displayed at the right corner of your dashboard. Now to connect it to your website, click on the “Manage Integrations” button.


On clicking that, a pop-up will appear, choose the option to install the code manually.


Upon clicking on “install code manually”, Facebook will now show you the code you need to copy and paste into the header “<head />” of your website. You can copy the code to your clipboard and please keep the browser page open for reference purposes. Once you are done inserting the code into your website, you can come back and click on “Continue”.

facebook pixel

Add Facebook Pixel to WordPress

To add Facebook Pixel to WordPress, we will be using one of the best code snippet plugins for WordPress known as WpCode. This will give us the option to paste the code we copied from Facebook into the head section of our website.

To get this plugin, navigate to “plugins” on your WordPress Dashboard and click on Add new. In the search box, type “WpCode”. Click on Install and activate.


After that, hover over the “ /> Code Snippet” tab at the bottom left of your dashboard and select “Header & Footer”. You can then paste the code you copied from Facebook into the Header box and click on save changes.


How to know if Facebook Pixel is working?

After going through the whole process of adding Facebook Pixel to your website, you need to make sure it is working.

To do that, we will need to download and install the Meta Pixel Helper Chrome ExtensionAfter installing, you will see an icon on your chrome browser tab.

To know if the pixel is working, open the website you installed the pixel and click on the Meta Pixel Helper icon and it will display some information that looks like the demo photo below.

facebook-pixel-chrome extension

And that is it! You have successfully added Facebook pixel to your WordPress Website. Congratulations! 

To conclude, the Facebook pixel is a powerful tool that can help you track user behavior on your website and create custom audiences for targeted advertising. By following the best practices outlined in this post, you can use the pixel to improve your marketing efforts and achieve better results. So if you haven’t already, consider adding the Facebook pixel to your website today.

If you have gotten value from this article, kindly share and leave a comment below. Also if you want me to write about any topic, please let me know in the comment section.

Leave a Reply