How To Add Facebook Pixel To Elementor

The Facebook Pixel allows you to track, measure, and analyze user actions on your site and then be able to use this information to reach customers again in future Facebook ads. To make use of it, you’ll need to first create the Pixel in your Facebook Events Manager by following the official Facebook instructions to manually add pixel code. Once you have the code, you are ready to paste it into your site.

There are two basic ways to add this code.

Method 1 (easiest): Use Elementor’s Custom Code Feature To Manage The Code

You can easily insert tracking codes to your website by using the Custom Code feature in Elementor.

  1. Navigate To Dashboard > Elementor Custom Code
  2. Create A New Custom Code, and name it Facebook Pixel (or as desired)
  3. Paste the code that you obtain from Facebook into the main content region of the Custom Code editor
  4. Select the location of the code to load at the header
  5. Set the display conditions to Entire Site, or a selected landing page if needed.

For more info click here.

Method 2 (more technical): Edit Your Child Theme’s header.php Code

Simply paste the code that you obtain from Facebook into the header.php of your child theme.

Warning: Never update your core / parent theme code, as anything you change will be deleted during the next theme update. Always use a child theme if you plan to edit any of the code. 

Note: You can also choose to use one of Facebook’s Pixel Partner Integrations such as its WooCommerce integration if you prefer. This document does not address that method since there are many integrations to choose from, and Facebook has documented each of them. The following directions are only for the manual method of adding the code.

Share it on social networks

Was this article helpful?

Related content

Get Started With Elementor Today

Join millions of professionals who use Elementor to build WordPress websites faster and better than ever before

On this page

Birthday Sale: Up to 50%30% Off
Birthday Sale: Last 24 hours!
Birthday Sale: Last 24 hours:
Wait! You get 30-Day Money-back Guarantee

You have nothing to lose – but the discount