Blogs / How to set up the Facebook Pixel
How to set up the Facebook Pixel
Introduction
Quick answer: To set up the Facebook (Meta) Pixel, open Events Manager in your Meta Business account, create a Pixel under Connect data sources, install its base code on every page of your website (directly, with a plugin or with Google Tag Manager), add standard events such as ViewContent, Lead or Purchase, then verify with the Meta Pixel Helper and the Test Events tool.
By Mizanur Rahman, digital marketer. Updated 31 October 2026.
What is the Meta Pixel?
The Meta Pixel is a snippet of JavaScript that records what visitors do on your website and sends it to Meta. It lets you measure conversions, build retargeting audiences and give the ad system data to find more likely buyers. Meta also recommends adding the Conversions API alongside it for more reliable measurement.
Before you start
- A Meta Business portfolio and an ad account.
- Admin access to your website, theme or tag manager.
- A list of the actions you want to track: leads, purchases, bookings.
Step 1: Create the Pixel
- Open Events Manager from your Meta Business tools.
- Choose Connect data sources, then Web.
- Select Meta Pixel, name it and enter your website URL.
- Choose how to install: a partner integration, manual code, or Conversions API setup.
Step 2: Install the base code
| Method | Best for | Notes |
|---|---|---|
| Partner integration (Shopify, WooCommerce, Wix and others) | Online stores | Fastest, includes standard ecommerce events |
| WordPress plugin or theme field | WordPress sites | Use one method only to avoid duplicates |
| Google Tag Manager | Sites with many tags | Add a Custom HTML tag or the Facebook Pixel template, fire on all pages |
| Manual code in the head | Custom sites | Paste the base code between the head tags on every page |
Install through only one method. Two installs fire the same event twice and inflate your numbers.
Step 3: Add standard events
The base code records PageView. Add events for the actions that matter:
- ViewContent: product or service page viewed.
- AddToCart and InitiateCheckout: shopping steps.
- Purchase: include value and currency.
- Lead: form submitted or call booked.
- CompleteRegistration: account created.
Fire conversion events on the confirmation or thank-you step, not on the button click, so you only count completed actions.
Step 4: Verify it works
- Install the Meta Pixel Helper browser extension and visit your pages. It should show the Pixel and events without errors.
- In Events Manager, open Test Events, enter your site URL and perform the action. The event should appear within moments.
- Check that purchase events carry the correct value and currency.
- Confirm each action is counted once.
Step 5: Complete the supporting setup
- Verify your domain in Business settings.
- Set up the Conversions API for server-side events and deduplication. See the Meta CAPI guide.
- Review consent requirements for your visitors’ regions, and respect cookie consent settings.
Common mistakes
- Installing the Pixel twice.
- Firing Lead or Purchase on page load of the wrong page.
- Missing value and currency on purchases.
- Blocking the Pixel through consent banners without a plan for events after consent.
Frequently asked questions
Do I still need the Pixel if I use Conversions API?
Meta recommends using both, with matching event names and event IDs so duplicates are removed. The Pixel captures browser signals, and the Conversions API sends server-side signals.
How do I know the Pixel is working?
Use the Meta Pixel Helper extension and the Test Events tab in Events Manager. Both show whether events fire and with which parameters.
Why are my Pixel events not showing in Ads Manager?
Common reasons are a wrong Pixel ID, a script blocked by consent settings or ad blockers, events firing on the wrong page, or reporting delay. Check Test Events first.
About the author: Mizanur Rahman is a digital marketer based in Dhaka, Bangladesh, who runs Facebook, Google and TikTok ad campaigns and conversion tracking for SaaS and tech businesses. Get in touch if you want help with your own campaigns.
Key points
- Write the first key point here.
- Write the second key point here.
- Write the third key point here.
Conclusion
Write the conclusion of this blog post here.
© 2026 Mizanur Rahman. All rights reserved.