How to Add the Facebook Pixel to WordPress (For Beginners)

Learn exactly how to add the Facebook pixel to your Wordpress site without any errors. The perfect guide for beginners and non-technical website owners.
Tommy Griffth
calendar icon
Jun 27, 2023
time icon
4 min. read
Back to Blog
Table of Contents
Primary Item (H2)

There are a thousand things we could discuss when it comes to Facebook. Love it or hate it though, your business could likely benefit from running Facebook Ads.

This blog post is about how you can easily install Facebook Pixel to your WordPress website and create an ad account, which will enable you to set up Facebook Ad campaigns geared specifically at people who view content on your website (or, in other words, it will enable you to retarget your website, visitors, with Facebook ads once they’ve left your website).

Furthermore, the same Facebook pixel plugin can be used for conversion tracking as well – but in this blog post, we’ll cover the basics of adding Facebook pixel (a piece of code), rather than how you can use it to track conversions.

So, if you’re selling pink elephants with unicorn tails and someone has visited your website, add Facebook Pixel to WordPress to remind them, via Facebook advertising, that pink elephants with unicorn tails exist, and they’re for sale on your website.

Even if you’re not ready to set up a Facebook ad campaign, it’s still very advantageous to add Facebook Pixel to WordPress plugin for your WordPress dashboard – adding it to your WordPress dashboard will allow you to start pixeling your users and get that audience ready so that when you decide to set up an ad campaign, you can advertise to all those people that have already been on your website. This is also a free plugin, so why not?

Sidenote: If you’re not using WordPress, check out our step-by-step guides on how to add the Facebook Pixel to Shopify or Squarespace.


Adding a Facebook Pixel to your WordPress website shouldn’t take more than 5 to 10 minutes.

So, the high-level goals of this procedure include:

  • The goal: (obviously) to install Facebook Pixel to your WordPress site
  • The ideal outcome: is to do the above properly, without any technical issues
  • The prerequisites: for the purpose of this example, I chose to add Facebook Pixel to WordPress using Google Tag Manager. So, if you don’t have that set up just yet, check out our tutorial on how to install Google Tag Manager.
  • Note: You can install the Facebook Pixel code through other methods as well – but I find Google Tag Manager to be the best, most advantageous solution.
  • The importance of this action: Facebook Pixel is crucial if you want to run a Facebook ad campaign (and, as mentioned in the beginning, you really want this). The Facebook pixel will eventually help you with your Facebook retargeting, as well as measuring conversion rates and, later on, using your data to create custom audiences that are similar to those that have already purchased from you.
  • Where this is done: This is done in Google Tag Manager and your Facebook Ads Manager.
  • When this is done: You only have to do this once.
  • Who does this: Whoever is responsible for managing your website, your Google Analytics, your paid advertising – and that person might as well be you, if you don’t have a dedicated person assigned for this type of task.

Get This Entire Walkthrough and All the Resources in This Post

Aside from the fact that you should have Google Tag Manager set up, you should also make sure to:

  • Have your Facebook Ads account set up;
  • Install the Facebook Pixel Helper Chrome Extension. We advise using the Chrome browser for this procedure (and the vast majority of digital marketing-related procedures) – so if you haven’t installed that, make sure you do it before you move on.

Adding Facebook Pixel to WordPress

Now that you’re all set up, it’s time to move to the middle of the action.

  1. Log into your Facebook account and go to your Facebook Ad Manager account.
  2. Go to the “Ads Manager” section, then click on Pixels.
  1. Once you’re in the Facebook Pixel Command Center, if you have never done this before, you will see a green pixel button saying “Create a Pixel” – go ahead and click on that and create your first pixel. You can name it whatever you want (and yes, you can change the name later as well.)
  2. Once you did that, go back to the Command Center, and click on “Set Up”.
  1. On-screen, you will see three options:
  • Use an Integration or Tag Manager,
  • Manually Install the Pixel Code Yourself,
  • and Email Instructions to a Developer.

Click on the first option.

  1. Click “Google Tag Manager”.
  1. Click “Quick Install”, log into your account, and click on “Allow”.
  1. Click the account associated with your Google Tag Manager.
  1. If you haven’t created a Google Tag Manager container, click on “Create a new container within Google Tag Manager” to add a new container. A pop-up will appear on the screen, simply enter your name or company name. Then select the container from the list. If you have already done this, you will simply have to select it from the list.
  1. Configure Advanced Matching if you need to. Most people don’t do this the first time, so you can click “Next”.
  2. Add or edit new tags if you need to. Again, most people don’t need this when they do it the first time, so you can click “Next” on this one as well.
  3. Click “Publish”.

Now you’re basically done with the Facebook Pixel installation – and almost done with this walkthrough.

Check For Errors

To make sure your Facebook Pixel is properly installed, do this:

  1. Go to your website.
  2. Click on the Facebook Pixel Helper Chrome extension.
  3. Check to see if the extension shows a pixel id installed on your page. If it does, you should see this on your website:

And that’s it! You’ve successfully installed the Facebook Pixel on your WordPress site using Google Tag Manager. Now, you will be able to start building remarketing audiences and lookalike audiences and setting up custom conversions for your Facebook Ads campaigns.

In Conclusion

If you have a Squarespace or Shopify website, check out our articles on how to add the Facebook pixel to Squarespace and Shopify.

If you’re JUST getting started with paid advertising, be sure to take a look at our digital advertising guide, as well as our world-famous SEO checklist.


Copy Our Insanely Powerful Paid Campaign Template

Get the Paid Ads ROI Boost Walkthrough sent to your inbox, for FREE!