3 Ways to Add the Facebook Pixel to Your Website

1 month ago 50

[NOTE: This post has been updated and completely rewritten from an original publication in 2017.]

You hopefully know by now that the Facebook pixel is importantit’s really freaking important. It’s the Facebook pixel that allows you to create powerful audiences for ad targeting, run dynamic ads, track conversions, and optimize for conversions.

Some marketers remain slow to add the pixel — or add it correctly. The most common reason is intimidation. They assume the process is complicated and overly technical.

While the pixel can get technical (particularly related to standard and custom events), it is extremely simple to apply it for its core utility.

Let’s take a closer look at three different methods that allow you to install the pixel easily and properly today…

Create Your Pixel

It’s possible that you don’t have a pixel yet. If so, go to Events Manager by finding it in your Business Tools menu at the top left in Business Manager…

Facebook Pixel

On the left, click to Connect Data Sources (you may first need to hover over the green circle with a white + in it).

Facebook Pixel

Select “Web” and click “Get Started.”

Facebook Pixel

Select “Facebook Pixel” and click “Connect.”

Facebook Pixel

Name your pixel. You can also enter the URL of your website to check and see if it was set up before.

Facebook Pixel

Now click “Continue Pixel Setup”…

Facebook Pixel

Locate Your Pixel for Manual Install

If you just created your pixel and clicked “Continue Pixel Setup” in the step above, click to “Install Code Manually.”

Facebook Events Manager

Now, click the green button to copy your code.

Facebook Pixel

If you previously created your pixel and tried to install it at another time, click the Add Events drop-down and select “From a New Website.”

Facebook Events Manager
For more details, read this post on finding your pixel or watch the video below.

1. Install Your Code Manually with Google Tag Manager

First, know that there are a million and one ways to install your pixel code manually. The goal: Add the base pixel code immediately before the closing HEAD tag on every page of your website.

This can be done with WordPress plugins, creative programming, and sometimes within theme settings. I’ve done it these ways before. But I’ve since graduated to Google Tag Manager (I’ll need to cover more about why in a separate post).

If you choose to use Google Tag Manager, follow these two primary steps…

1. Create a Tag.

Name your tag something like “Facebook Pixel – Base Code.”

Facebook Pixel

Use the Custom HTML tag type and paste your base pixel code (found in the prior step) here.

Facebook Pixel

2. Select Your Trigger

In the Triggering section below your tag, edit and select the “All Pages” Page View trigger.

Facebook Pixel

Save your new tag and publish your changes.

2. Use a Partner Integration

Instead of installing the code manually, choose the option to “use a partner.”

Facebook Events Manager

There are a whole bunch of options to choose from…

Facebook Pixel

I’m not going to go into every integration, for obvious reasons. But, let’s look at Shopify, a popular option, as an example.

I recommend turning on Advanced Matching.

Facebook Pixel

Select your Online Store in Shopify.

Facebook Pixel

Within your Shopify preferences, paste your Facebook Pixel ID.

Facebook Pixel

Note that this isn’t your entire pixel code, but rather the numeric value that represents your Pixel ID within the code.

Facebook Pixel

Once you’re done, verify your connection.

Facebook Pixel

If you get a green dot, you’re good!

3. Use the Facebook WordPress Plugin

One of the integration options is WordPress. I assume this will be another likely choice for many. So let’s walk through it, too.

First, I recommend turning on Advanced Matching.

Facebook Pixel

Download the Facebook WordPress plugin.

Facebook Pixel

Install and activate your plugin as you normally would.

Facebook Pixel

Enter your Pixel ID (see the Shopify example if you need it) and turn on Advanced Matching.

Then verify your pixel.

Facebook Pixel

If you get a green dot, you’re good to go. We won’t worry about adding events for now. That will be another post!

Facebook Pixel Basics Video Series

I created a free video series that covers all of the important basics of the Facebook pixel called, naturally, Facebook Pixel Basics. You can register by clicking the link below…

[GET THE VIDEO SERIES]

It includes eight lessons covering what the pixel is, why it’s important, how it works, how to add it to your website, and how to test that it’s working.

Enjoy!

Read Entire Article