How to insert the Facebook Pixel in WordPress

If you are carrying out advertising campaigns on Facebook, it is no less important to measure their impact, statistics, roi, sales, interactions, etc., this is obtained from the fact that Facebook once created your advertiser account provides you with a Pixel to insert on your page web and start collecting data, and you can also use it to make retargeting campaigns.

Capturing those visits is not only important for statistics, but also so that later, your ads are shown to people who have visited your website to remind them that you have the product or service that they need or solve their needs or problems.

That is why inserting the pixel correctly on your website is very important.

You can do it in several ways, using a capon or using a plugin. We call capon when we manually insert the pixel on our website, normally we copy the code provided by Facebook and paste it before closing the tag from the header.php file of our theme.

Insert Facebook Pixel manually

The disadvantage of this method is that every time we update our theme, we lose the changes unless we use a child theme, even regardless of whether we use a child theme, if the header of the parent theme has changed, we We will be forced to update the header.php of the child theme.

Another disadvantage is that if we are not very clear about how to make changes at the code level, then the most normal thing is that it does not come out correctly and this only creates headaches.

If we work for example with a website made in pure html or php, then this method is the best and almost the only one, but today, we are talking about WordPress and how to insert the Facebook pixel in our WordPress.

The other method is to use a plugin that facilitates this task and that when we update our theme it does not affect our pixel.

To find out which plugin is the most appropriate, we can simply do a search in the WordPress plugins repository, in my case I have used the keyword “pixel facebook” as you can see in the cover image of this post. We search among more than 54,000 thousand plugins available with the word pixel facebook, so that we can filter and obtain various results.

Plugins to insert the Facebook pixel

The search engine will offer us several plugins that will help us insert the pixel in our WordPress, the theme is, which one.

As I always recommend, we have to review the plugin tabs, at first glance we can see relevant information in the summary of each plugin, such as the number of active plugin installations and until which version is tested.

In the image above, we are struck by one, Facebook Pixel by PixelYourSite – Events, WooCommerce & Easy Digital Downloads, for various reasons, it is the most installed, it has 126 ratings and 4.5 stars on average and it also seems to cover and is compatible with other plugins such as Events, WooCommerce and Easy Digital Downloads.

Facebook Pixel by PixelYourSite – Events, WooCommerce & Easy Digital Downloads

Its strengths are, the installation of the Pixel in a single click, as easy as installing the plugin, activating it and in its settings include our advertiser account number in the plugin configuration and save changes.

Likewise, the integration with other Events plugins and especially WooCommerce and Easy Digital Downloads, which are two widely used plugins for electronic commerce and this I think is one of its strengths.

I leave you the video of the plugin provider so you can see how easy it is to start working with this plugin and the most important functionalities that it has.


Ready, you are fully prepared and equipped to work with your Facebook campaigns and start collecting data, capturing potential customers and starting to sell.

Facebook Pixel by PixelYourSite is available in the WordPress repository

Now you just need to do some good campaigns, segment your audience very well, offer good products and services and why not, have a bit of luck.

Host-Fusion.Com the hosting WordPress fastest of 2020

The best WordPress hosting 2020