If you’re using Facebook ads – or you plan to use them in the future – there’s one key tool you should start using right away. The Facebook Pixel will help you get the most out of your social ad budget. Here’s everything you need to know about how it works.
What is the Facebook Pixel?
The Facebook pixel is code that you place on your website. It collects data that helps you track conversions from Facebook ads, optimise ads, build targeted audiences for future ads, and remarket to people who have already taken some kind of action on your website.
It works by placing and triggering cookies to track users as they interact with your website and your Facebook ads.
If you were using the Facebook conversion pixel, you’ll need to switch over. You can learn how to do so in this Facebook business help article.
If you were using the old custom audience pixel, these instructions explain how to upgrade to the current pixel.
Why you need to set up the Facebook Pixel
The Facebook pixel provides important information you can use to create better Facebook ads, and better target your ads.
Facebook tracking pixel data helps ensure your ads are seen by the people who are most likely to take your desired action. This allows you to improve your Facebook ad conversion rate and get better ROI.
Even if you’re not using Facebook ads yet, you should install the Facebook pixel now. It will start collecting data right away so that you don’t have to start from scratch when you’re ready to create your first Facebook ad.
How can you use the Facebook Pixel? Here are just a few ways the pixel can help improve your Facebook marketing results.
Use Facebook conversion tracking
The Facebook Pixel allows you to see how people interact with your website after viewing your Facebook ad.
You can even track customers across their devices. This lets you see if people tend to see your ads on mobile but switch to a desktop before buying. Or, maybe it’s the other way around. This information can help you refine your ad strategy and calculate your return on investment.
Use Facebook retargeting
Facebook retargeting pixel data and dynamic ads allow you to show targeted ads to people who have already visited your site. You can choose to get really granular here.
For example, you can show people an ad for the exact product that they abandoned in a shopping cart or added to a wishlist on your website.
Create lookalike audiences
Facebook can use its targeting data to help you build a lookalike audience of people who have similar likes, interests, and demographics to people who are already interacting with your website. This can help expand your potential customer base.
Optimise Facebook ads for conversions
You can use Facebook tracking pixel data to optimise your Facebook ads for specific conversion events on your website.
Without a pixel, the only conversion you can optimise for is link clicks. With the pixel, you can optimise for conversions that align more closely with business goals, like purchases and sign-ups.
Optimise Facebook ads for value
As Facebook collects data on who buys from your site and how much they spend, it can help optimise your ad audience based on value. That means it will automatically show your ads to the people who are most likely to make high-value purchases.
Gain access to more Facebook ad tools and metrics
Want to use web conversion campaigns, custom audiences from your website, or dynamic ads? You can only do so if you’ve installed the Facebook Pixel. You also need the pixel to track metrics like cost per lead or cost per conversion.
How to use the Facebook Pixel
You can use the Facebook Pixel to collect data on two different kinds of events.
- Facebook has predefined a set of 17 standard events.
- You can set up custom events yourself.
An “event” is simply a specified action that a visitor takes on your website, like making a purchase.
Facebook Pixel standard events
The 17 standard Facebook Pixel events for which you can simply copy and paste standard Facebook event code are:
- Purchase: Someone completes a purchase on your website.
- Lead: Someone signs up for a trial or otherwise identifies themselves as a lead on your site.
- Complete registration: Someone completes a registration form on your site, such as a subscription form.
- Add payment info: Someone enters their payment information in the purchase process on your website.
- Add to cart: Someone adds a product to their shopping cart on your site.
- Add to wishlist: Someone adds a product to a wishlist on your site.
- Initiate checkout: Someone starts the checkout process to buy something from your site.
- Search: Someone uses the search function to look for something on your site.
- View content: Someone lands on a specific page on your website.
- Contact: Someone contacts your business.
- Customise product: Someone selects a specific version of product, such as choosing a certain color.
- Donate: Someone makes a donation to your cause.
- Find location: Someone searches for your business’s physical location.
- Schedule: Someone books an appointment at your business.
- Start trial: Someone signs up for a free trial of your product.
- Submit application: Someone applies for your product, service, or program, such as a credit card.
- Subscribe: Someone subscribes to a paid product or service.
You can also add more details to standard events using extra bits of code called parameters. These allow you to customise the standard events based on:
- How much a conversion event is worth
- Content type, or ID
- Basket contents
For example, you could use Facebook Pixel tracking to record views of a specific category on your website, instead of tracking all views. Perhaps you want to separate dog owners from cat owners based on which sections of your pet supply website they viewed.
Facebook Pixel custom events
You can use custom events in place of standard events, or to collect more details than Facebook Pixel standard events can provide.
Custom events use URL rules based on specific URLS or URL keywords. You can learn more about custom conversions in this Facebook help article.
How to create a Facebook Pixel and add it your website
Now that you know what you can track, and why you would want to do so, it’s time to create your pixel and put it to work on your website.
Step 1: Create your pixel
- From your Facebook Events Manager, click the hamburger icon (≡) in the top left and choose Pixels.
- Click the green Create a Pixel button.
- Name your pixel, enter your website URL, and click Create.
When choosing the pixel’s name, keep in mind that with Events Manager, you only get one pixel for each ad account.
The name should represent your business, rather than a specific campaign. If you want to use more than one pixel per ad account, you can do so using Facebook Business Manager.
Step 2: Add the pixel code to your website
To put the pixel to work gathering information on your website, you now need to install some code on your web pages. There a few ways to do this depending on what website platform you use.
- If you use an e-commerce platform like WordPress or a tag manager like Google Tag Manager, you can install your pixel without having to edit your website code directly. This Facebook Help article describes how to install your pixel if you already use one of those third-party tools.
- If you work with a developer or someone else who can help you edit your website code, click Email Instructions to a Developer to send your developer everything they need to install the pixel.
- If neither of the above options apply, you need to insert the pixel code directly into your web pages. That’s what we’ll walk you through in this section.
- Click Manually Install the Code Yourself.
- Copy-and-paste the pixel code into the header code of your website. That is, post it after the <head> tag but before the </head> tag. You need to paste it into every single page, or into your template if you’re using one.
- Choose whether to use automatic advanced matching. This option matches hashed customer data from your website to Facebook profiles. This lets you track conversions more accurately and create larger custom audiences.
- Check whether you’ve installed the code correctly by entering your website URL and clicking Send Test Traffic.
Once your Facebook Pixel is tracking activity, click Continue.
Step 3: Track the right events for your business
Select which of the 17 standard events you’d like to track using the toggle buttons. For each event, you need to choose whether to track on page load or on inline action.
- Track event on page load: Use this to track actions that involve going to a new page, like a purchase complete or sign-up success page.
- Track event on inline action: Use this to track actions within a page, like clicking an “add to cart” button that does not open a new page.
You can also set parameters for some events. For example, maybe you specifically want to track purchases over a set value.
If you want to use Facebook Pixel custom events, head to your Facebook Events Manager. Choose Custom Conversions from the top left menu. Then, click Create Custom Conversion to define your custom conversion event using URL rules.
Step 4: Add Pixel notice to your website
To comply with Facebook’s terms (and, in some cases, the law), you need to make sure visitors to your website know you’re collecting their data.
That means you need to provide clear notice that you’re using the Facebook Pixel and that their information may be collected through cookies or other methods. You also need to let users know how they can opt out of having their data collected.
To get all the details, go to the Facebook Business Tools Terms and scroll down to point 3: Special Provisions Concerning the Use of Facebook Pixels and SDKs. Or, check out Facebook’s cookie consent guide for sites and apps.
Facebook Pixel Cookies
What does it mean? Basically, this change allows advertisers to continue to track data on Safari and Firefox. Both of these browsers have placed limits on third-party cookies.
Why would you want to opt out? Advertisers in fields that have extensive privacy legislation, like finance and health, may need to opt out for compliance reasons.
Get all the details in this Facebook Business help article.
Get the most out of your Facebook ad budget and get in touch! We can implement Facebook’s powerful Pixel tool on your website to make it easy to create, manage, and optimise Facebook and Instagram ad campaigns.