home / articles / How to Set Up Facebook Pixel

How to Set Up Facebook Pixel

To target advertising on Facebook (Meta) or Instagram, you need to understand your target audience and have the ability to make precise selections from the three billion users of these two largest social networks. Facebook has collected a lot of data about its users, which advertisers can use in ad settings. However, it’s difficult to accurately predict the interests or needs of the audience. The Facebook Pixel allows you to collect the most valuable information – a list of users who have already responded to the ad and shown their interest. To use the Facebook Pixel, you need to know how to install it on a website or landing page.

What the Facebook Pixel is

It is a JavaScript counter that is provided to Facebook Ads users for installation on their platform. With its help, data can be collected about visitors and their behavior on a landing page or website. After installing the Pixel code on the site, user actions will be transmitted to Facebook statistics. For example, a user clicked on an ad and went to a landing page, added a product to the cart, or made a conversion. You can collect lists of people who have taken these actions and use them to analyze your audience, evaluate the quality of your ads, and target your ads. Personal ad account users can create one pixel in Ads Manager. In Business Manager, you can create up to 10 pixels.

Why the Facebook Pixel is needed

This tool allows you to track website visitors and use that information to monitor the effectiveness of your advertising. The match between the interests of the audience targeted and your product is always based on hypotheses. The Pixel shows how accurate those hypotheses are.

With this counter, you will be able to:

  • Evaluate the results of advertising, traffic conversion, and how well your landing page and product match the expectations of users who clicked on the ad.
  • Use automatic bid management strategies to increase sales.
  • Collect a list of those who are truly interested in your product or service and use this audience for remarketing.

How to get the Facebook Pixel

To get the Pixel code, log into Facebook Ads and follow these steps:

  1. Open the “Ads Manager” menu;
  2. In the “Measure & Report” section, select “Pixels”;
Add facebook pixel business manager menu

3. Click the “+ Add New Data Source” button;

4. Select “Facebook Pixel”;

How to get the Facebook Pixel (Meta Pixel)

5. In the pop-up window, click “Get Started”;

6. Enter the name of the pixel and the website address on which it will be installed;

7. Click “Continue.”

Pixel creation is now complete. In the last window, “Install Pixel”, you can copy the Pixel’s JavaScript code to install on your website or use ready-made solutions for various platforms.

How to find your Facebook Pixel ID

To find the ID of your Pixel in the Ads Manager menu, go to the “Pixels” section of the “Events Manager.” The Pixel ID is located underneath its name.

How to find your Facebook Pixel ID

Write down these numbers or click on the Pixel ID to copy it to your clipboard.

How to install the Facebook Pixel on WordPress

There are two ways to install the Pixel on a WordPress site: using a plugin or manually editing files. To perform these actions, you must have administrator rights to access your WP site console.

To use a plugin, follow these steps:

  1. On the “Connect Website Activity Using Pixel” screen, click on the “Add code using Partner Integration” block;
How to install the Facebook Pixel on WordPress

2. In the new window, find the WordPress button and click it;

3. In the “Connect Your WordPress Account” window, click “Continue”;

4. Click “Download” and download the WordPress extension archive;

Connect to wordpress

5. Click “Continue”;

6. Log into your site’s management console, usually located at https://yoursite.com/wp-admin/;

7. In the left menu, select “Plugins”;

8. Click “Add New”;

9. The “Add Plugins” screen will open, click “Upload Plugin”;

10. Click “Choose File” and select the plugin archive you downloaded;

11. Click “Install”;

12. Click “Activate Plugin”;

13. All of these actions will be step-by-step described in the Facebook Ads wizard;

14. After each one, you need to click “Continue”;

15. In the next window, you can send test traffic to your site to make sure the Pixel is transmitting data;

16. Click “Continue”.

Pixel installation is now complete. You can immediately configure event tracking on your site or close the installation wizard window.

How to manually install the Pixel on a WordPress site

If your WordPress version is older than 4.4 or you don’t want to install another plugin on your site, then on the “Connect website actions with the pixel” screen, click the second option “Add the pixel code to your website manually.” Then follow these steps:

  • In the “Pixel installation” window, under the “Install base code on website” section, you will find the Pixel code;
  • Click on it to copy it to your clipboard. In another tab, log into your WordPress site management console;
  • Go to the “Appearance” menu;
  • Switch to the “Theme Editor” submenu;
  • On the right side, in the “Theme Files” list, find the “Header (header.php)” file and click on it;
  • After the header content loads in the editor, find the tag and paste the Pixel code before it;
  • Click “Update File”;
  • Return to Ads Manager and test the Pixel’s operation with test traffic;
  • Click “Continue.”

