If you’ve ever wanted to be a fly on the wall while your customers are visiting your website, the Facebook pixel is your ticket. A Facebook pixel is a bit of code (think of it like an invisible tracking device) that you place on your website to monitor user behavior. Businesses and marketers use it to make informed, data-driven decisions in their Facebook advertising strategies.

It works like this: you place the pixel on your website, test to make sure it’s working, and then you launch your ad campaign. Now, whenever a Facebook user is taken to your website through an ad, the pixel reports back all kinds of awesome data about what they did on your site — which you can then turn around and use to create ads that convert.

Sound like something you wish you had yesterday? Let’s get your Facebook pixel up and running.

Facebook Pixel Setup, Step by Step

The Facebook pixel is an extremely powerful tool, but it does require a bit of technical know-how. Fortunately, 2018’s Facebook pixel is the most user-friendly one yet — and you only need one pixel to track multiple types of data (an improvement from the old iteration). There’s only one pixel per Facebook ad account, meaning you’ll use the same pixel across all your websites if you manage multiple properties.

First, we’ll share exactly how to set up your pixel, and then we’ll talk about using the pixel to optimize your Facebook campaigns and increase conversions.

#1: Create your pixel.

Log into Facebook Ad Manager, go to Events Manager, and choose “Create a Pixel.”

#2: Choose your pixel setup method.

Facebook will prompt you to choose how you want to install the pixel. The easiest method is the first option, but this will only work if you’re using one of the website platforms listed within it. If you’re not, no worries — select “manually install the code yourself.”

#3: Copy the pixel code.

When Facebook displays your pixel code, copy all of the code onto your clipboard or into a separate document. This is your pixel, and it’ll look something like this:

#4: Paste the pixel code into the header of your website.

Now it’s time to inject the pixel code into your site. The code should go into your universal header or theme header, in order for the code to appear on every page. This is especially important when we get into the details later, and start tracking customer behavior on different pages of your site.

Use an Integration or Tag Manager

If you’ve chosen “Use an Integration or Tag Manager,” Facebook has built-in instructions for placing your pixel on some of the major website platforms. As of 2018, the Facebook pixel integrates with BigCommerce, Google Tag Manager, Magento, Segment, Shopify, Squarespace, Wix, and WooCommerce.

What if I’m using a different website platform?

If you’ve chosen “Manually Install the Code Yourself,” find your website’s <head> </head> tags and paste the pixel code within them. Alternately, your site building platform may have a section within “Settings” where you can access your header code. For example, in Weebly, you’ll navigate to Settings > SEO > Header Code and paste the code into the text box.

A side note: If you’re having trouble installing your pixel header code, you may have a security plugin or setting activated that needs to be temporarily deactivated. An example is WordPress’s Wordfence, which is an awesome tool that blocks people from injecting your site with malicious code but will also prohibit you from placing your pixel. If that’s the case, deactivate the security plugin, place the pixel, and then reactivate it.

#5: Check that your pixel is working.

After you’ve saved and republished your page or site, go back to Facebook Ads Manager and check the status of your pixel. It should say “active” after several minutes if it was pasted properly. If you’re working in Chrome and having trouble, the Facebook Pixel Helper Extension can help get you up and running.

Using Your Facebook Pixel to Increase Conversions

The Facebook pixel offers two main functions: the creation of custom audiences for retargeting, and custom conversions (or “events.”) It’s interesting to note that your pixel doesn’t just report user behavior related to your Facebook campaigns — it actually shares data about everyone who comes to your page, making it a powerful marketing tool.

Since we’re focusing on conversions here, let’s talk more about the “custom conversions” function of the Facebook pixel.

Why Custom Conversions Are the Advertiser’s Best Friend

Facebook Custom Conversions makes it possible to tell Facebook which action you want users to take when they visit individual pages. This way, you can see if your campaign is meeting your intended goal.

These actions are:

  • View content
  • Search
  • Add to cart
  • Add to wishlist
  • Initiate checkout
  • Add payment info
  • Purchase
  • Generate Lead
  • Complete registration

When you launch your campaign, the pixel will be able to show you the specific action users took when they clicked your ad — making it far easier to identify where you should be optimizing your campaign.

For instance, if you’re getting a ton of ad clicks and content views but no one’s purchasing, this probably means your ad content is great but your offer needs an adjustment. Alternately, if you’re getting purchases but your buyers aren’t coming from your Facebook ads, it’s probably time to optimize your Facebook ad.

How to Set Up a Custom Conversion

Facebook currently limits the number of custom conversions you can set up — and doesn’t allow you to delete them — so it’s smart to plan these in advance.

To set up custom conversions:

  1. Click the three horizontal bars (menu button) in the upper left of your Facebook Ads Manager page
  2. Choose “Custom Conversions”
  3. Under “Rule,” paste the domain of the page you’d like to set a custom conversion for (without the “http” and “www”).
  4. Name your custom conversion.
  5. Choose a category, which represents the action you want users to take on this page.

Though there’s always a learning curve with today’s advertising tools, the Facebook pixel is absolutely worth the work. With the delivery of deep insights into your customers’ behavior, the pixel gives you everything you need to create fantastic Facebook ad content that actually gets results.