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.

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.

Facebook Pixel code should be placed in the <head> section of your site’s pages. This is outside of the area in which Elementor has any influence, so you won’t be using Elementor for this process. You’ll need to paste the code supplied to you at the bottom of the theme’s head section, just above the closing </head> tag. 

There are two basic ways to add this code.

Method 1 (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. 

Method 2 (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. For more info click here.

Share it on social networks

Share on facebook
Share on twitter
Share on linkedin
Share on email
Was this article helpful?

Get Started With Elementor Today

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