Configure the events you want to track.

How to install the Facebook Pixel on Tilda

To install the Facebook Pixel on a Tilda-powered website, you can simply enter the Pixel ID or edit the HTML code of your site. However, both of these options are only available to users of paid Tilda plans.

Pixel installation on Tilda consists of the following steps:

  • Log in to your Tilda account;
  • Select the website you want to work on;
  • Click on the “Site Settings” button;
  • In the left menu, select “Analytics.” Find the Facebook Pixel field;
  • Insert the copied Pixel ID;
  • Save the changes;
  • Publish the changes.

To install the entire Pixel code manually:

  • In the settings menu, go to “More”;
  • Find the “HTML CODE FOR HEAD-ZONE” section and click “Edit Code”;
  • Insert the Pixel code;
  • Click “Save”;
  • Publish the site changes.

After that, the Pixel will start transmitting data about your Tilda site’s visitors to Facebook.

How to install the Facebook Pixel on a Wix website

The Facebook Pixel can be added to websites on the Wix Premium plan with a connected domain. The process of installing the Pixel consists of the following steps:

  1. Log in to your Wix account on wix.com;
  2. In the “Settings” menu, select “Dashboard”;
  3. In the left menu, select “Marketing Integrations“;
  4. Сlick “Facebook Pixel & CAPI”;
  5. Click “Connect”;
  6. In the next screen, click “Add Facebook Pixel”;
  7. In the pop-up window, paste your Pixel ID;
  8. Click “Apply.”
How to install the Facebook Pixel on a Wix website

That’s it! The installation process is now complete.

How to install a Pixel in Bitrix

To install a Facebook pixel in Bitrix, log in to your Facebook Ads account and copy the pixel ID. After that, log in to your Bitrix site control panel and follow these steps:

  • Go to “Sitex and stores”, then to “Sites”;
  • Select your website;
How to Set Up Facebook Pixel
  • Click “Configure site”;
  • In “Site settings”, find the “Tracking pixels” section, then paste your pixel ID;
How to Set Up Facebook Pixel
  • Click “Save”.

How to install a pixel in Opencart

Installing a pixel in Opencart involves the following steps:

  1. In Facebook Ads, during the pixel setup, select “Add code using partner integrations”;
  2. In the “Choose a partner” screen, find and click on OpenCart;
  3. In the integration wizard, click “Download” to get the necessary plugin in ZIP format;
  4. In a new browser tab, log in to your OpenCart account;
  5. In the left menu, click on “Extensions”;
  6. Go to the “Installer” section;
  7. Click “Upload” and select the previously downloaded archive;
  8. Go to the “Extensions” section;
  9. Click the green “+” button to install the “Facebook Ads Extension” extension;
  10. In the pop-up window, click “Get started” and follow the instructions;
  11. After the installation, it is recommended to go back to Ads Manager and ensure that the pixel is transmitting data.
How to Set Up Facebook Pixel

How to install a pixel in Shopify

To install a pixel in a Shopify store, you will need to copy the pixel ID in Ads Manager. After that, log in to your Shopify account and follow these steps:

  1. Click on “Online Store” in the left-hand menu;
  2. Select “Preferences” from the dropdown menu;
  3. Find the “Facebook Pixel ID” section and paste the pixel ID into the text field;
  4. Click “Save”.

How to install a Facebook Pixel in Joomla

NOTE: The integration is only possible for Joomla versions 3.x.

To install a pixel in Joomla, you can use a ready-made integration module. To do this, when connecting the pixel in Facebook Ads, go to the section “Adding code using Partner integrations”. Now follow these steps:

  1. In the list of partners, find Joomla and click on the button for this CMS;
  2. The “Connect Joomla Account” window will open, click on the Download button to download the archive with the integration module;
  3. In a new browser tab, open your Joomla site and go to the control panel;
  4. In the top menu, click on “Extensions”;
  5. In the drop-down menu, select “Manage” and then “Install”;
  6. Upload the downloaded ZIP archive with the integration module from Ads Manager;
  7. In the list of extensions, find “Official Facebook Pixel”;
  8. Click the button in the “Status” column of this extension and change the status to “Enabled” (or “Published”). The installation is complete, and all that remains is to check that the pixel data is being sent to Facebook.

