For those looking for a quick way to manually add the same facebook pixel to every page, you can to the following:
1. Paste the code below into a text editor (notepad on Windows, TextEdit on Mac, etc.) and replace the “PASTE CONVERSION PIXEL CODE HERE” text with the facebook pixel code you want to use. Make sure to copy the entire thing!
2. Save the file as “insert-facebook-pixel-on-every-page.php” and upload it to the wp-content/plugins folder on your website, where all the plugins live.
3. From the Dashboard, go to Plugins > Installed plugins and activate the plugin.
4. Let the good times roll.
<?php
/*
Plugin Name: Add Facebook Pixel to Every Page
Description: Add Facebook Pixel to Every Page
Version: 1.0
Author: Kellen Mace
Author URI: https://kellenmace.com/
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
*/
function fb_pxl_insert_pixel_on_every_page() {
$fb_pxl_code = "
PASTE CONVERSION PIXEL CODE HERE
";
echo $fb_pxl_code;
}
add_action( 'wp_head', 'fb_pxl_insert_pixel_on_every_page' );