Understanding & Implementing the Facebook Pixel

On a good day, the word “pixel” still sounds somewhat mysterious to me. It’s a look I recognize from others when they hear the words “Facebook pixel…I know I’m among my people when I see it.

(Pretty sure Marky Mark actually watched me looking at code in order to perfect this face.)

To be clear: I am not a coder. I am not developer. Code makes me break into hives. I am always very sure I will break something, and it’s not an unfounded fear.

However, I have to know very specific things in order to do my job well, and tracking pixels are one of them. The Facebook pixel is a cornerstone of running ads on there, but it is understandably confusing to folks. I’m going to break this down into normal-person speak as best as I can.

What is the Facebook Pixel?

It’s a little piece of code that goes on every page of your website. It’s called a “universal pixel” since it needs to exist on each page. Facebook used to just have one piece of code that went on the page you wanted to have counted as a conversion, so some people are still wrapping their heads around the difference between that old page, and the new one.

What does it do?

At its base level, it’s just tracking users, seeing what pages they visited.

That sounds boring. How do we use that?

Here’s why it’s so crucial: It’s used for a lot of the power you find in Facebook Ads. Let’s look at some examples:

Retargeting

Because the pixel knows which pages users visited, you can set up retargeting based on those behaviors. So if someone visited your page about underwater basketweaving, you can create a specific audience of those people and show ads only to them the next time they’re on Facebook.

Lookalikes

Since Facebook knows who those users are, it looks at what they do, what they like, what they interact with, etc. And because Facebook has over 1 billion users daily, it can distill those behaviors and find other users on its platform that behave the same way. Letting Facebook “see” your web traffic is one way of helping it do that. (I’ll cover this more extensively in a separate post on creating audiences. Just know for now that the pixel plays a very big part.)

Tracking conversions

If you’re selling something on your website, or you have something you want people to download, those are your desired conversions. Because the pixel is on your entire site, you will know when someone hits that “thanks for buying/downloading/whatever” page.

So, it’s an important little bugger.

Ok, I’m convinced. How do I implement my Facebook pixel?

The Facebook pixel is generated as one pixel per ad account. You can find yours by going to the “Pixels” section:

You can copy the code there and then have it pasted into the <head> section of your website. Ta da!

Pixel Events

This is a really confusing thing, but it’s so valuable. I get why it’s confusing too (the common theme being that Facebook isn’t the best at explaining its platform).

When you place the pixel, it will start firing and will count the pixel fires on a given page. You can see this in the URLs section when you’re in the Pixel area:

Important note: This isn’t counting users on that URL who came through Facebook. It’s just a total count of pixel fires.

You can specify certain “Events” that you want counted. You can check them out by clicking the option next to where the URLs option is.

An Event is one little additional line in your Facebook pixel code that tells Facebook “hey, this page is special, so I want you to log all visits here as a special event with a specified name,” basically.

By default, the pixel code has what’s called a PageView event. This just means the page loaded. This always shows as an event when you first place your pixel, because by default it’s part of that universal pixel:

And here’s where you can see it in your code:

So I can add more things that show up as an Event?

Yes! Here’s an example – the Event is in the green area (of course they call it a “Standard Event,” because hey, why the hell be consistent and make it less confusing, right?)

Where it says ‘AddtoCart’ there….when that’s added, you’ll start seeing “AddtoCart” show up under that PageView reference in that Events list.

The Facebook pixel has 9 Events that they consider “standard,” which you can see here. In truth, you can name things whatever you want in those single quotes, but the ones they list there tend to cover most advertisers’ needs.

Why Do I Need Events?

When you advertise through Facebook, obviously you want it to track key actions or conversions on your site.

There are two ways to do this: by setting up an Event as described above, or by creating a “custom conversion.” A custom conversion is basically you saying “when someone visits such and such URL” or some other combination of actions. You set those up in the Custom Conversions area:

Events vs. Custom Conversions

This is where I see a boatload of confusion for people: do they use events, custom conversions, or both? Why one vs. the other.

The main distinction for me is if the conversion action is something I will ever want the Facebook algorithm to optimize serving my ads around.

Where it gets confusing for users is that you can skip implementing something as an Event, and just create it as a Custom Conversion. So, why bother with making something an Event, if the system will track how many purchases are generated if I just create a Custom Conversion?

The key lies in the Event being a way Facebook can optimize. When you run a conversion-focused campaign type, you tell Facebook what action to optimize the buy towards. And, therein lies the thing: what you tell it has to be an Event. Not a custom conversion:

So Events are worth the extra elbow grease for things that are going to become a focal point for you, for lack of a better explanation. Things like a purchase, or a lead – those surefire conversions that are going to rock and roll your ad spend…those babies should be set up as an Event.

It also makes it easy to spot performance when you have things running. If I set up an ad set to optimize towards a Completed Registration, for example, the Ads Manager interface shows me that quickly:

With a custom conversion, I’d have to go into the columns and add it to see the total. So, a nice perk.

There you have it

Hopefully this has helped erase some confusion I run into a lot over the pixel itself, what Events are and how you add them, and how they’re different than custom conversions. Now you’re ready to go forth and be a pixel queen (or king).

Still have questions? Leave ’em below!

Leave a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.