• * adding the pixel code page by page is tedious and error-prone
    * requiring us to paste the actual facebook script again and again is redundant – why not just have the pixel ID set in one place and have your code generate the script?

    I suppose this could be a good tool if you’re tracking multiple facebook entities/ads and only routing users to certain pages, but since facebook requests that we do this globally in the <head> tag, I can’t understand the architecture of this plugin.

Viewing 3 replies - 1 through 3 (of 3 total)
  • James,

    Most users want to track several different things on their site from lead capture, to views of important pages, to how many people added a product to their cart, to how many people converted/purchased something, etc. This is precisely why when you go to create a new pixel, Facebook prompts you to select one of the following categories: Checkouts, Registrations, Leads, Key Page Views, Adds to Cart, Other Website Conversions. Choosing to use only one pixel that will execute on your entire site on every page load will prevent you from being able to tell how many users opted in to your newsletter vs. purchased a product vs. whatever else since the same pixel will be executing 100% of the time. Watch this short video for more info.

    One exception to this would be choosing to set up ‘People visting specific pages’ rules in the Audience builder interface (this is described here). However, that involves manually typing in the URLs of every page you want to track, as well as choosing logic statements such as contains/does not contain/equal to/not equal to in order to try to account for every possible wildcard/variable URL your users may land on. As you can imagine, that method is not very user friendly for site owners, and is prone to induce mistakes. The preferred method for most users is to set up separate tracking pixels for each individual conversion point they want to track, then insert those individual pixels into only the corresponding pages of their site using this plugin.

    I hope that helps to explain why this plugin allows users to insert conversion pixel codes on individual posts/pages rather than inserting only one for their entire site. Please consider re-rating this plugin with 5 stars, since it does exactly what it says it does; nowhere on the plugin Description or FAQ pages does it state that it allows users to insert conversion pixel codes across their entire site, yet that’s the reason you cited for giving it a 2-star rating.

    Thanks for your interest in using my plugin, and please let me know if you run into any other issues.


    If you want to use a single conversion pixel code across your entire site you can use the plugin below that I just whipped up. Just paste it into a text editor, replace PASTE CONVERSION PIXEL CODE HERE with the conversion pixel code you want to use, save the file as entire-site.pixel.php, upload it to the wp-content/plugins directory on your web server, then activate the plugin and you’ll be all set.

    Plugin Name: Use One Facebook Conversion Pixel for Entire Site
    Description: Use One Facebook Conversion Pixel for Entire Site
    Version: 1.0
    Author: Kellen Mace
    Author URI: http://kellenmace.com/
    License: GPLv2 or later
    License URI: http://www.gnu.org/licenses/gpl-2.0.html

    function fb_pxl_insert_code_on_every_page() {
    $fb_pxl_code = “


    echo $fb_pxl_code;
    add_action( ‘wp_head’, ‘fb_pxl_insert_code_on_every_page’ );

    James –
    I believe you are confusing an audience pixel, which is global to your entire site, and a conversion pixel, which goes on only a small number of pages. Kellen’s reply about pixel types (Checkouts, Registrations, Leads, Key Page Views, Adds to Cart, Other Website Conversions) are still all conversion pixels.

    The custom audience pixel goes into the “Tracking Code” if your theme supports it, or likely inside header.php if it does not.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘don't understand need to add pixel page by page’ is closed to new replies.