How to Insert the Facebook Conversion Pixel in WordPress

Facebook Conversion Pixel in WordPress

As we all know conversion tracking is crucial when running any kind of advertising campaign. Follow the steps below for the easiest way to insert the Facebook conversion pixel in WordPress. This allows you to pick and choose the post and or pages you want to insert the conversion pixel on, which is important if you are running landing pages.

Step 1

Inside WordPress, we are going to browse to plugins and click on “Add New.”

WordPress Add New Plugin

Step 2

Search for “facebook conversion pixel” and click on “Install Now” on the plugin called Facebook Pixel Conversions for WordPress. This plugin works fine in WordPress versions 3.8 and above. We are running it on 3.8.1.

Install Facebook Conversion Tracking Plugin in WordPress

Step 3

Now we need to copy your conversion pixel. Head into “Ad Manager” in Facebook and click into “Conversion Tracking.”

Facebook - Conversion Tracking

Step 4

If you haven’t created your conversion pixel yet you can do so by clicking on the green button in the top right hand corner. Otherwise, under your list of conversion pixels you can click on “View Pixel Code.”

Facebook View Conversion Tracking Pixel Code

Step 5

Now simply copy the conversion pixel code to your clipboard.

Facebook Copy Conversion Tracking Pixel

Step 6

Now go back to WordPress and click edit on the the page or post you want to insert your pixel on. Scroll down below the editor box and you will see a new section called “Facebook Pixel Conversion Code.” Paste in your conversion pixel code and check the box above it, and publish your page/post.

Insert Facebook Conversion Tracking Pixel in WordPress

Your Facebook conversion tracking pixel is now installed on the page or post of your choice in WordPress.

Facebook just recently launched the Facebook Pixel Helper as a Chrome plugin to test your pixel. I highly recommend utilizing this tool. As always feel free to leave your comments below.

Facebook Pixel Helper

author bio
Brian Jackson

I craft actionable content and develop performance-driven WordPress plugins. Connect on Twitter, subscribe to my newsletter (once a month), or buy me coffee.

