Wondering how the Facebook pixel can help optimize ad delivery for specific goals?
In this article, you'll discover how to install and use the Facebook pixel to track website traffic and create trackable Facebook ads.
What Is the Facebook Pixel?
The Facebook pixel is a piece of code you place on the backend of your website to track visitors to your site. The pixel allows you to run highly targeted campaigns, so it's important to install it before running Facebook ads.
Each ad account gets one default pixel to use. The code is made up of two main parts: the pixel base code and event code. The pixel base code tracks all of the traffic to your site. Event codes are additional pieces of code you can add under the default pixel code to specific pages of your website that allow you to track certain actions on those pages.
Here's a closer look at the types of event codes you can add.
- Search: If you have an ecommerce site, you can place the Search event code on a search results page on your site. For example, if someone is searching your site for “leather sandals,” you can add that term to the code for that results page.
- View Content: Place the View Content event code on a product page, for instance, to track views of a particular piece of content.
- Add to Cart: Include this event code on the add to cart page of your website. If website visitors place items in their shopping cart but don't complete the purchase, you can use the pixel data to run highly targeted ads just to those people.
- Add to Wishlist: If you have a wishlist option on your website, you can place this event code on the page to track the items people want most. Target them with a Facebook ad containing images of those specific items.
- Initiate Checkout: Place this event code on the page where someone begins the checkout process on your website.
- Add Payment Info: The Add Payment event code is triggered when someone adds payment information.
- Purchase: Place the Purchase event code on the thank-you page after people have purchased your product or service. If you have a new product coming out, you can design an ad for people who are already your customers.
- Lead: Use the Lead event code on the thank-you page after people have opted into a lead magnet or signed up for your webinar or newsletter.
- Complete Registration: Use the Complete Registration event code to track registrations to webinars, events, and so on.
- Custom: The beauty of the Facebook pixel is that you can customize it to meet specific business objectives. If you create a custom event, you'll also need to create a custom conversion related to the event.
These different pixel events allow you to gather data that helps you create successful Facebook ads and learn more about the people engaging with your website.
Basic, Recommended, and Advanced Installation Codes
Facebook gives you options for optimizing the event codes. You can install the pixel as-is or add your own parameters. Let's look at the View Content event code, for example.
Facebook recommends that you add values at this level. You can add a few more details than the basic version of this code.
You can get even more granular and allow the pixel to track very specific things.