It is possible to add a Facebook pixel to your WordPress website without having to use a plugin. I understand that there are tens of WP plugins supporting these features, but why add an extra plugin to your website when you can do it manually without stress or any form of complexity?
Adding the Facebook Pixel manually adding is done via the header.php file of your WordPress theme. The only downside of this method is the fact your Pixel code will be lost each time you update or change your WordPress theme. So, adding Facebook Pixel to your website using a plugin might not really be a bad call to make especially when you have just a few plugins in use on your website.
But if for any other reasons, you’d prefer to add Facebook Pixel to your WP site manually, then here is how to go about it.
Table of Contents
What is Facebook Pixel?
Facebook Pixel is an official analytics tool provided by Facebook to help advertisers create customized audience personas on the platform as well as keep track of their advertisement efforts and conversions. It helps advertisers to effectively target their audience, measure their audience and enhance their ad campaigns on the platform. You’d have access to firsthand insight into customer activities on your website, such as when a purchase is made, an ebook downloaded, signups, and more.
- In all, Facebook Pixel helps you to do the following:
- It helps you as an advertiser to keep track of your conversion rate gotten from your Facebook ad campaigns, e.g (like how many people purchase after clicking your Facebook ad)
- It also helps you to establish targeted audiences for your Facebook ads.
- Lastly, it helps you to strategically optimize your ad campaign.
Well, if you do use Facebook to run ads as a source of traffic to your site you definitely will need to add a Facebook Pixel to your site to help you keep track record of your advertisement on the platform.
How to Add Facebook Pixel In WordPress Without Plugins
However, here, is a step-by-step process on how you can add Facebook Pixel in WordPress without using any plugins:
Create Your Facebook Pixel
Go to the Pixels tab in Facebook Events Manager. And then, click on the Create a Pixel button using your device.
You will see an open popup box that will appear on your screen. Now, all you need to do is to tap create on that popup box.
Get Facebook Pixel Tracking Code
Once you are done with creating your Facebook Pixel, you should see a list of options in an Install Your Pixel Code box, but if you don’t, do not panic just head straight to your Facebook Pixel tab and tap Set up Pixel that way you will get the required code.
Choose “Manually Install the Code Yourself” to install the Pixel code.
Now, go to the next page, and then scroll down to the Facebook Pixel tracking code section to copy it.
Add Tracking Code To WordPress
Next, you will have to add the Pixel tracking code that you just generated right above the closing tag on your WordPress site.
To do this, you can use the Insert Headers and Footers plugin instead, go to Settings → Insert Headers and Footers and paste the code into the Scripts in Header box:
And you’re game!
If you usually run ads on Facebook as a means to get traffic and leads to your WordPress website, adding Facebook Pixel to your website will be a good thing to do as it will help you keep an eye on your ad performance and conversion.