78 thoughts on “How to Insert the Facebook Conversion Pixel in WordPress”

  1. Thank you so much for this! I struggled with this same task last year and had to pay someone to do it for me. These instructions couldn’t be easier to follow…and they worked! Such a relief. Thanks again :)

    • Glad I could help CatieC! Ya, Facebook doesn’t like to play with WordPress very easily. Without using a plugin like this you would have to modify your WP files with PHP to insert the conversion pixel (javascript). Which unless you are a developer, that can be very dangerous.

  2. This is exactly what I’ve been looking for, but the plugin doesn’t work with the newer versions of WP. It’s only compatible up to version 3.4.2. WP is up to 3.9 now. Do you know of any other plugins that are more current? Or other ways of getting conversion pixels only on specific pages?

    • Hi Dan,
      I actually have this running on about 10 different sites all running WordPress 3.9 and it is working fine. About 3 different WP themes.

      The developer is a little slower and hasn’t updated the plugin to say it officially supports 3.9 but I haven’t had any problems with it. I have conversions that have fired off as of yesterday just fine with this. You can add multiple in this as well, I have bing conversion pixel, FB conversion pixel, etc… all running in this plugin.

      Were you having problems installing it?

    • Hi! You would want to install this on your “thank you” page or “checkout page” so the conversion pixels fires when there is a conversion. Hopefully that makes sense.

      • I followed these steps for my own website, but do not have any store/checkout features on my site. I was hoping to just use these tools to track visitors to my website and then be able to target them with Facebook Ads. Will this work for this? Thanks for a great article!

  3. Hi Brian – great simple answer. Quite a few “experts” have not bothered to mention the plug in. One problem – it is not loading for me. I only have it on one page and don’t think I am making any of the other mistakes listed in the Facebook helper page. Any advice?

    • hold that thought – I think I found the problem. Will let you know. Just subscribed to you too as I appreciate you having that info!

      • Thanks for subscribing… I always try to blog that which others don’t :) Are you running WordPress with any caching plugins installed? If you are trying to verify your pixel from Facebook, it usually takes them 5-10 minutes to go green on that side… they have their own caching which takes time to realize you have the script installed. Let me know if you have any other questions. Thanks!

        • I have the Abine tracking blocker on Chrome which I sometimes forget (duh) – turned it off for my own site and then FB picked it up fine. I’ll keep you posted

  4. Brian, the last woocommerce doesn’t have thankyou pages anymore (well, at least not visible on the pages-tab in wordpress). How can you add a facebook conversion pixel for the people that complete checkout and are directed to /checkout/order-received/?
    Thanks in advance!

    • Were you able to figure out your problem amit? To verify the pixel is working you should be able to go to the page you have your pixel on and the FB side should refresh and go green.

  5. Pingback: How to Insert the Facebook Conversion Pixel in WordPress | Conversion Gods
  6. Brian,
    I have no problem with using FTP and I’ve been learning my way around code. My issue is that I can’t find the ‘thank you’ page to add any code to. Even if I navigate to my ‘order-received’ page on my website then try to edit it, it takes me to edit the ‘checkout’ page. The plugin allows me to add code to a page but only to pages I can edit and therefore not the actual ‘thank-you’ or ‘order-received’ page. How do I get facebook pixel code on my actual ‘order-received’ or ‘thank-you’ page.
    Thanks so much, I have found your content quite helpful

  7. I am not sure why to use a plug in. You can copy and paste the code in a widget as text. Saves you again some speed and not having a ton of plug ins.

    • Hi Samantha. The reason you don’t want to install the pixel in a widget is because then it will fire on every single page which will throw off all of your data. The whole idea of the pixel firing is to register a conversion only on the page where the conversion takes place. Otherwise Facebook won’t be able to tell where the conversion happened. Hopefully that makes sense. The plugin lets you place the code on a “single page” and or “single post” of your choosing. Thanks!

  8. Hi folks. Is there a plugin available that remembers the conversion pixel code? With the plugin shown here I have to paste the code every single time I create a post or a page. That is imho stupid because facebook gives one code for each ad account only, so we do not have a new code every time. However, I have to go an copy the code every time and paste it. I would like only to check the checkbox for a new post and beeing done. I wonder why this is not implemented as option at least. OR I have gotten something wrong?

    • Hi Hasko,
      Great question. I don’t think that is an option simply because you only want the pixel firing on the pages where you are tracking successful conversions. For example on my client’s sites they have hundreds of landing pages but I only have this pixel one page, my “thank you” page. When someone submits a web form they are redirected to the “thank you” page and the pixel fires notifying FB of a conversion. What is your current setup? Because for most people you don’t actually want this to be on every page/post… Hopefully that makes sense. Thanks

      • Hi Brian,

        thanks for your answer. You talk of the conversion tracking pixel from FB and the remarketing pixel beeing two completely different setups. However, the basic code provided by FB is the same? Only the implementation on site is different, right? Or did I miss something out?

      • Hi again,
        I think I see the difference now, conversion pixel I get when I want to make an ad with the goal of conversion, the other is for custom audience. I am still not very familiar with the matter, busy learning and implementing. Thanks for your help!

        • Hi Hasko, yes sorry I should have mentioned the re-targeting pixel is for creating audiences. The pixel you make for ads is not something you want on every single page otherwise someone just visiting your page will register a conversion. If you put it on your thank you page it will only register a conversion after they have done something, like fill out a web form, etc.

    • Hi illoh. I don’t yet, but it is the very same process. In AdWords click into Tools and select “Conversions.” Click into your conversion, select the “Code” tab and then “I make changes to the code.” Then you can copy your code. Then you can paste the code into the FB conversion tracking plugin above. In fact you can have both the FB code and the AdWords code together in this plugin.

      • Wow, amazing, didn’t know I could use same plugin. Was trying to find a specific google adwords plugin, but most of them are not supported and untested with latest versions of wordpress. This is nice info. Thanks so much.

  9. Hi Brian, thanks so much for your expertise here. I’m trying to install the plugin through wordpress. Keep getting an error message which reads: “Could not find directory …. Plugin install failed.” Any thoughts on how to proceed or where to correct the issue? Much appreciated!

  10. Hi Brian, we’re trying to set-up the Facebook dynamic product ads. For this we already have a plugin which delivers a productfeed from our woocommerce website. Facebook indicates: After you create Product Catalog, Product Feeds and Product Sets, you should set up a pixel to track external events on your product pages and build a product audience. We’re a bit lost and confused right now. Is this the same as the remarkting pixel (guess not). Or does the plugin you indicate deliver the expected result for this as well? Do you have any experience with this? Thank you.

  11. Hey Brian – I’ve used this plugin in the past and it worked great..but since updating to the latest version of WP it doesn’t seem to be working correctly anymore. I’m unable to paste my new conversion pixel code into the Facebook Conversion Pixel box. It happens in all browsers and with all pixels. Have you heard of this happening as well? Has anyone else?


  12. Hi Brian, I want to instal FB Pixel on my wordpress website, will I need to install separate Pixels for Opt-In page conversion and Webstie Visits both? If I run them for different campaigns?

    • Hi Harry. So you will want to manually place the FB pixel only on your conversion “thank you page.” You can do so by following the tutorial above. For the FB audience/list you will want to put that code in the header of your website so that it is building from your entire site.

      If you only have one thank you page as your conversion page, you can just install the pixel once and then use that same pixel in your different FB campaigns. You can then monitor the conversions from the FB side. Hopefully that makes sense :)

  13. Hey Brian, thanks for the post!

    I’d like to suggest also our new plugin Tracking Code Manager especially created for Facebook marketers. It give you a complete solution for all your tracking codes: Google Analytics, Facebook Custom Audiences, Facebook conversion pixels, also with the new Twitter tailored audiences.

    Next week we’ll release also an update to track conversion in WooCommerce, Easy digital downloads and WP E-commerce dynamic thank you pages.

    Hope this help!

    Here the link:

    • You get the error from the chrome plugin? Have you tried clearing your cache and also the cache on your server?

  14. Great article and was wondering if there is a way to track the total sales in Woocommerce using the FB pixel in WordPress?


  15. Really helpful quick breakdown! It’s good to have a recommendation on a plugin to use for this, there are so many options out there that having a peer recommend one is awesome.

    Thank you!

  16. I tried to go to the plugin that you provided as a link in your post, and I get this warning which states that this plugin has not been updated in 2 years. What gives?
    This plugin hasn’t been updated in over 2 years.
    It may no longer be maintained or supported and may have compatibility
    issues when used with more recent versions of WordPress.”

  17. Thanks for the article. I have a question: When you insert the code on a page or post, is it also necessary to insert the specific conversion tracking snippets?

    I see there is the option to tick “insert Facebook conversion pixel code on this page” and I assume that refers to the plugin settings where you can choose where and what kind of tracking you want to enable. Is that correct?

    Thanks in advance!

  18. I’m sorry to appear ignorant, but can you suggest a woocommerce plugin for the new facebook dynamic ads pixels.also what pages do I put the code in?? facebook requires

    A minimum of three required events must be added to your website:




    how do I do this in woocommerce?

    • I agree with this and I’m trying to do just that… I’ve been looking for several days now. Did you ever find an off-the-shelf solution?

      • I was able to find a plugin called tracking code have to upgrade to the pro version for $28 to be able to put the code in the separate pages such as checkout and so on..the free version only allows you to put a code in all pages at once. I was able to add the codes and it is functioniong properly

  19. I followed your steps, but I receive this message in Facebook Pixel Helper:

    1 pixel found on

    1 error

    Facebook Pixel did not load.

    Event ID: PageView

    The Facebook Pixel pixel code on this page didn’t load, so no information was sent to Facebook.Learn more

    View Event Log

    Pixel ID: 565380323600400

    Pixel Location:

    Frame: Main Window

    Pixel Code: fbq(‘track’, “PageView”);

    Any suggestions?

  20. Pingback: WordPress Rewind - Jan 2016 | WPresstic

Leave a Comment