How to Add a Facebook Pixel to WordPress

How to Add a Facebook Pixel to WordPress (Easiest Way)

Looking for a tutorial for how to add a Facebook Pixel to WordPress?

Using a Meta pixel is necessary when you’re running Meta (Facebook) ads. With a pixel, you can track conversions to make sure your ads are working, and you can track pageviews in order to set up retargeting ads and audiences.

If you’re using WordPress, there’s one really simple way that you can install your Meta Pixel and track conversions from your ads. That’s what we’re going to show you how to do in this article.

First, let’s take a look at what exactly a Facebook pixel is and what it can do.

MonsterInsights is the best WordPress Analytics plugin. Get it for free!

What is a Meta (Facebook) Pixel?

A Meta (Facebook) pixel is a snippet of code that you can install on your site if you’re running Facebook ads. When you add that snippet of code to your site, you’re giving Facebook access to track your website visitors, their clicks, and their conversions.

This makes it possible for Facebook to give you information about how your ads are performing, which helps you improve them.

It can also capture your visitors and categorize them into different audiences, so that you can use retargeting ads to laser target them.

It’s a very similar idea to Google Analytics.

Meta Pixel Video Walkthrough

How to Create a Meta (Facebook) Pixel

If you haven’t created a Facebook pixel yet, you can do it in just a couple clicks!

Step 1: In Events Manager, Connect Data Sources

To create a Facebook pixel, head to the Facebook Events Manager and, in the side navigation, choose Connect Data Sources:

Connect Data Sources - FB Event Manager

Step 2: Create Your Pixel

Now, go ahead and click Web, then the blue Connect button:

Then, name your pixel whatever you’d like and click the Create Pixel button:

In the next step, you’ll be asked to input your website’s URL. Go ahead and do that and click Check:

Step 3: Choose Install Options

Now, the tool will walk you through install options. We actually won’t need the code when installing with MonsterInsights, but we’ll go through this part anyway.

Choose Meta Pixel only, then click Next:

Finally, choose the Install code manually button. This will show you the base code that you’ll need to install if you choose, but when installing with MonsterInsights, we won’t need it.

That’s it, your pixel is created! Let’s install it on your website.

Add a Facebook Pixel to WordPress: Easiest Way

The hands-down easiest way to add your Facebook pixel to WordPress is with MonsterInsights.

MonsterInsights Logo

MonsterInsights is the best Google Analytics plugin for WordPress, and with its PPC Ad Tracking addon, you can install your Meta (Facebook) Pixel and track conversions from your ads in just a couple clicks.

With the addon, you can track Meta ad conversions on WooCommerce, Easy Digital Downloads, LifterLMS, MemberPress, or GiveWP site. Or, use the addon on any other type of website to track pageviews.

Plus, you’ll get access to tons of other Google Analytics features, such as:

To access the PPC Ad Tracking addon, you’ll need MonsterInsights Pro. Get started now!

For a full walkthrough of how to set up MonsterInsights, check out our guide on How to Add Google Analytics to WordPress the Right Way.

Once you have the plugin set up, you can continue on in our Facebook Pixel installation tutorial.

Step 1: Install the Ad Tracking Addon

First, we need to install the MonsterInsights Ad Tracking addon. To do that, head to Insights » Addons and scroll down to PPC Tracking. Click Install:

Install PPC Ad Tracking Addon

The addon will activate automatically after installation.

Step 2: Copy Your Pixel ID

To add your Facebook pixel to WordPress, all you’ll need is is your pixel ID. To find it, head back to the Events Manager and it’ll be on the right-hand side:

Copy pixel ID

Go ahead and copy it. We’ll use it in a moment.

Step 3: Paste Your Facebook Pixel ID in WordPress

To add your Facebook pixel to WordPress, all you have to do is navigate to Insights » Settings » Conversions:

Conversions Tab in MonsterInsights

Then, scroll down to the Ads Tracking box and paste your ID into the Pixel ID field:

PPC Ads Tracking - Meta

That’s it! You don’t have to install any other code for your pixel to begin tracking conversions and pageviews.

Looking for another easy way to add your Facebook pixel to WordPress? Consider using the WPCode plugin to install any and all code snippets.

If you liked this article, you’ll probably also want to know How to Connect Google Analytics to Facebook (Easiest Way).

Not using MonsterInsights yet? What are you waiting for?

And don’t forget to follow us on Twitter, Facebook and YouTube for more helpful reviews, tutorials, and Google Analytics tips.

Want to Try MonsterInsights for Free?

Enter the URL of Your WordPress website to install MonsterInsights Lite.

Comments

  1. Lovely to see you adding this to MonsterInsights Pro and saving me adding yet another snippet… Any idea when this will be live? Not showing on my v8.14.0 installation on WP 6.2 yet.

    1. Hey Tim! Thanks, we’re pretty stoked about it too! It’s out and ready to rock. The trick to getting it to appear is making sure you have the old Ads addon deactivated, and the new one activated instead. In the future, the old Ads addon will be deprecated to avoid the confusion.

Add a Comment

We're glad you have chosen to leave a comment. Please keep in mind that all comments are moderated according to our privacy policy, and all links are nofollow. Do NOT use keywords in the name field. Let's have a personal and meaningful conversation.

This form is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.