How to Set Up a Facebook Pixel & Microdata Tags on Your Website
Setting up a Facebook pixel and microdata tags on your website is simple. Just follow the steps below!
This guide has seven steps:
Login to your Facebook Business Manager
Create your Pixel
Add the Pixel Code to Your Website
Turn on Automatic Advanced Matching
Check if the Pixel is Installed Correctly
Choose Event Tracking
Test the Pixel
Add Microdata Tags to Your Website
First, login to your Facebook Business Manager. If you don’t have a Facebook Business Manager account, return to the resources page and follow the instructions to create one.
2.) Create your pixel
From your Facebook Events Manager, click the hamburger icon (≡) in the top lefts and choose “Pixels”.
Click the green “Create a Pixel” button.
Name your pixel using your business name (for example, Pine Organics Pixel) and enter your website URL.
3.) Add the pixel code to your website
In order to gather information from your website, you’ll need to install some code on your website.
The method for this will depend on what type of website you have.
If you use an e-commerce platform, a platform like Squarespace, or a tag manager like Google Tag Manager, you can install your pixel without having to edit your website code directly. Use this this Facebook Help article to install your pixel.
To manually install the code yourself:
Copy-and-paste the pixel code into the header code of your website. In other words, 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 your website is setup with one.
4.) Turn on automatic advanced matching
5.) Check if pixel is installed correctly
Enter your website URL and click “Send Test Traffic”. Once your pixel is tracking activity, click “Continue”.
6.) Choose event tracking
Toggle on Events you would like to track.
7.) Test pixel
It is recommended that you make sure your pixel is working. If you use Chrome, add the Facebook Pixel Helper extension to your Google Chrome browser.
Visit your website pages where you have installed the Facebook pixel. Look to see if the extension finds the pixel. The </> extension icon will turn blue. Look for a popup that indicates how many pixels were found on the page. If the pixel is not working properly, you will be provided with error information so you can make corrections.
8.) Add Microdata tags for Product Catalogs
Before you can successfully add products to your catalog, you first need to add required tags that include info about the product on its product page. This is called microdata.
OpenGraph: Place microdata in the header of your website.
Schema.org: Place microdata across the product page where the products are located.
JSON-LD for Schema.org: Place microdata within the script tag.
Use this Facebook resource for the required tags you need to use when adding the microdata. Click whichever option you would like to use, and scroll down to see the example. Enter the required tags in the header or product page on your website, and save. If you are unfamiliar with how to locate the header section of your website, consult your web manager/designer.
When you choose an option, the window will expand to show you the required data and an example: