How to install a Facebook Pixel on WordPress

How to install a Facebook Pixel on WordPress

Facebook advertising, together with retargeting, are the lifeblood for many eCommerce businesses. Other businesses like professional services and agents can take advantage of remarketing using Facebook just as easily.

But first you’ll need to install a Facebook pixel so that Facebook can collect data on your visitors and allow you to target them with advertising.

It’s super simple to do, too.

To install a Facebook Pixel:

  1. Create a Facebook Business Account
  2. Go to the ad account section and create a pixel
  3. In WordPress, install the Pixel Caffeine plugin
  4. Go to the Pixel Caffeine plugin and validate your Pixel
  5. Visit your website and test to check your pixel is working

Don’t worry, I’ll give you details on each step. Here we go:

1. Create a Facebook Business Account

A Facebook Business account is an account designed specifically for managing page/s and ad account/s on Facebook.

Signup at

You do need a personal Facebook account to sign up. Don’t worry, your personal profile will not show to anyone on your business account unless you it choose to.

Once you have this account setup, you will be prompted to add a page to your account. Add your business’s page if you have one.

Now go to and click ‘add’. Create a new ad account that you will use for your pixel.

You should now have a new business account with a page added and a Facebook ad account in your business’s name.

2. Create a Facebook Pixel

Click the Business Settings ‘burger’ menu in the top left hand corner and find the pixel section on the menu below Measure & Report.

Once you in the pixel section, click the ‘create pixel’ in the top right hand corner.

You will be guided through a few prompts to get this setup. You can basically ignore these and say that you will complete process manually. We won’t actually be doing anything manually, the Pixel Caffeine plugin takes care of that for you.

Keep this page open in another tab and open WordPress in another.

3. Install the Pixel Caffeine Plugin

Ok, now head over to your WordPress site and go to to the plugins section. Search ‘Caffeine’ and you should find the Pixel Caffeine plugin from AdEspresso and click to install.

If you can’t find it, download it manually here: and upload it manually to your WordPress site.

That was easy.

4. Connect your Pixel

We’re on the final stretch – visit your Pixel Caffeine plugin in wordpress and click the Facebook Connect option.

This will ask you to allow the plugin to connect with your Facebook profile in order to access your ad account and connect the dots. Your name won’t show anywhere, and the plugin won’t post on your behalf to your page.

Your app should now be showing you a green box to say that the pixel was successfully connected!

5. Test your Pixel

You could stop here but let’s make a final check.

With your Facebook pixel page open in another tab, visit your website’s home page. If you have an adblocker on (guilty as charged) you will need to disable this for the time being.

Check back in on your Facebook pixel page and it should show after 10-20 minutes that some activity has been recorded on your site.

Congratulations! You’ve successfully setup your pixel!


The simple steps above should have showed you how to create a pixel and connect it with your WordPress website using the Pixel Caffeine plugin.

Now you will have a working pixel on your website which allows you to retarget visitors with advertising on Facebook.

If you need any extra help with your WordPress site, or you think something didn’t go quite right, feel free to ping any questions below and let me see if I can help.

Leave a Comment