Updated: Jun 21, 2022
Does the Facebook Pixel have you stumped?
Look no further then Coursenvy for all your Facebook Marketing answers!
Make sure to check out our Facebook Marketing Mastery Course at www.coursenvy.com/courses
The Facebook Pixel: https://www.facebook.com/business/help/651294705016616
How to Install the Facebook Pixel
So first, what is the Facebook Pixel and how do we install it?
To create your Facebook pixel:
Go to your Facebook Pixel tab in Ads Manager: https://www.facebook.com/ads/manager/pixel/facebook_pixel
Click Create a Pixel.
Enter a name for your pixel. You can have only one pixel per ad account, so choose a name that represents your business. Note: You can change the name of the pixel later from the Facebook Pixel tab.
Check the box to accept the terms.
Click Create Pixel.
The Facebook pixel code is made up of two main elements:
Pixel base code
The pixel base code tracks activity on your website, providing a baseline for measuring specific events. The base code should be installed on every page of your website. To install the pixel base code:
Go to the Pixels page in Ads Manger: https://www.facebook.com/ads/manager/pixel
Click Actions > View Code
Copy the base code and paste it between the <head> tags on each web page, or in your website template to install it on your entire website
Events are actions that happen on your website, either as a result of Facebook ads (paid) or organic reach (unpaid). The event code lets you track those actions and leverage them in advertising. There are two types of events you can send:
Standard events: 9 events we’re able to track and optimize your ads for without any additional actions. See below for an example of what your website code will look like with standard events installed.
1. Your website’s original code: Paste the Facebook pixel code between the <head> and </head> tags of your web page. You may already have other existing code between the head tags, so just place the pixel code underneath that, but above </head>.
2. Your Facebook pixel base code: Your Facebook pixel code will look like the diagram above, except your pixel ID will be different from 1234567890.
3. Your standard event code: Within your Facebook pixel code, above the </script> tag, paste the Standard Event code that’s relevant to your page (ex: Complete Registration, Add To Cart). You’ll need to do this for every page you want to track.
The key here is that every page of your website should have everything that’s enclosed in section 2 (the base code), but different pages will have different snippets of code for section 3 (standard event code). See below for another example:
Custom events. Actions that are important to your business, but that you can’t use for tracking and optimization without additional action.
Adding the event code to your website’s pages Event code indicates specific actions that are important to your business objective. To add the event code to your website:
Go to your Facebook Pixel tab in Ads Manager: https://www.facebook.com/ads/manager/pixel/custom_audience_pixel/
Click Create Conversion > Track Conversions with Standard Events.
Copy the Event Code of the events that matter to you.
Go to your website’s code and place the event code on the relevant pages. We recommend doing this by adding the event code between script tags separately. We recommend not modifying the pixel base code.
Tips: Add a full-funnel of events (ex: ViewContent, AddToCart and Purchase) to capture all relevant purchase actions.
On the special pages of your website that you want to track and optimize your ads for, add one of these 9 standard events. For example, someone selling toys on their website would place standard event codes for their add-to-cart page and purchase page. Just copy and paste everything in the standard event code column and paste it under fbq(‘track’,’PageView’); like in the diagram above. If you’d prefer to use URL rules instead of standard events, you can use custom conversions instead.
Note: You can also add different parameters for each standard event code, such as Content ID, value and currency. The conversion standard event requires value and currency parameters to work. Parameters are optional for all other standard events.
Advanced Facebook Pixel Setup for Developers
For more in-depth installation practices for your Facebook Pixel, check out Facebook’s developer site made just for the Facebook Pixel: https://developers.facebook.com/docs/marketing-api/facebook-pixel
Get access to ALL of our top-rated Coursenvy courses at: http://modmba.com
Join our FREE Facebook Marketing Course: How to Develop Effective Organic and Paid Strategies