How to Create and Set Up Your Meta (Facebook) Pixel
Meta ads are a goldmine for businesses. With an average Facebook conversion rate of 9.21% across industries, the opportunity is clearly there.
Yet many advertisers never get close to that benchmark; not because their ads are bad, but because their tracking setup is poor.Â
By installing the Meta Pixel, you can track real user actions like page views, form submissions, purchases, and sign-ups, and use that data to optimize ad delivery and improve conversion tracking.Â
The problem? If youâve tried following Metaâs own Help Center guides, youâve probably noticed how outdated and confusing theyâve become. Between old screenshots and renamed menus, itâs too easy to get stuck. đľđŤ
This beginner-friendly guide will show you how to set up a Meta Pixel from start to finish without relying on documentation that no longer matches the interface.
Prefer a video? đ
TL;DR: Which Meta Pixel setup should you use?
Meta offers a few different ways to connect your website to your Meta Pixel.
đ Using Shopify or WordPress? Use partner integration (most businesses)
đ Using a custom website or Webflow? Use manual setup
đ Managing multiple accounts or need advanced tracking? Consider the Conversions API Gateway
What is a Meta Pixel?Â
A Meta Pixel (formerly known as the Facebook Pixel) is a small piece of JavaScript code you add to your website or app to track how people interact with your pages after seeing or clicking your Meta ads.
Once installed, the Meta Pixel collects data about visitor behavior, such as page views, purchases, form submissions, and add-to-cart actions, and sends that information back to Meta. This data helps you understand which ads drive results and how users move through your site.
Here's an example of a Meta Pixel base code:
![]()
The Meta Pixel combines everything into a single base code that works across Facebook and Instagram.
How does the Meta Pixel work?
After the Meta Pixel is installed on your website, it starts tracking events. These are specific actions visitors take on your site. For example:
1. A user sees or clicks your ad
Someone views or clicks a Facebook or Instagram ad and lands on your website.
2. The Pixel tracks actions on your site
The Meta Pixel collects data when a visitor takes a specific action on your website. These actions are called events, and they show how people interact with your site.
Meta groups events into two main categories:
- Standard events
Standard events are predefined by Meta and cover the most common user actions, such as when someone:
- Views a page
- Adds a product to their cart
- Starts a trial
- Completes a purchase
- Books an appointment
- Contacts you through your website
- Signs up for an account or newsletter
These are the most commonly used events and are the easiest to set up.
- Custom events
Custom events let you track actions that donât fit into Metaâs standard event list. You can define your own events to capture interactions that are specific to your website.
đExample: Track only demo requests from visitors who reached your pricing page.
Learn more about tracking events here.Â
3. Data appears in Events Manager
All tracked activity is recorded in Meta Events Manager, where you can see:
- Which events are firing
- How often they occur
- Whether theyâre working correctly
4. You use that data in Ads Manager
In Ads Manager, you can use Pixel data to:
- Measure ad performance
See which ads lead to real actions on your website; not just clicks, but outcomes like purchases, sign-ups, or form submissions. - Optimize campaigns for specific actions
Tell Meta to prioritize people most likely to complete a goal you care about, such as making a purchase or submitting a lead form. - Build Custom Audiences based on site activity
Create audiences from people who visited specific pages, viewed products, or completed (or didnât complete) key actions. - Create Lookalike Audiences from high-intent visitors
Reach new people who behave similarly to your best customers, using data from purchases, leads, or high-value site visitors. - Run remarketing ads to people who didnât convert the first time
Re-engage users who visited your site but didnât convert, such as cart abandoners or visitors who viewed key pages and left (tip: pair this with a Meta product catalogue, which allows Meta to show users the exact products they interacted with).
đ Related: How to Create and Share Facebook Custom Audiences & Lookalike Audiences
How to create and install a Meta Pixel
There are a few parts to setting up the Meta Pixel, but weâll guide you through the process with screenshots and tips.
â Important: Metaâs Business Tools terms require that you only place your Meta Pixel on websites you own or have written permission to use. Installing your Pixel on third-party sites without authorization is not allowed.
âď¸ Before creating and installing your Meta Pixel, make sure you have the following in place:
-
A live website
The Meta Pixel can only track activity on a working website (not a local or staging site). -
Access to your Meta Events Manager
Youâll need permission to create and manage data sources in Events Manager. -
The ability to update your website
This could be one of each:- Admin access to WordPress, Shopify, or another supported platform
- Access to your siteâs header code or Google Tag Manager
- A developer who can add code for you, if needed
Here's how to create a Meta Pixel for your website:
Step 1. Go to Meta Events Manager @ https://eventsmanager.facebook.com/events_manager2/overview.
Step 2. In the top left, click âConnect data.â
![]()
Step 3. Since we're setting this up for a website, select âWeb,â then click âNext.â
![]()
Step 4. Click âCreate new dataset,â then click âNext.â
![]()
â Why am I creating a dataset instead of a Pixel? Donât worry, this is not a typo. Meta now groups Pixels under something called Datasets. A dataset is simply a container that holds your Pixel data (browser events) and, if you use it, server-side data from the Conversions API.
Youâre still creating a Meta Pixel; Meta just manages it inside a dataset now. Functionally, nothing changes for tracking or ads.
Step 5. Now, you'll be asked to name your new dataset.
![]()
Click âCreateâ when ready.
Step 6. Choose how to connect your website.Â
You may see one option marked as Recommended. This is based on Metaâs tracking preferences and your account details, but it doesnât mean the other options are incomplete or incorrect.
There are three main setup paths to choose from:
![]()
- Set up with Conversions API Gateway
Send website and conversion data directly from your server or platform to Meta (not just the browser).Â
It can improve tracking reliability and measurement, especially as browser privacy restrictions increase. However, it involves more setup and isnât required to get your Meta Pixel up and running.Â
Best suited for: advanced tracking needs or for businesses/agencies managing multiple accounts, since a single Gateway configuration can be reused across them.
- Set up with partner integration
Connects your website using a platform you already use, such as Shopify or WordPress. This is a mostly no-code setup that installs the Meta Pixel, sets up standard events, and often automatically enables the Conversions API at no extra cost.Â
Best suited for: most businesses using supported platforms, especially eCommerce stores.
- Set up manually
Requires building a direct integration with the Conversions API using code. This option offers the most control over what data is sent and when, but it typically requires a developer.Â
Best suited for: custom websites, unsupported platforms, or businesses with specific tracking requirements beyond standard events.
âď¸ To make this easier to follow, weâll briefly explain what happens in each option:
Option A: Set up with Conversions API Gateway
If you select the first path, Meta will walk you through an additional setup flow focused on server-side tracking.
Hereâs what to expect next:
1. Youâll be asked to choose how the Gateway is hosted:
![]()
This involves picking between:
- A partner-hosted option (where a Meta partner hosts the Gateway for you), or
- A self-hosted option (using your own cloud provider, such as AWS or Google Cloud).
2. Youâll then follow a guided setup to connect the Gateway to your dataset. This includes generating credentials and linking the Gateway so Meta can receive events directly from your server, alongside browser-based Pixel events.
Because this setup involves infrastructure, cloud accounts, and server configuration, itâs typically handled by a developer or technical team.Â
For most businesses, this step is optional - your Meta Pixel will still work correctly without it.
Option B: Set up with partner integration
If you choose the partner integration path, youâll need to select the platform your website is built on (for example, WordPress or Shopify) and follow the on-screen setup steps provided by Meta and the platform.
In the sections below, weâll walk you through Shopify and WordPress.
Shopify
Once you select Shopify as your partner integration in Meta Events Manager, the setup shifts from Meta to Shopify. From here on, the two platforms work together to complete the connection.
Step 1. Click the âGo to Shopifyâ button.
![]()
Step 2. If the Facebook & Instagram app isnât already installed on your store, Shopify will prompt you to install it.
![]()
Step 3. Next, Shopify will ask you to connect your Facebook account.
![]()
This step allows Shopify to:
- Access your Meta Business Portfolio
- Identify your ad account
- Link your Shopify store to the Meta dataset you created earlier
Click âConnect accountâ and follow the prompts.
Step 4. After you connect your Facebook account, Shopify will submit the connection for review. This is a standard verification step and usually doesnât require any action on your part.
Once the review is approved, Shopify automatically links your store to the Meta dataset (Pixel).
From this point on:
- You donât need to paste any code manually
- Shopify controls how events are sent
- Standard eCommerce events are enabled by default
Step 5. Once the connection is approved and your store is set up, you can change how customer data is shared with Meta. No need to reinstall your Pixel.
You can choose between Standard, Enhanced, or Maximum at any time from Shopifyâs Facebook & Instagram settings.
Learn more about Meta's data-sharing settings here.
WordPress
Once you select WordPress from the list of partner integrations, Meta will show installation instructions on screen, but some of these are outdated.
Instead, follow the steps below to install the official WordPress plugin directly. đ
Step 1. Open a new tab or window in your browser and log in to your WordPress admin panel. Then, click on âPluginsâ in the left navigation menu, followed by âAdd Plugin.â
Step 2. Search for the official Meta Pixel for WordPress plugin by Facebook and click âInstall now.â
![]()
Step 3. Once the plugin finishes installing, click âActivate.â Youâll be redirected to your plugins list.
Step 4. Find Meta Pixel for WordPress in your plugins list and click âSettingsâ underneath it.
![]()
Step 5. Click âGet Startedâ and log in with your Facebook account in the pop-up.Â
Follow the instructions on screen to connect your Business Portfolio, Facebook Page, Meta Ad account, and the Meta Dataset that contains your Pixel.Â
đ Related: How to create a Meta Business Portfolio. Also see: How to create a Facebook Ad Account.
Step 7. On the summary screen, review the business assets youâre about to connect to WordPress.
Before continuing, toggle on âAutomatic advanced matching.â This helps Meta better understand who completed actions on your website by sending hashed customer information (such as email addresses from forms) along with Pixel events.
This can help you:
- Attribute more conversions to your ads
- Build larger and more accurate Custom Audiences
- Improve conversion optimisation and reduce cost per conversion
Step 8. Review the permissions one final time and click âContinue.â It may take a few minutes for Meta to link your assets to WordPress.Â
Step 9. Once complete, click âDoneâ to return to your WordPress dashboard.
Your Meta Pixel is now installed and ready to track events! đĽł
![]()
Option C: Set up manually
If you choose manual setup, Meta will show you two installation options.
![]()
1ď¸âŁ The first option is more advanced and gives you separate instructions for setting up the Meta Pixel (browser-based tracking) and the Conversions API (server-side tracking). It offers the most control, but developer support is required.Â
2ď¸âŁ The second option is a simpler path and focuses on installing the Meta Pixel base code on your website without server-side tracking. Itâs ideal if youâre working with a custom or unsupported CMS and you want to add the Pixel using HTML or a tag manager.
The steps below follow this Meta Pixel only setup.
Step 1. In a new tab or browser window, open your websiteâs CMS (for example, WordPress, Webflow, or a custom site) and log in.
Make sure you have admin access and can edit your siteâs HTML or header code.
Step 2. Copy the Meta Pixel base code shown in Events Manager.
![]()
Paste it into the <head> section of your website, just before the closing </head> tag.
đĄ Pro tip:  If your site uses a global header (most CMS platforms do), adding the code once is enough. If not, make sure the code is added to every page you want tracked.
Once done, return to Events Manager and click âContinue.â
Step 3. We suggest enabling Automatic Advanced Matching, but this depends on your business needs and other privacy considerations.
![]()
This allows Meta to send hashed customer information (such as email addresses from forms) along with Pixel events, which can:
- Improve conversion attribution
- Build more accurate Custom Audiences
- Help optimise ads more efficiently
Click âContinueâ when ready.
Step 4. You'll now be prompted to set up standard events, which are actions people take on your site, such as purchases or form submissions.
Click âOpen Event Setup Tool.â
![]()
đĄPro tip: This is the easiest way to set up events because it doesnât require any coding.
Step 6: In the pop-up, type in your website URL, and it will detect if a Pixel is installed. Review each suggested event, then click âConfirm.â
Step 7. For each event, you can add parameters such as value or content type to make your tracking more detailed.
Once finished, your Meta Pixel will start tracking events on your website. đ
đ How to test if your Meta Pixel is working
After installing your Meta Pixel, itâs important to verify that itâs tracking events correctly before launching ads.Â
The steps below help you confirm that your Pixel is active and no setup issues are blocking your data:Â
Check your Pixel status in Events Manager
Go to Meta Events Manager (https://eventsmanager.facebook.com/events_manager2/overview) and select your dataset (Pixel). If your Pixel is working, its status should show as Active.
You should also be able to see recent activity, such as PageView events.
đĄ Donât worry if you donât see any events yet. Thatâs normal if no one has visited your site since installation.
Use the Test Events tool
The Test Events tool is the quickest way to confirm your setup.
- In Events Manager, open your dataset
- Click âTest eventsâ
- Enter your website URL under Confirm that your website's events are set up correctly and click âTest events.â
![]()
4. Perform actions on your site (visit pages, submit forms, add items to cart)
As you interact with your site, events should appear in the Test Events panel almost immediately. You may have an issue if:
- No events appear â the Pixel base code isnât installed or isnât loading correctly
- Only PageView appears â additional events havenât been set up or arenât firing
- Events show under unexpected names â event names may be misspelled or incorrectly capitalised
- Events fire multiple times â duplicate tracking is likely enabled
- Events are missing values â event parameters (like value or currency) arenât configured properly
If events fire once, under the correct names, and only when expected, your Pixel setup is working correctly.
Use the Meta Pixel Helper (Chrome extension)
The Meta Pixel Helper is a free Chrome extension that helps you quickly check whether your Meta Pixel is installed correctly and firing events as expected.
Use it to:
â Confirm that a Meta Pixel is installed on a page
â See which events fire when you load or interact with the page
â Spot common setup issues, such as duplicate pixels or incorrect event names
If you see errors or warnings, the Pixel Helper will usually suggest what needs fixing (for example, missing parameters or duplicate events).
đĄNote: The Pixel Helper is best for checking page-based events. For button clicks, form submissions, or custom conversions, the Test Events tool in Events Manager is more reliable.
đ ď¸ Troubleshooting tips for Meta Pixel setup
Setting up the Meta Pixel involves multiple steps, and itâs common to run into warnings or errors, especially right after installation. The good news is that most issues are easy to fix once you know what to look for.
âď¸ Before you start: If you see any warnings or errors, open Diagnostics for your Pixel. This is where Meta flags setup issues and explains what needs attention and ways to improve.
![]()
âA Pixel wasnât detected on this websiteâ
![]()
This message usually appears when youâre setting up events or testing your site URL.
In most cases, it doesnât mean anything is broken. It often shows up because:
â The Pixel was just installed and hasnât been detected yet
â The URL entered doesnât match where the Pixel is installed
â The base code isnât loading correctly
If youâve just finished setup, wait 30-60 minutes and try again. If the message persists, double-check that the Pixel base code is live on your site.
Currency and value warnings
Currency-related warnings are some of the most common issues advertisers see.
These usually happen when:
â The currency code isnât using the standard three-letter format (like USD or EUR)
â The value parameter is missing or incorrectly formatted
â Currency or value differs between the Meta Pixel and the Conversions API
While these warnings donât always stop events from firing, they can affect reporting accuracy and return-on-ad-spend calculations. Itâs worth fixing them early if youâre running conversion-focused campaigns.
Duplicate or repeated events
Duplicate events mean the same action is being tracked more than once.
This often happens when:
â The Pixel is installed manually and via a plugin at the same time
â Automatic events are enabled on top of custom event code
â Purchase events are placed outside the thank-you or confirmation page
In a clean setup, most actions should trigger one event per action. Multiple events for a single click or page load can inflate results and confuse optimisation.
Event name mismatches
Meta is very strict about event names.
Standard events are case sensitive, so something as small as using purchase instead of Purchase can cause Meta to treat it as a custom event. When this happens, conversion tracking and optimisation wonât work as expected.
If Diagnostics flags an event name mismatch, check spelling and capitalisation first.
Advanced matching and data restrictions
If youâve enabled Advanced Matching, you may occasionally see warnings about invalid or restricted data.
This usually means:
â Customer information (like email addresses) isnât being passed correctly
â Certain parameters violate Metaâs data policies
When this happens, Meta may block specific parameters or limit how the data is used.Â
Review what information youâre sending and make sure it aligns with Metaâs Business Tools Terms and your privacy policy.
Confirm your base code and event setup (manual installs only)
If you installed the Pixel manually using code, take a moment to double-check the setup:
-
Make sure the Pixel base code matches exactly whatâs shown in Events Manager
Even small changes or missing lines can prevent the Pixel from loading or sending events correctly. -
Check that the code sits inside the <script></script> tags
These tags tell the browser to run the Pixel as JavaScript. If theyâre missing or broken, the Pixel wonât work. -
Confirm the Pixel is placed inside the <head> section of your site
Placing the code too low on the page can cause missed events, especially if users leave before the page fully loads.
If you installed the Pixel using a tag manager (such as Google Tag Manager), review the setup there instead. In that case, the Pixel code wonât appear directly in your siteâs page source.
Trusted by 233,000+ businesses that have securely shared access to more than 615,000 accounts, Leadsie is used by more than 1,500 agencies and brands worldwide.
đŹ "I never want to do onboarding without Leadsie!" - Alyssa, Meta Ads Manager
đ Start your free 14-day trial todayâno credit card required.
P.S. It's risk-free, and you get to keep your account connections after the trial ends. đ
Want to learn more? Explore our Frequently Asked Questions on this topic.
Get Facebook Access Today with Leadsie
Clients struggling to share access to their Facebook accounts? Get the access you need in minutes with a free trial of Leadsie.
By submitting you agree we can use the information provided in accordance with our privacy policy and terms of service. You can unsubscribe any time.
- Approved by Meta, Google & TikTok
- Keep access to accounts if you cancel
- Secure & 100% GDPR compliant
Frequently Asked Questions
Do I need a Business Portfolio to create a Meta Pixel?
No. You can create a Pixel from a personal profile, but Meta strongly recommends using a Business Portfolio so you can assign roles, share access with agencies, and connect multiple assets (Pixel, Ad Account, Page) without running into permission issues later.
đ Related:Â How to create a Meta Business Account & Portfolio
Where should I install the Meta Pixel on my website?
The base Pixel code must be placed inside the <head> section of every page you want to track. If your website uses a global header template, adding it once is enough. Otherwise, youâll need to paste it manually across all relevant pages, or use a partner integration like WordPress, Shopify, or GTM.
How long does it take for the Pixel to start collecting data?
Most Pixels begin tracking within 15-30 minutes, but it can take up to 72 hours for some events to appear in Events Manager, especially if the Pixel was just installed or if caching is enabled on your website.
Do I need both the Meta Pixel and the Conversions API?
Ideally, yes. The Pixel tracks browser events, while the Conversions API tracks server events. Using both gives you better data accuracy, particularly with privacy tools like ad blockers, iOS restrictions, and cookie limitations. Most partner integrations automatically support both.
Why isnât my Meta Pixel firing or showing activity?
Common reasons include:
- The Pixel code was added in the wrong place
- Your website caches old code
- A browser plugin (like ad blockers) is blocking it
- You installed the plugin but didnât finish connecting your Meta assets
- Youâre testing the wrong domain
To confirm the issue, go to Event Manager and and select Data Sources > choose your Pixel > Test Events.
![Facebook Datasets (formerly Pixels): How to Install, Set Up & Use Meta Datasets for Ads [2026]](https://img.youtube.com/vi/R7VNtIu4v98/hqdefault.jpg)
