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.”
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.
Step 3
Now we need to copy your conversion pixel. Head into “Ad Manager” in Facebook and click into “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.”
Step 5
Now simply copy the conversion pixel code to your clipboard.
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.
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.
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.
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?
Hey Brian – thanks for the quick response. It’s up and firing perfectly now. I tried it a couple months ago and it didn’t seem to be working. All set now! Appreciate the help.
Awesome glad to hear it!
Hey Brian, what’s the best way of using this if you use woo checkout? I am looking to try multiple ads and campaigns so I assume I need to have separate checkout pages for each campaign and each with a different pixel? I’m jus trying to get my head around how I do ribs without having to recreate the funnel ten times.
Thanks
Sorry for the delay. I did write an article today that might help you a bit: https://woorkup.com/setup-conversion-tracking-woocommerce/
Thanks for the article. Do you need to put this on every page or just the home page.
Thanks!
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!
Hi Brandon. Actually what you want to do is slightly different. You should read John Loomer’s post here: http://www.jonloomer.com/2014/01/28/website-custom-audiences-facebook/ What you want to do is use the remarketing pixel and create a custom list from your website. It auto populates and then you can target that list with your ads. It’s awesome, I have a lot of campaigns targeting like this :) Remarketing is the bomb!
Thanks for the article – simple and to the point!
No problem! Glad we could help. Simple and to the point is how we like it :)
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
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!
Sorry for the delay, just put out a tutorial on this today! https://woorkup.com/setup-conversion-tracking-woocommerce/ Hope it helps.
Super simple – great help!
Glad this was helpful! Thanks for stopping by.
Thank you very much, that’s so easy. But, I cannot refresh the pixel code in facebook!
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.
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
Drew
https://leadersbeverage.com
I’m assuming you are referring to WooCommerce on WordPress? If so, you should read my other tutorial. This deals with those types of pages. https://woorkup.com/setup-conversion-tracking-woocommerce/
Thanks!
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!
That depends. You can make widgets conditional or even there are themes where the widgets don’t show on every page.
That is true, I actually have a tutorial on how to hide widgets on certain pages: https://woorkup.com/hide-wordpress-widgets/ So yes that could actually work if you have your pixel in a widget that is only on that page.
Thanks, great plugin!
No problem Christa! Glad it was helpful.
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 Brian, thanks for your help, appreciate it. I think I begin getting the hang of it :-)
Hi, thanks for the infos. As an option to integrate the pixel code into wordpress website – you have this handy plugin for WordPress http://woocommerce-thesis-integration.com/shop/tools/facebook-audience/
Thank you for the post. do you have related content on adding Google Adwords conversion pixel?
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.
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!
Hi Michael… that is most likely a permissions issue on a folder on your web server. (see similar example here: https://wordpress.org/support/topic/core-or-plugin-update-could-not-create-directory-httpdocs) What I would do is simply create a ticket with your web host and ask them to fix the problem. They should be able to quickly resolve the issue.
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.
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?
Thanks
Hey sorry for the late reply Dan. I am still using this plugin on my WP installs that are all up to date. Did you ever figure out your problem? Maybe it was a plugin conflict?
Yes – thank you for replying Brian.
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 :)
Hi Brian, how can we put a tracking status on our website?
Thanks!
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: https://wordpress.org/plugins/tracking-code-manager/
This is so helpful! Thank you for this amazing plugin!
Trying to add but get the error: Pixel does not load. No instructions on Facebook to fix.
You get the error from the chrome plugin? Have you tried clearing your cache and also the cache on your server?
Thanks for the straightforward list of steps.
Np, glad I could help!
Great article and was wondering if there is a way to track the total sales in Woocommerce using the FB pixel in WordPress?
Regards
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!
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.”
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!
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:
ViewContent
AddToCart
Purchase
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 manager..you 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
Does it also track when product is added in to cart / or tried checkout or checkout completed?
By the way, if you want to install Facebook Pixel (the new code) there is a WordPress plugin to help you with that. You can define standard and custom events and it is WooCommerce friendly: https://wordpress.org/plugins/pixelyoursite/
I followed your steps, but I receive this message in Facebook Pixel Helper:
1 pixel found on http://www.frequencymartialarts.com
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: http://www.frequencymartialarts.com/
Frame: Main Window
Pixel Code: fbq(‘track’, “PageView”);
Any suggestions?
Hi from us ads
Amanhanda
From us help email acoount us from id crad new help
From email id card new
Code send
Facebook loke plsse
Is not updating for a custom audience. Any ideas
Cheers for this. Simple and straight forward.
nice post