How to set up Facebook pixel

After installing the pixel, it will transmit to Facebook statistics on all actions taken by visitors on your website. Each action is called an event. You can configure tracking for the events that you need.

There are two types of events available in Facebook Ads:

  • Standard events that are automatically recognized by the pixel;
  • Custom events that users can define themselves by modifying the pixel code;
  • Custom conversions are events that are tracked only when a specific URL is visited. You do not need to modify the pixel code on your website to track them.

How to track standard events

The standard event tracking command consists of the directive “fbq(‘track’,…)” that needs to be inserted before the body tag in the pixel code. For example, to add payment information, you need to add the command “fbq(‘track’, ‘AddPaymentInfo’);” to the pixel code.

You can also insert the command separately anywhere between the <body>…</body> tags, such as:

fbq(‘track’, ‘Purchase’, {currency: “USD”, value: 30.00});<script> fbq(‘track’, ‘Purchase’, {currency: “USD”, value: 30.00}); </script>

There are 17 standard Facebook pixel events, such as:

  • Add payment information – fbq(‘track’, ‘AddPaymentInfo’);
  • Add to cart – fbq(‘track’, ‘AddToCart’);
  • Complete registration form – fbq(‘track’, ‘CompleteRegistration’);
  • Fill out and confirm a lead form – fbq(‘track’, ‘Lead’);
  • Complete purchase with confirmation and payment receipt creation – fbq(‘track’, ‘Purchase’, {value: 0.00, currency: ‘USD’});
  • Site search – fbq(‘track’, ‘Search’).

A full list and their codes are published in the Facebook help section on standard events.

How to track custom events

Custom events are set up using the function fbq(‘trackCustom’, parameter1, <parameter2>);, where:

  • Parameter 1 is required and indicates the name of the event, which should be no longer than 50 characters;
  • Parameter 2 is optional and can contain a JSON object with additional information.

For example: fbq(‘trackCustom’, ‘SubmitCoupon’, {coupon: ‘discount_20%’});

The code, such as:

<script> fbq(‘trackCustom’, ‘SubmitCoupon ‘, {coupon: ‘discount_20%’}); </script>

fbq(‘trackCustom’, ‘SubmitCoupon ‘, {coupon: ‘discount_20%’});

can be inserted anywhere on the page between the <body>…</body> tags, either on page load or afterwards, depending on the action you want to track, such as filling out a specific field or clicking a button.

How to track custom conversions

This type of event is defined by visiting a specific page on the website. For example, visiting the thank-you page after a purchase indicates a completed conversion.

To set up conversion tracking, follow these steps:

  1. Log in to your Facebook Ads account;
  2. Open the global menu at the top;
  3. In the “Measure & Report” section, select “Custom Conversions”;
  4. Click “Create Conversion”;
  5. Set up the conversion rule. There are three options: URL contains a specific word, does not contain, or exactly matches the entered link. For example, https://website.com /thank-you;
  6. If necessary, add another condition to filter events based on the first condition. In the end, events that satisfy all conditions will be selected;
  7. Enter the conversion name;
  8. Choose one of 10 categories to which the tracked event belongs;
  9. You can specify the conversion value, which will be taken into account in automatic bid optimization;
  10. Click “Create”;
  11. In the next confirmation window, click “Done”.
How to track custom conversions

After that, Facebook will start accumulating data on conversions on your website.

How to collect an audience using the pixel

With the Facebook pixel, you can collect an audience of people whose interests you know much more precisely than just users selected by ad targeting. This is a list of people who clicked on your ad, visited certain pages, viewed information about the product but didn’t buy it.

To create a custom audience from visitors to your website or landing page, follow these steps:

  1. Log in to your Facebook Ads account;
  2. Open the menu (click the “Ads Manager” button in the upper left corner);
  3. In the “Resources” section, click on “Audiences”;
  4. Click “Create Audience”;
  5. In the opened menu, select “Custom Audience”;
  6. In the new window, click on “Website”;
  7. By default, the condition “All website visitors” will be assigned. You can add rules to refine or exclude. For example, users who visited specific pages or frequently visited your site;
  8. Each condition has a data retention period of 30 days for users in the audience. You can increase it up to 180 days;
  9. Enter the audience name;
  10. Click “Create Audience”;
  11. A confirmation window will appear, click “Done”.

