I have been asked numerous times to help someone install the Facebook Pixel code snippet into their WordPress site so that it can be used for their social media marketing efforts. In this tutorial, I will walk you through the easiest way to install the Facebook Pixel onto your site.
Now, I know some might say that Facebook offers an official plugin to install their Pixel code. While this is true, their plugin has some serious issues and could cause your Pixel code to break over time. As a result, I am using a different plugin to achieve our goals.
For this tutorial you will need:
- Your Facebook Pixel Code
- Admin Access to your WordPress Site
- Approximately 5 minutes
- Google Chrome Browser
- Facebook Pixel Helper Chrome extension
Getting started. First, we will install the Facebook Pixel Helper Chrome extension. Go to the Chrome Webstore and search for Facebook Pixel Helper.
“Click Add to Chrome” then “Add Extension“. At this point, I would suggest pinning that extension to your browser bar so that it is easily visible for when we need to use it.
Now let’s head over to our WordPress Site. After you have logged into your site you need to hover over “Plugins” then click on “Add New“. This will bring up the WordPress Plugin Repository so you can install your plugin.
Search for “Insert Headers”. You will find the “Insert Headers & Footers” plugin by WPBeginner. Click Install and then Activate.
Next hover over Settings in the left-hand menu. you will now have a new menu item called “Insert Headers & Footers“. Click on that.
This will bring up the three sections where you can add code to your website.
We will be working with the first section, “Scripts in Header“. Paste your Facebook pixel code into this section and click “Save” at the bottom of the page.
Now if we navigate to the front end of the site, using the Chrome Extension we installed, we can check to make sure the Pixel is installed properly.
That’s it. You have installed the Facebook Pixel code on your WordPress website.