Easiest way to add a Facebook Pixel to a WordPress Website

A client recently asked me to add a Facebook pixel to a single page on their website. The website currently consists of 35 pages and 498 posts.

Having customized WordPress websites for over a decade, I have the skills to edit the functions.php file and make the code appear on that page, and that page only, and, I was tempted to do just that. Then I thought, “What about the next time?” This is new behavior for my client. Tracking visitor behavior is a good thing. If I edit the functions.php file, the next time the client wants to track user interaction with a different web page, they would have to contact me and have me update it again, and so on, and so on.

So, I searched and found the Facebook Conversion Pixel plugin. I watched the (excellent) video by Kellen Mace (@KellenMace).  The plugin was installed and configured in one minute, then I edited the page on which the pixel tracking code needed to be added, added the code, saved the page, checked to see if the code displayed, and Voila! Watching the video took longer than setting it up – and – now the client can be independent, if they want, and add Facebook tracking code to other pages without my interference.
Facebook Conversion Pixel plugin video

Notes on the Facebook Conversion Pixel plugin

  • Get your pixel code first. Store it in your favorite editor.
  • The plugin allows you to select which post types you want to allow tracking code to be added. For example, Posts, Pages, and Custom Post type(s).
  • In the Settings Area, it automatically displays a list of post types based on your (the current) WordPress installation.
  • Once you check the post types and save, the Facebook Conversion Pixel form displays on those post types for every post/page/custom post type. This allows you to add (different) tracking code to multiple posts and pages. In this example, the Facebook Conversion Pixel form entries display on 35 pages, but is only filled in on one page.

 

  •  
  •  
  •  
  •  
  •  
  •  
  •  

Comments are closed.