How to add Facebook pixel to WordPress

What are the benefits of adding a Facebook pixel to WordPress?

Even you are not advertising yet,- you have to look forward and add it as soon as possible, because in a time you will get blog visitors from various sources like Google search, Bing, all social media platforms you use plus backlinks. These visitors’ data will be captured by Facebook, so later on you will be able to run retargeting campaigns. Also, you will be able to create events like subscriber opt-ins to your email list for email marketing, custom audiences, etc…

How to add Facebook pixel to Wordpress step by step Guide

Login to your Facebook account and click on the little arrow pointing down. Click on the manage ads. If you have never advertised on Facebook you may need to confirm you want to advertise, just follow the instructions. 

Facebook menu manage ads how to add facebook pixel to wordpress

You have to reach the front advertising dashboard as in the image below.

Facebook ads account

On the top left corner, you will see three little lines and name Facebook ads, click on it to access the main menu.

Under Measure & Report => Events manager find “Pixels” option, click on it.

Facebook ads main menu

If you have not created Pixel yet, Facebook will guide you through a simple process, where you will have to give a name for a pixel. 

On the right side find the button “Details”

Facebook pixel details

The next window will pop up. On the top right side find Set Up and choose  Install Pixel

Facebook pixel set up

I usually pick an option to manually add pixels to my website. 

manually add pixel code to a website

The code should be added to the header section of your website just before the </head>  tag.

Facebook pixel base code

WordPress dashboard setup

Now log in to your WordPress dashboard and if your theme does not have special “perks”, where you can add codes, you will have to use the additional plugin. I suggest this one because it works just fine and is easy to set up.  

Once you have logged go to plugins => add new.

wordpress plugins add new

On the top right corner will be a search bar, write “header footer” and press enter.

Find “Header Footer Code Manager”

Click on Install Now and Activate

Now go back to the Facebook tab and click on the code, it will be copied automatically, if not, select all code right mouse click and copy it. 

Go back to the WordPress tab and find HFCM click on it to add a new snippet.

Fill in the information, paste pixel code, and finally do not forget to click “Save”.

header footer adding pixel

Now we want to check if that pixel code fires correctly. We need to open the chrome browser and add the extension. Go to chrome store and look for “Facebook pixel helper”. Add it to your browser.

Now open your website (not an admin area, but an actual blog) and see If all is working fine.

Facebook pixel working fine

If you would like to know how to create events and audiences, please watch the video.

How to add Facebook pixel to WordPress Video tutorial

YouTube video

Well, congratulations you now know How to add a Facebook pixel to WordPress.

About Mantas J

Blogger, marketer, coffee lover,- currently now developing several online projects. I know a thing or two about digital marketing :) Follow me on Twitter or YouTube.