How to Set Up Facebook Pixel in 2026: Everything You Need to Know
If you are running Facebook ads in 2026 and you have not installed the Meta Pixel on your website yet, you are leaving money on the table. The Facebook Pixel (now officially called the Meta Pixel) is the backbone of ad tracking, retargeting, and conversion optimization on the Meta advertising platform.
In this guide, we will walk you through exactly how to set up Facebook Pixel on your website, step by step. Whether you are using WordPress, Shopify, or adding code manually, we have you covered. We will also show you how to configure event tracking, connect the Conversions API, and verify that everything is firing correctly.
Let’s get started.
What Is the Facebook Pixel (Meta Pixel)?
The Meta Pixel is a small piece of JavaScript code that you place on your website. Once installed, it tracks visitor activity and sends that data back to Meta so you can:
- Track conversions from your Facebook and Instagram ads
- Build retargeting audiences based on website visitors
- Create lookalike audiences to find new customers similar to your existing ones
- Optimize ad delivery so Meta shows your ads to people most likely to take action
- Measure return on ad spend (ROAS) with accurate attribution
In short, without a properly configured pixel, your Facebook advertising is essentially running blind.
Is the Facebook Pixel Free?
Yes. The Meta Pixel is completely free to create and install. You do not need to be running ads to set it up, though you will need an active Meta Business Portfolio (formerly called Business Manager) and an ad account.
What Is the Facebook Pixel Called Now?
Facebook rebranded to Meta, so the official name is now the Meta Pixel. However, most marketers still refer to it as the Facebook Pixel. Both terms mean the same thing, and Meta’s own documentation uses both interchangeably.
Before You Start: What You Will Need
Before diving into the setup process, make sure you have the following ready:
- A Meta Business Portfolio (create one at business.facebook.com if you do not have one)
- An ad account connected to your Business Portfolio
- Admin access to your website (WordPress admin, Shopify admin, or access to your site’s HTML code)
- The Meta Pixel Helper Chrome extension (for testing later)
Step 1: Create Your Meta Pixel in Events Manager
This is where everything begins. Follow these steps to create your pixel:
- Go to Meta Events Manager at facebook.com/events_manager
- Click Connect Data (the green button on the left side)
- Select Web as your data source and click Connect
- Enter a name for your pixel (use something descriptive like your website name)
- Enter your website URL when prompted
- Click Create Pixel
Your pixel is now created. Meta will assign it a unique Pixel ID (a string of numbers). You will need this ID for the installation step.
Pro tip: You can find your Pixel ID at any time by going to Events Manager, clicking Datasets in the left menu, and selecting your pixel. The ID appears right under the pixel name.
Step 2: Choose Your Installation Method
After creating the pixel, Meta will ask you how you want to install it. In 2026, there are three main options:
| Method | Best For | Difficulty |
|---|---|---|
| Partner Integration | WordPress, Shopify, Wix, Squarespace users | Easy |
| Manual Code Installation | Custom websites, full control over placement | Medium |
| Conversions API Gateway | Advanced users wanting server-side tracking | Advanced |
We will cover all three below.
Step 3A: How to Set Up Facebook Pixel on WordPress
WordPress is the most popular CMS in the world, and Meta offers a straightforward integration for it.
Option 1: Use the Official Meta Pixel Plugin (Recommended)
- Log in to your WordPress dashboard
- Go to Plugins > Add New
- Search for “Meta Pixel for WordPress” (also sometimes listed as “Facebook for WordPress” or “Meta for WordPress”)
- Click Install Now and then Activate
- After activation, go to Settings > Meta Pixel (or find it under the plugin menu)
- Click Connect and log in with your Facebook account
- Select your Business Portfolio, then choose your Pixel
- Click Save Changes
The plugin automatically places the pixel base code on every page of your WordPress site and supports standard events.
Option 2: Use a Tag Manager Plugin or Header/Footer Plugin
If you prefer not to use the official plugin, you can paste the pixel code manually using a plugin like Insert Headers and Footers or WPCode:
- Copy your pixel base code from Events Manager (we show you how in the manual installation section below)
- Install and activate the WPCode plugin (or similar)
- Go to Code Snippets > Header & Footer
- Paste your pixel code into the Header section
- Click Save
This method works well and gives you more flexibility if you want to customize the code.
Option 3: Use Google Tag Manager
If you already use Google Tag Manager on your WordPress site:
- Log in to your Google Tag Manager account
- Create a New Tag
- Choose Custom HTML as the tag type
- Paste your Meta Pixel base code into the HTML field
- Set the trigger to All Pages
- Save and Publish your container
Step 3B: How to Set Up Facebook Pixel on Shopify
Shopify has a built-in integration with Meta that makes pixel setup very simple.
- Log in to your Shopify admin panel
- Go to Settings > Apps and sales channels
- Click Shopify App Store and search for “Facebook & Instagram” by Meta
- Install the app if you have not already
- Open the app and click Start setup
- Connect your Facebook account
- Select your Business Portfolio
- Choose your Meta Pixel / dataset from the dropdown
- Complete the setup wizard
Shopify’s integration automatically handles:
- Base pixel code installation on all pages
- Standard e-commerce events (ViewContent, AddToCart, InitiateCheckout, Purchase)
- Conversions API server-side tracking (this is a big advantage in 2026 given browser tracking restrictions)
Important note for Shopify users: With the Facebook & Instagram app, Shopify configures both the browser pixel AND the Conversions API simultaneously. This dual setup is considered best practice in 2026 because it provides redundancy against ad blockers, iOS restrictions, and browser cookie limitations.
Step 3C: How to Set Up Facebook Pixel Manually (Any Website)
If you are running a custom-built website or a platform without a direct integration, you can install the pixel manually by adding the code to your site’s HTML.
Get Your Pixel Base Code
- Go to Meta Events Manager
- Select your pixel under Datasets
- Click Settings
- Scroll down and click Set up Meta Pixel (or “Install Code Manually”)
- Copy the entire base code snippet
The code looks something like this:
<!-- Meta Pixel Code -->
<script>
!function(f,b,e,v,n,t,s)
{if(f.fbq)return;n=f.fbq=function(){n.callMethod?
n.callMethod.apply(n,arguments):n.queue.push(arguments)};
if(!f._fbq)f._fbq=n;n.push=n;n.loaded=!0;n.version='2.0';
n.queue=[];t=b.createElement(e);t.async=!0;
t.src=v;s=b.getElementsByTagName(e)[0];
s.parentNode.insertBefore(t,s)}(window, document,'script',
'https://connect.facebook.net/en_US/fbevents.js');
fbq('init', 'YOUR_PIXEL_ID_HERE');
fbq('track', 'PageView');
</script>
<noscript><img height="1" width="1" style="display:none"
src="https://www.facebook.com/tr?id=YOUR_PIXEL_ID_HERE&ev=PageView&noscript=1"
/></noscript>
<!-- End Meta Pixel Code -->
Install the Code on Your Website
- Open your website’s main HTML template or theme file
- Locate the <head> section
- Paste the pixel base code just before the closing </head> tag
- Make sure it appears on every page of your website (use a global header template if available)
- Save and publish your changes
Replace YOUR_PIXEL_ID_HERE with your actual Pixel ID number from Events Manager.
Step 4: Set Up Event Tracking
The base pixel code tracks PageView events automatically. But to get real value from your pixel, you need to track specific actions visitors take on your site. These are called events.
Standard Events vs. Custom Events
| Type | Description | Example |
|---|---|---|
| Standard Events | Predefined by Meta; recognized by the ad algorithm for optimization | Purchase, AddToCart, Lead, CompleteRegistration |
| Custom Events | Created by you for actions Meta does not have predefined | ButtonClick, VideoPlay, ScrollDepth |
Most Important Standard Events in 2026
Here are the standard events you should consider setting up, depending on your business type:
| Event Name | When to Use It | Code |
|---|---|---|
| PageView | Every page load (included in base code) | fbq('track', 'PageView'); |
| ViewContent | When someone views a product or key page | fbq('track', 'ViewContent'); |
| AddToCart | When a product is added to cart | fbq('track', 'AddToCart'); |
| InitiateCheckout | When the checkout process begins | fbq('track', 'InitiateCheckout'); |
| Purchase | When a transaction is completed | fbq('track', 'Purchase', {value: 25.00, currency: 'USD'}); |
| Lead | When a form is submitted | fbq('track', 'Lead'); |
| CompleteRegistration | When someone signs up for your service | fbq('track', 'CompleteRegistration'); |
How to Add Event Code to Your Site
To track a specific event, add the corresponding fbq('track', ...) call on the relevant page or when the action occurs. For example, to track purchases, add the Purchase event code to your order confirmation / thank you page:
<script>
fbq('track', 'Purchase', {
value: 49.99,
currency: 'USD'
});
</script>
Place this code after the base pixel code on the page where the event happens.
Using the Event Setup Tool (No Code Method)
If you do not want to touch code, Meta provides the Event Setup Tool:
- Go to Events Manager
- Select your pixel
- Click Settings, then scroll to Event Setup Tool and click Open
- Enter your website URL
- Your website will open in an overlay where you can point and click on buttons and pages to assign events
- Click Finish Setup when done
This is a great option for beginners or anyone who wants to avoid manual coding.
Step 5: Set Up the Conversions API (Highly Recommended in 2026)
In 2026, relying solely on the browser-based pixel is no longer enough. Ad blockers, iOS tracking restrictions, and third-party cookie deprecation have significantly reduced the amount of data the browser pixel alone can capture.
The Conversions API (CAPI) sends event data directly from your server to Meta, bypassing browser restrictions entirely. Meta strongly recommends using both the pixel and CAPI together for what they call redundant event tracking.
How to Set Up Conversions API
There are several ways to implement CAPI:
- Partner integrations: Shopify, WordPress (with compatible plugins), WooCommerce, and other platforms offer built-in CAPI support. If you used the Shopify Facebook & Instagram app, CAPI is already active.
- Conversions API Gateway: A Meta-hosted solution that simplifies server-side setup. Set it up through Events Manager under your pixel settings.
- Direct API integration: For developers who want full control. Requires sending HTTP POST requests from your server to Meta’s Graph API endpoint.
For most users, the partner integration or the Conversions API Gateway is the easiest path. If you are on WordPress with WooCommerce, plugins like the official Meta for WordPress plugin handle CAPI automatically.
Step 6: Verify Your Pixel Is Working
After installation, you absolutely need to verify that the pixel is firing correctly. A broken pixel means wasted ad spend and no tracking data.
Method 1: Meta Pixel Helper (Chrome Extension)
This is the fastest and easiest way to test:
- Install the Meta Pixel Helper extension from the Chrome Web Store
- Navigate to your website
- Click the Pixel Helper icon in your browser toolbar
- It will show you:
- Whether a pixel was found on the page
- Your Pixel ID
- Which events are firing (PageView, Purchase, etc.)
- Any errors or warnings
A green checkmark means everything is working. A yellow or red icon indicates issues that need to be fixed.
Method 2: Test Events in Events Manager
- Go to Events Manager
- Select your pixel
- Click the Test Events tab
- Enter your website URL and click Open Website
- Browse your site and perform actions (add to cart, fill out a form, etc.)
- Go back to Events Manager and check if the events appear in real time
This tool shows you events as they are received by Meta, which is incredibly useful for debugging.
Method 3: Check the Diagnostics Tab
In Events Manager, under your pixel, click the Diagnostics tab. Meta will flag any issues it detects, such as:
- Duplicate pixels on the same page
- Events with missing required parameters
- Inactive or slow-firing pixels
- Deduplication problems between browser pixel and CAPI events
Step 7: Configure Aggregated Event Measurement
Due to privacy changes (especially Apple’s App Tracking Transparency), Meta limits the number of conversion events you can optimize for per domain. This system is called Aggregated Event Measurement.
Here is what you need to do:
- Go to Events Manager
- Click Aggregated Event Measurement in the left menu
- Click Configure Web Events
- Select your domain
- Choose up to 8 events to prioritize, ranked from highest to lowest priority
Tip: Put your most valuable conversion event (like Purchase) at the top of the priority list. Meta will only report the highest-priority event per user in many cases.
Common Facebook Pixel Issues and How to Fix Them
| Problem | Likely Cause | Solution |
|---|---|---|
| Pixel not detected by Pixel Helper | Code not placed in the <head> section, or caching issue | Clear your site cache, check code placement, verify the Pixel ID |
| Pixel fires twice on the same page | Duplicate pixel code (e.g., plugin and manual code both active) | Remove one instance; use only one installation method |
| No data appearing in Events Manager | Wrong Pixel ID, code error, or ad blocker during testing | Double-check Pixel ID, test in incognito mode with extensions disabled |
| Events not matching ad optimizations | Aggregated Event Measurement not configured | Configure your priority events in Events Manager |
| Duplicate events between Pixel and CAPI | Missing event deduplication | Use the same event_id parameter in both browser and server events |
Best Practices for Facebook Pixel in 2026
To get the most out of your pixel setup, keep these tips in mind:
- Always use both the browser pixel and Conversions API together. This is no longer optional if you want accurate tracking.
- Verify your domain in Meta Business Portfolio settings. Domain verification is required for Aggregated Event Measurement to work.
- Prioritize your events carefully. You only get 8 prioritized events per domain.
- Use the event_id parameter for deduplication when sending events through both the pixel and CAPI.
- Check your Diagnostics tab regularly. Meta updates its diagnostics and may flag new issues over time.
- Let the pixel collect data before running ads. Install your pixel early so it can build audience data even before you start your first campaign.
- Stay compliant with privacy regulations. Make sure your website has a cookie consent banner and that your pixel respects user consent choices, especially if you serve visitors in the EU (GDPR) or California (CCPA).
Quick Recap: Full Setup Checklist
Here is your complete checklist to set up Facebook Pixel in 2026:
- Create a Meta Business Portfolio (if you do not have one)
- Go to Events Manager and create a new pixel
- Install the pixel base code via partner integration (WordPress/Shopify), manual code, or Google Tag Manager
- Set up event tracking for your key conversion actions
- Enable the Conversions API for server-side tracking
- Verify your domain in Business Portfolio settings
- Configure Aggregated Event Measurement with your top 8 events
- Test with Meta Pixel Helper and the Test Events tool
- Check the Diagnostics tab for any errors
- Ensure cookie consent compliance
Frequently Asked Questions
How do I create a Facebook Pixel?
Go to Meta Events Manager, click Connect Data, select Web, name your pixel, and click Create Pixel. You will then receive your unique Pixel ID and base code to install on your website.
Is Facebook Pixel free to use?
Yes. There is no cost to create or use the Meta Pixel. You only pay when you run Facebook or Instagram ads.
What is Facebook Pixel called now?
It is officially called the Meta Pixel since the Facebook-to-Meta rebrand. You may also see it referred to as a “dataset” in Events Manager. The functionality is the same.
Can I use the Facebook Pixel without running ads?
Absolutely. You can install the pixel and let it collect visitor data before you spend a single dollar on ads. This way, when you are ready to advertise, you will already have audiences built for retargeting.
How do I find my Facebook Pixel ID?
Go to Events Manager, click Datasets in the left menu, and select your pixel. Your Pixel ID (a number) is displayed directly under your pixel name. You can also find it in your pixel’s Settings tab.
How do I know if my Facebook Pixel is working?
Use the Meta Pixel Helper Chrome extension. Visit your website with the extension enabled, and it will tell you if the pixel is detected and which events are firing. You can also use the Test Events tool in Events Manager for real-time verification.
Do I need the Conversions API in 2026?
Meta strongly recommends it, and in practice, it is essential for accurate conversion tracking. Browser-based tracking alone misses a significant portion of conversions due to ad blockers, iOS restrictions, and cookie limitations.
Can I install the Meta Pixel on multiple websites?
Yes. You can create multiple pixels in your Business Portfolio, one for each website. It is best practice to use a separate pixel for each distinct website or business.
That covers everything you need to know about how to set up Facebook Pixel in 2026. If you follow this guide from start to finish, you will have a fully functional, well-configured Meta Pixel that gives your ad campaigns the tracking data they need to succeed.
Got questions or running into issues? Drop a comment below and we will help you troubleshoot.
