[![How to Install the Facebook Remarketing/Retargeting Pixel in WordPress 1](https://coma.lv/wp-content/uploads/2024/11/Gemini_Generated_Image_b0uqwwb0uqwwb0uq.webp)](https://coma.lv/wp-content/uploads/2024/11/Gemini_Generated_Image_b0uqwwb0uqwwb0uq-1030x575.webp)

# How to Install the Facebook Remarketing/Retargeting Pixel in WordPress

Nov 26, 2024/by [Vadim Pavlovich](https://coma.lv/en/author/djcoma/)

When you promote your Facebook page using social media advertising, you have a wide choice of audiences. Retargeting lets you narrow the audience and get better results while spending less money. You can show ads directly to those who may be interested in them and thereby increase revenue.

## What Is the Facebook Retargeting Pixel?

Have you noticed that after visiting some site, its ads appear on your Facebook? This is called retargeting or remarketing, and such sites use a retargeting technology known as the Facebook Pixel. This tool does not add anything to your site; it simply sends your users’ cookies to the browser, which lets Facebook retarget your users. Let’s see how you can install this feature on your site.

*Note: Meta is gradually moving away from the term “pixel” and is introducing the term “datasets” instead.

## Creating a Facebook Retargeting Pixel

First you need to go to your profile in Facebook Business Manager or Meta Business Suite and visit the Events Manager page. Then click Connect Data Sources, choose Web as the data source in the pop-up window, then click Connect.

![WordPress](https://coma.lv/wp-content/uploads/2016/11/connect-data-sources.jpg)

![WordPress](https://coma.lv/wp-content/uploads/2016/11/connect-new-data-source.webp)

Next you will need to enter a name for your Meta Pixel and click the Create Pixel button.

![WordPress](https://coma.lv/wp-content/uploads/2016/11/name-your-pixel.webp)

Add your website URL and click the Next button. Choose how you want to connect your site. (Meta recommends using both the Meta Pixel and the Conversions API). Then click Next.

Next Facebook will offer you to choose your website’s platform or partner in order to continue the Pixel installation process.

![WordPress](https://coma.lv/wp-content/uploads/2025/04/677515043c383c9795b69fa4_646c67a8f73a433b73a4564f_choose-partner.jpg)

There are two ways to install the Pixel on your site: either directly through Facebook using one of the partner integrations (as shown in the screenshot above), or by manually adding the Pixel code provided by Facebook to your site.

## Installing the Facebook Pixel on WordPress with a Facebook Partner Integration

From the proposed platforms, choose WordPress. Facebook will walk you through step-by-step instructions.

![WordPress](https://coma.lv/wp-content/uploads/2025/04/677515043c383c9795b69f91_646cc37dfdbd40855d780932_connect-pixel-Wordpress-steps.jpg)

Just follow the instructions until you reach the final screen confirming that everything has been set up successfully.

## Installing the Facebook Pixel on WordPress Manually

If you prefer to install the Facebook Pixel manually, go to the Data Sources section (the triangle icon in the left menu of Events Manager) and choose the Pixel you want to install. Click Continue Pixel Setup.

![WordPress](https://coma.lv/wp-content/uploads/2025/04/Ekranuznemums-2025-04-17-060802.jpg)

Choose Meta Pixel, then click Connect. Choose Install Code Manually.

![WordPress](https://coma.lv/wp-content/uploads/2016/11/choose-manually.jpg)

Facebook will give you code that you need to copy.

![WordPress](https://coma.lv/wp-content/uploads/2016/11/facebook-pixel-copy-base-code.webp)

You need to add the copied code to the header section of your WordPress theme. The easiest way to do this is to use the Insert Headers and Footers plugin. After installing and activating the plugin, go to Settings > WP Headers and Footers.

![WordPress](https://coma.lv/wp-content/uploads/2025/04/Ekranuznemums-2025-04-17-043653.jpg)

You can paste your code into the header section and click the save button. That completes your installation process.

## Bonus Step: Creating Your Own Audience with the Facebook Pixel

Now that you have successfully installed the Facebook Pixel on your site, the next step is to create an audience for a retargeting campaign on Facebook. Custom audiences let you track visitors you already know. These users can be people who have already liked a page or people who have signed up for your mailing list. Here is how you can create custom audiences in Facebook. Go to the Facebook Ads Manager dashboard and go to the Audiences section.

![WordPress](https://coma.lv/wp-content/uploads/2025/04/Ekranuznemums-2025-04-17-051828.jpg)

You will see a window in which you need to choose the type of audience you are interested in on Facebook. You can choose a customer list, website traffic, app activity and so on. In this article we will use website traffic.

![WordPress](https://coma.lv/wp-content/uploads/2025/04/Ekranuznemums-2025-04-17-050011.jpg)

Now Facebook will ask which website audience you want to track. You can choose people to include or exclude who match any of the following criteria: all visitors to your site; people who visit specific pages; people by time spent on the site and so on. You can also create your own variations.

![WordPress](https://coma.lv/wp-content/uploads/2025/04/Ekranuznemums-2025-04-17-050733.jpg)

Then you need to choose a duration in days. Finally, you need to specify a name for the audience. Use something easy to remember. When you are done, click the Create audience button to complete the procedure. Repeat the process to create more custom audiences using Facebook retargeting.

## Showing Ads to Custom Audiences with the Facebook Retargeting Pixel

The real fun begins with reaching custom audiences using Facebook ads. Start by creating a new ad. Depending on your goals, you can use various ad formats. Also, depending on the ad type, you will be able to choose the target audience at the beginning of the ad creation process. In the same panel Facebook will show you the custom audience and you can choose it as the target of your ad campaign.

![WordPress](https://coma.lv/wp-content/uploads/2025/04/Ekranuznemums-2025-04-17-052346.jpg)

---

*Our specialization is WordPress website development and maintenance. Contact us for a free consultation — [vadim@coma.lv](mailto:vadim@coma.lv), [+371 29394520](tel:+37129394520)*

---
