How to install Facebook for WordPress?

Are you looking into retargeting ads on Facebook? Do you want to install Facebook’s remarketing/retargeting pixel in WordPress?

Setting up Facebook Ad campaigns that are targeted toward people that have previously viewed your content is a great way to drive more traffic back to your site.

In this article, we will show you how to install Facebook remarketing/retargeting pixel in WordPress.

How to install Facebook for WordPress?

Why Use Facebook Retargeting Pixel to Boost Your Social Reach

Syed Balkhi, our founder and CEO, published a case study on how we boosted WPBeginner’s Facebook traffic by 332% in 2015. This sparked an overwhelming interest from our readers who wanted to know how they can do the same for their websites.

When you boost Facebook page posts using Facebook ads, you can select a wide range of target audiences. Retargeting allows you to narrow your audience and get better results with less spending.

You can show your ads to people who are already interested in your website. These people are much more likely to respond to your boosted posts and advertisements on Facebook.

What is a Facebook Retargeting Pixel?

Have you noticed that after you visit a website, you start seeing its ads on Facebook? This is called retargeting or remarketing.

Those websites use Facebook’s retargeting technology, commonly known as Facebook Pixel or Meta Pixel.

The retargeting pixel does not add anything visible to your website. It simply sends a browser cookie to your visitors.

This allows Facebook to retarget users visiting your website on Facebook.

Let’s take a look at how you can add a Facebook retargeting pixel to your WordPress site.

Creating a Facebook Retargeting Pixel (Meta Pixel)

To make it easy, we have created a video tutorial on how to install a WordPress plugin that you can watch below.

Subscribe to WPBeginner

However, if you just want to follow text instructions, then you can follow our step by step tutorial on how to install Facebook’s retargeting pixel in WordPress.

First, you need to log in to your Facebook account and visit the Meta Business Suite. Then, click on All Tools » Events Manager.

How to install Facebook for WordPress?

Next, click on the ‘+ Connect to Data Sources’ button in the left-hand menu and select the ‘Web’ option.

After that, click the ‘Connect’ button.

How to install Facebook for WordPress?

In the next popup window, you need to enter a name for your pixel which can be the name of your business or product.

Then, click the ‘Create Pixel’ button to continue.

How to install Facebook for WordPress?

Next, simply enter the URL of your website and click the ‘Check’ button to see if your site is eligible for integration with supported partners like WordPress and Shopify.

How to install Facebook for WordPress?

If your site is to be eligible for integration, you’ll see a green checkmark and you can click the ‘Next’ button to continue.

Next, you need to choose how to connect your website and send activity to Facebook.

For this tutorial, we’ll select the ‘Meta Pixel only’ option. You can always set up the Conversion API in addition to your pixel later.

How to install Facebook for WordPress?

Click ‘Next’ to continue.

Now, you need select a method for adding the pixel code to your website.

If someone else manages the technical things on your website, then you can email them the pixel code. Otherwise, click on the ‘Install code manually’ button to install it yourself.

How to install Facebook for WordPress?

Facebook will now show you the pixel code that you need to install on your WordPress site.

Simply click the ‘Copy Code’ button to copy the pixel code, and we will show you how to install it in WordPress.

How to install Facebook for WordPress?

Installing Facebook Pixel in WordPress

You need to add the Facebook pixel code just before the </head> in your WordPress theme.

The easiest way to do this is by using the WPCode plugin.

How to install Facebook for WordPress?

WPCode is the best code snippets plugin for WordPress. It makes it easy to insert code into your WordPress site’s headers and footers without needing to edit your theme files.

To get started, you need to install and activate the free WPCode plugin. For step by step instructions, see our guide on how to install a WordPress plugin.

After installing and activating the plugin, you need to go to the Code Snippets » Header & Footer page.

Then, simply paste the Facebook pixel code into the Header box.

How to install Facebook for WordPress?

When you’re finished, don’t forget to press the ‘Save Changes’ button.

See our guide on how to add header and footer code in WordPress for detailed instructions.

That’s all, you have successfully installed Facebook Pixel on your WordPress website.

Bonus Step: Creating Custom Audiences Using Facebook Pixel

Now that you have successfully installed Facebook Pixel on your WordPress site. The next step is to create custom audiences for your retargeting campaigns on Facebook.

Custom Audiences allow you to target users you already know for your Facebook ads. These users can be your website visitors, users who like your page, or users who signed up for your mailing list.

Here is how you can create custom audiences on Facebook.

Simply visit the Meta Business Suite dashboard and go to the All Tools » Audiences section.

How to install Facebook for WordPress?

On the next page, click on the ‘Create a Custom Audience’ button.

How to install Facebook for WordPress?

This will bring up a popup where you need to choose the audience source you want to target on Facebook.

You can choose your website, customer list, app activity, and more. For this tutorial, we’re going to choose the ‘Website’ option.

How to install Facebook for WordPress?

After that, click the ‘Next’ button.

Now Facebook will ask you which website audience you want to target. You can choose all website visitors, people who visit specific pages, or visitors by time spent.

How to install Facebook for WordPress?

Next, you need to choose a duration of a number of days. Lastly, you need to provide an audience name. Use something that helps you easily identify this audience in your insights.

Once you are done, click on the ‘Create Audience’ button to finish creating your first custom audience.

Repeat the process to create more custom audiences by Facebook retargeting.

Showing Your Ads to Custom Audiences Using Facebook Retargeting Pixel

The real fun begins with engaging your custom audiences by using Facebook ads.

Start by creating a new ad in Facebook. You can run different kinds of ads for different objectives. Like boosting your page posts, sending traffic to your website, increasing conversions, and so on.

Depending on what objective you choose, you will be able to select the target audience at some point during the ad creation.

In the same audience selection, Facebook will show you a custom audience, and you can select it to be targeted with your ad campaign.

How to install Facebook for WordPress?

We hope this article helped you install Facebook remarketing/retargeting pixel in WordPress. You may also want to see our guide on how to install and set up Facebook comments in WordPress and our expert picks for the best WordPress Facebook plugins to grow your blog.

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

Disclosure: Our content is reader-supported. This means if you click on some of our links, then we may earn a commission. See how WPBeginner is funded, why it matters, and how you can support us.

How to install Facebook for WordPress?

Editorial Staff at WPBeginner is a team of WordPress experts led by Syed Balkhi. We have been creating WordPress tutorials since 2009, and WPBeginner has become the largest free WordPress resource site in the industry.

How do I add Facebook to WordPress?

To add your Facebook posts to the WordPress sidebar, first click on the Sidebar panel. Now click on the plus icon (+) and then select the Custom Facebook Feed widget. With that, you've added your new Facebook post feed to your sidebar. So visitors can now see your Facebook content right there on your site.

How do I add FB pixel to WordPress 2022?

Here's how to do it:.
Install and activate the free Insert Headers and Footers plugin..
Go to Settings → Insert Headers and Footers..
Paste the Facebook Pixel tracking code into the Scripts in Header box..
Save your changes..

Where to download Facebook pixel for WordPress?

Installation.
To install from your WordPress site. Log in to your WordPress dashboard, navigate to the Plugins menu and click Add New. ... .
To download and install plugin from Facebook Events Manager. Facebook Help Page..
Configure plugin for first use. After plugin installed: ... .
Enable sending events via conversion API..

How do I add Facebook pixels to WordPress without Plugins?

How To Add Facebook Pixel To WordPress Without Plugin.
Step 1: Create Your Facebook Pixel. To get started, you'll need to create your Facebook Pixel via Facebook's interface. ... .
Step 2: Get Facebook Pixel Tracking Code. ... .
Step 3: Add Tracking Code To WordPress..