How to use audiences collected with the Facebook Pixel

Lists of people who clicked on your ads and visited your landing page or people who completed conversions can be used for several purposes:

  • Exclude ad displays for those who have already made a purchase;
  • Remind users who added items to their cart but didn’t complete the purchase. For various reasons, people who are interested in your product may not complete conversions. Some are hesitant, while others want to compare with another product. Only 4%-5% purchase immediately. Remarketing allows you to remind the user about the product they were already interested in;
  • Promote related products to people whose interests you know. For example, if you have an audience of buyers of headphones for smartphones, you can advertise a wireless charging offer or other accessory to the same people. Individualized audiences can increase traffic conversion rates and facilitate repeat sales.

To use a customized audience in an advertising campaign, select it during the targeting settings stage of the ad group setup. In the “Audience” section, click on the field next to “Custom Audience” and select the desired audience.


Installing the Facebook pixel on websites has been made easier thanks to the integration wizard, which provides step-by-step instructions for popular CMS platforms such as WordPress, Opencart, Wix, Bitrix – a total of 26 popular engines (as of May, 2023). For many of them, ready-made extension modules are offered with pre-entered settings. Some CMS platforms already have built-in support for the Facebook pixel, and you only need to specify its ID in the settings. Additionally, you can always manually add the pixel’s JS code to your website pages, such as by including it in the header block. By collecting audience information with the pixel, you can more effectively use your advertising budget, increase traffic conversion, and profit. Also, we recommend our other articles on working with Facebook advertising.


What is Facebook Pixel and why should I use it?

Facebook Pixel is a tracking code that you can add to your website to monitor user behavior and conversions from your Facebook ads. It allows you to collect data on your website visitors and use it to optimize your ad campaigns, create targeted audiences, and track the effectiveness of your ads. By using Facebook Pixel, you can gain valuable insights into your audience and improve the performance of your Facebook advertising efforts.

How do I install Facebook Pixel on my website?

To install Facebook Pixel on your website, you first need to create a Pixel in your Facebook Ads Manager account. Then, you can either install it manually by adding the Pixel code to the header of your website’s HTML code, or use a third-party plugin or extension to simplify the process. Once installed, you can test your Pixel using Facebook’s Pixel Helper tool and begin tracking user behavior and conversions. It’s important to ensure that your Pixel is properly installed to effectively use Facebook’s ad targeting and optimization features.

How do I track standard events with Facebook Pixel?

To track standard events with Facebook Pixel, you can use the pre-defined event codes provided by Facebook, such as ‘Add to Cart’ or ‘Purchase’. You can add these codes to your website’s HTML code or use a tag manager to implement them. Once added, the Pixel will track these events automatically and provide you with valuable data on user behavior, such as which products are most frequently added to carts or which pages lead to the most purchases. By tracking these standard events, you can optimize your ad campaigns and improve the effectiveness of your Facebook ads.

How do I create custom events with Facebook Pixel?

To create custom events with Facebook Pixel, you can use the ‘Custom Event’ feature in the Events Manager section of your Facebook Ads Manager account. You can define custom parameters, such as the event name, category, and value, to track specific user actions on your website, such as video views or form submissions. Once you’ve defined your custom event, you can add the event code to your website’s HTML or use a tag manager to implement it. Custom events allow you to track and analyze user behavior beyond the pre-defined standard events provided by Facebook, giving you even more data to optimize your ad campaigns and improve the performance of your Facebook ads.

How can I use data collected by Facebook Pixel to improve my ad campaign?

You can use the data collected by Facebook Pixel to improve your ad campaign in several ways. For example, you can create custom audiences based on user behavior, such as people who have abandoned a cart or viewed a specific product, and use this audience to create targeted ads. You can also optimize your ads for specific events, such as purchases or sign-ups, to maximize your ad’s effectiveness. Additionally, you can analyze the data to identify trends and patterns in user behavior, which can inform your overall marketing strategy and help you make data-driven decisions. By leveraging the insights provided by Facebook Pixel, you can create more effective ad campaigns and improve your return on investment (ROI).

Click to rate this post!
[Total: 1 Average: 5]
#Facebook Pixel #guide
Comments (0)
Add a comment
Your email address will not be published. Required fields are marked *

Leave a Reply

Your email address will not be published. Required fields are marked *

Verified by MonsterInsights