In this article, we’ll cover how to set up and install a Meta Pixel on your website. To learn more about the Pixel before getting started, check out the benefits of installing a Meta Pixel.
If you already created a Meta Pixel and want to find your Pixel base code, skip to step 2, How to set up the Meta Pixel on your website. Follow the instructions to Manually add Pixel code to your website.
Before you begin
- You need a website for your business.
- You must be able to update your website’s code.
If you don’t know how to update your website’s code, schedule a call with our team. We’ll install your pixel for you – it’s 100% free. No hassles. No obligations. Absolutely no catch.
If you’re more of the DIY type, then read on for step-by-step instructions for setting up your Meta Pixel.
Step 1. How to set up a Meta Pixel
- Go to Events Manager.
- Click Connect Data Sources and select Web.
- Select Meta Pixel and click Connect.
- Add your Pixel Name.
- Enter your website URL to check for easy setup options.
- Click Continue.
Step 2. How to install the Meta Pixel on your website
OPTION A: Manually add Pixel code to website
Once you’ve created your Meta Pixel, you’re ready to put the Pixel code on your website. For instructions on how to do this, choose your setup option:
- Go to Events Manager.
- Click the Data sources icon on the left side of the page.
- Select the Pixel you want to set up.
- Click Continue Pixel Setup.
- Select Meta Pixel and click Connect.
- Select Install code manually.
- Copy the Pixel base code.
- Find the header of your website, or locate the header template in your CMS or web platform.
- Paste the base code at the bottom of the header section, just above the closing head tag.
- Click Continue.
- Optional: Toggle on Automatic Advanced Matching and verify the customer information you want to send.
- Click Continue.
- Add events using the Event Setup Tool or by manually adding code to your website.
Using The Event Setup Tool
- Click Open Event Setup Tool to add events and parameters without additional coding.
- Follow the onscreen instructions to add events to your website.
14. Click Done.
OPTION B: Use a partner integration
- Go to Events Manager.
- Click the Data sources icon on the left side of the page.
- Select the pixel you want to set up.
- Click Continue Pixel Setup.
- Click Use a partner.
- Select a partner from the list.
- Follow the onscreen setup instructions.
You can also set up your Meta Pixel on your website by going to the Partner Integrations page in Events Manager, selecting your partner and following the onscreen instructions. Learn more about the benefits of using partner integrations to set up your Meta Pixel.
If you don’t see your platform, use 1 of the other 2 ways to set up your pixel.
OPTION C: Email instructions to your developer
If someone else updates the code on your website, follow these steps to email them your Meta Pixel setup instructions.
- Go to Events Manager.
- Click the Data sources tab on the left side of the page.
- Select the Pixel you want to set up.
- Click Continue Pixel Setup.
- Click Email Instructions.
- Enter the recipient’s email address.
- Click Send at the bottom of the page.
Step 3. Set up events
After you add the Meta Pixel base code to your website you can set up events to measure the actions you care about, like making a purchase. You can do this by manually installing the code or by using the point-and-click Event Setup Tool. Then, make sure that your Meta Pixel is working correctly.
You can use one Pixel across your whole website, including multiple pages of your website.
If you use the Meta Pixel to share events with Meta, we recommend that you also use the Conversions API. The Conversions API works with your Meta Pixel to help improve the performance and measurement of your Meta ad campaigns. Learn more about the Conversions API.
Note: Apple’s iOS 14 changes require apps in the App Store that engage in what Apple defines as “tracking” to show a prompt to iOS 14.5 and later users in accordance with their AppTrackingTransparency framework. These changes impact how Meta receives and processes events from tools like the Meta Pixel. If you optimize, target or report on web events from Meta Pixel or any other business tools, you can take steps to update your event setup and manage these changes.
Best Practices for Meta Pixel Setup
You can use these best practices during and after Meta Pixel setup to check that you successfully installed your Pixel and events.
During Meta Pixel setup
- Check that your Pixel base code is accurate. If you installed the Pixel using code on your website, make sure everything between the <script> and </script> tags exactly matches your Pixel base code. If you installed the Pixel using a tag manager, then you won’t see the code on the actual web page so you’ll have to troubleshoot within your tag manager.
- Check that you added the event code in the correct place. Here’s an example of what your website code might look like with the add to cart event installed:
- Your website’s original code.
- Your Pixel base code.
- Your standard event code.
- Make sure your standard events are spelled correctly in code. Events are case sensitive, so if you accidentally add fbq(‘track’, ‘viewcontent’); to one of your web pages instead of the correct standard event code fbq(‘track’, ‘ViewContent’); you’ll see an event called viewcontent show up as a custom event in Meta Events Manager.
After Meta Pixel setup
- Use the Conversions API in addition to the Meta Pixel, and share the same events using both tools. We call this a redundant event setup. For example, if you share the purchase, initiate checkout and contact events using the Pixel, share those same web events from your server using the Conversions API. Redundant setups are useful because the Conversions API allows you to share website events that the Pixel may fail to capture due to network connectivity issues or page loading errors.
- Use the Test Events tool to check that you set up your standard or custom events correctly. If you see any unusual activity, you can also use the Test Events tool to debug your events.
- Check the Diagnostics tab in Events Manager to find and resolve problems related to your event setup. You’ll also see recommendations to improve your event setup if a problem is detected.
- If you can’t access the ad account with the Pixel you want to test, download the Meta Pixel Helper. A pop-up tells you what Pixel and events were found on the page, and if they loaded successfully. If the page view event (which is automatically included as part of your Pixel base code) loads on every web page, and each standard event loads successfully (only on the pages you added them to), then you can start using your Pixel.
- Go to a web page where you’ve installed the entire Pixel base code, including the page view event. The page view event is automatically included as part of your Pixel base code. If your Pixel is working correctly, it will send the page view event back to Meta. The page view event will show up on your Pixel’s page in Events Manager. Your Pixel’s status will also be set to Active.
If you’ve successfully set up your Pixel, you’re ready to use the Pixel for advertising.
Note: You can use one Pixel across your whole website, including multiple pages of your website. However, there may be a need to use two Pixels on one website. For example, if two different agencies run ads for your business, they may each need to set up a separate Pixel on your website.
Benefits of Installing the Meta Pixel
The Meta Pixel is a piece of code that you put on your website that allows you to measure the effectiveness of your advertising by understanding the actions people take on your website.
You can use the Meta Pixel to:
- Make sure your ads are shown to the right people. Find new customers, or people who have visited a specific page or taken a desired action on your website.
- Drive more sales. Set up automatic bidding to reach people who are more likely to take an action you care about, like making a purchase.
- Measure the results of your ads. Better understand the impact of your ads by measuring what happens when people see them.
Once you’ve set up the Meta Pixel, the Pixel will log whenever someone takes an action on your website. Examples of actions include adding an item to their shopping cart, contacting you over the phone, submitting a contact form, or making a purchase. The Meta Pixel receives these actions, or events, which you can view on your Meta Pixel page in Events Manager. From there, you’ll be able to see the actions that your customers take. You’ll also have options to reach those customers again through future Facebook ads.
If you use the Pixel to share events with Meta, we recommend that you also use the Conversions API. The Conversions API works with your Pixel to help improve the performance and measurement of your Facebook ad campaigns.
Meta’s (Facebook) Business Tools Terms require that businesses (or partners acting on their behalf) may not place Pixels associated with their Business Manager or ad account on websites that they do not own without written permission. Starting May 5, 2021, Facebook shows verified domain owners the events and custom conversions recently received from Meta Pixels placed on their website. While verified domain owners will see all these events, the only events they can use for ad optimization and reporting are events they can access from their own Business Manager Account. If you don’t want your Meta Pixel or custom conversion information visible to the domain owner, you can remove the Pixel from the website or delete the custom conversion before the specified date.
Note: Apple’s iOS 14.5 changes require apps in the App Store that engage in what Apple defines as “tracking” to show a prompt to iOS 14.5 and later users in accordance with their AppTrackingTransparency framework. These changes impact how Meta receives and processes events from tools like the Meta Pixel. If you optimize, target or report on web events from Meta Pixel or any other business tools, you can take steps to update your event setup and manage these changes.