It used to be pretty complicated and “techy” to install the Facebook pixel code on your own website, but the good news is, you can now do it quickly and easily (on your WordPress site) without even having to use a plugin and with no technical skills at all when you follow along this blog post and video!
The Power of the Pixel
Some people believe that Facebook Pixels are even more valuable than an email list because they are SO very powerful! I think that you need both, but far too many people either don’t have a Facebook pixel installed at all, or if they do, they either don’t use it, or use it wrong.
There are many great ways to communicate to your audience with the Facebook pixel.
For example, you can target people (with an ad) that visited your shopping cart or sales page, but did NOT purchase. Alternatively, you could target someone who never visited your sales page but maybe read a blog post of yours and then left.
How you follow up and communicate with those two examples SHOULD be very different right? You’d want to talk to the person who almost purchased very differently than someone who just read a blog post for a minute and then left your site.
Problem is, most people have general ads, content, and messages that they send to EVERYONE, which doesn’t work very well. When you use the Facebook Pixel correctly, you can segment and target your message to your audience perfectly, and do it based on THEIR actions! It’s incredible!
Also, don’t think of using the Facebook pixel just in terms of ads; you can also push highly targeted, helpful, educational, and specific content out to your audience via ads as well. So many powerful options. Make sure you are using them in your business!
How To Install The Facebook Pixel On Your WordPress Website – The Ultimate Step-By-Step Guide
There are two parts to this guide: I have a video that shows you step-by-step how to setup Google Tag Manager and install your Facebook pixel, and for those who prefer to read and see images, I have the entire guide detailed below the video. Enjoy, and share it with people you think could use it!
To install your Facebook pixel, I recommend using Google Tag Manager which is free. It’s amazing because once you set it up, you’ll be able to easily not only install the Facebook pixel, but also other things (like Google Analytics, and other variations of the Facebook pixel) quickly and easily without even having to deal with the code on your site. It’s also great because you won’t be needing to use a plugin to install your Facebook pixel; plugins can cause your site to slow down and they constantly need to be updated so it’s always a great thing when you can do something like this without a plugin.
Go to TagManager.Google.com and either sign in, or create a free account if you don’t already have one.
Click “Create Account” (you will need 1 account for each website you have). In your new account, you will want to give it a name, and then setup the container.
The container is where you put the URL of your website. (see picture below for example). You don’t put in the http://www, just the domain name itself.
Below that, you should choose “Web” and then click on the “Create” button.
Google Tag Manager now gives you the code that you need to put on your website. Don’t be scared, you don’t have to know what any of this means, I’ll walk you through step-by-step and it’ll be super easy to do ☺
Looking at the code (see image below), you’ll see that there is code that needs to go into the <head> section of your website and code that needs to go into the <body> section.
Go ahead and highlight and copy the code that goes into the <head> section. Also, highlight and copy the code that goes into the <body> section and paste them both into a text file.
Login to your WordPress website and navigate to Appearance/Editor. (Keep Tag Manager open when you do this, just open a new tab for this part).
Once you are on the editor screen, on the right hand side, you need to find and click on the “header.php” file to open it up.
Note: This will work regardless of what theme you are using. Your header.php file may look a little different than mine in the screenshot, and that’s ok.
Once you have the header.php file on the screen, scroll down to the beginning of the <head> section. On that line, hit enter and paste your “head” code from Google Tag Manager right under the <head> tag.
Note: There are two head tags so make sure you do this under the very first one which is near the top.
Next, get the <body> code that you copied from Google Tag Manager and put into a text file. Highlight and copy that <body> code.
Still on the header.php screen, scroll down to the first <body> tag. It will start right at the end of the second <head> tag. Go to the end of that first body tag line and hit enter to give yourself a space right under it. Now, paste the <body> code right there. Make sure you are pasting the <body> code and not the <head> code that you already pasted in.
Note: your body tag may look a little different than the image below, it may start with something like this: <body>.
Lastly, scroll down and click the “Update File” button. We now have done everything we need to do on our website and need to go back to Tag Manager to finish up.
Back in Tag Manager, your screen should still look like this:
Now, click the “Ok” button AND then the “Publish” button in the upper right hand corner. It will give you a summary and you’ll need to click “Publish” a second time, and then click continue. You now have successfully installed Google Tag Manager!
Let’s test it! To test and make sure you have Google Tag Manager installed correctly, you can download the Tag Assistant Chrome extension here. You can also watch my video in this blog post to see how I test to ensure Tag Manager is installed correctly.
Now, we need to grab the Facebook Pixel Code now. Login to your Facebook account and click on “Ads Manager” and then click on “Ads Manager” at the top (again), and then click on “Pixels”.
On that screen, there should be a button that says “Actions”. Click on that and then click on “View Pixel Code”.
Now, highlight your pixel code and copy it to the clipboard or you can copy into a text file if you’d like.
Back in Tag Manager, click on the box that says “New Tag”.
Give it a name at the very top. I call it “Facebook Pixel”. Next, click on the “Tag Configuration” box and choose the tag type. You will want to select “Custom HTML”.
Next, paste the Facebook pixel code that you copied into the Custom HTML box.
Next, scroll down and click on “Triggering” and then click on the “All Pages” text.
Next, click “Save” in the upper right, and then on the next screen, make SURE you also click “Publish” in the upper right. Many people forget to click publish and it won’t work until you publish it.
Note: You will have to click “publish” twice and “continue” once and then it will be fully published.
That’s it, we are done! If you followed these instructions, you now have your fully functional Facebook Pixel installed on your WordPress website! Great job!
Testing The Facebook Pixel To Make Sure It’s Installed Properly
There is an easy way to test it and make sure your Facebook pixel is installed properly. Facebook has a great little tool that is a Google Chrome extension and it’s called the Facebook Pixel Helper. You can download it here.
Once you load and activate the Facebook pixel helper Chrome extension, go to your website, refresh the page in your Chrome browser, and click on the little Facebook Pixel Helper icon on your toolbar and it should verify that it sees your pixel installed (see image below).
Congratulations, you did it! In reading this, it may seem like a lot, but in reality, it only takes about 5 minutes to do and now you will have the ability to communicate and follow up with customers and prospects based on actions they take (or don’t take) on your website!