Home › Guides › Meta Pixel setup
Meta Pixel setup: a step-by-step guide for lead-generation websites
Meta Pixel setup is two jobs: create the Pixel in Events Manager and put its base code in the head of every page, then add the events you care about. On a lead-generation site, fire Lead on the thank-you page, not on the submit button, test it with the test events tool, then add the Conversions API.
Most UAE lead-gen accounts I audit already have a Meta Pixel. Far fewer have one that tells Meta the truth. Lead fires when someone clicks submit, whether the form went through or not. A WhatsApp tap counts as a lead. The theme and a plugin each add their own copy of the Pixel.
This guide covers Meta Pixel setup for websites that sell through enquiries: property brokers, clinics, business setup firms and other service businesses. Each step follows Meta's current help pages and flags where lead-gen sites go wrong.
What the Meta Pixel does, and what it does not
The Meta Pixel is code on your website that records what visitors do, so you can measure your Meta ads and optimise them for the actions you care about (Set up and install the Meta Pixel, Meta). Meta uses those events to report results, build audiences and decide who sees your ads next.
- It runs in the browser. Network issues and pages that fail to load can stop an event reaching Meta. So Meta recommends the Conversions API alongside it, sending the same events.
- It sees the website, not the sale. The Pixel knows a form was sent, not whether the person answered the phone or paid. That needs CRM data, covered in Meta Conversions API setup.
The Pixel is the first layer, not the whole job. If you are not sure what your account measures today, fix your ad tracking first.
Step 1: create the Pixel in Events Manager
Check your existing data sources first: Meta says one Pixel can cover a whole website. Then, in Events Manager, click Connect data, select Web, click Connect, name the Pixel and click Create pixel (Meta's set-up steps). Three choices follow:
- Partner check. Enter your website URL and click Check. If your platform has a partner integration, Meta walks you through it.
- Get guidance or Do it yourself. Meta recommends Get guidance, which gives recommendations on screen.
- Pixel only, or Pixel plus Conversions API. The combined option offers a partner integration, the Meta-enabled web-only Conversions API or a manual set-up. Pixel only offers Install code manually, Check for partner, or Email instructions to a developer.
Use a partner integration if your platform has one. For a custom-built site, I choose Meta Pixel only, install it by hand or with Google Tag Manager, and add the Conversions API next. A clean Pixel this week beats a half-finished server set-up next month.
Step 2: install the base code on every page
Put the base code inside the <head> of every page you track: Meta lists base code outside the head as a common error that can lead to missed tracking (Meta Ads Data Advisor, Meta for Developers).
- Leave PageView alone. The base code fires PageView on every page load, and Meta recommends leaving that call intact.
- Install it once. Duplicate Pixel code is the first error on Meta's list. The usual cause I find is a plugin plus a hard-coded snippet.
- With Google Tag Manager, use one base code tag that fires on all pages.
- Skip the image-only version. Meta does not recommend an <img> install, and automatic advanced matching may not work with it.
Then switch on automatic advanced matching, a toggle in Events Manager that needs no code. It reads form fields such as name and email and hashes them in the visitor's browser, so Meta can match more conversions to people.
Step 3: set up the events that matter for leads
Use Meta's standard events where one fits, because Meta recognises them across its ad products; for a lead-gen site that mostly means Lead, Contact and Schedule (Meta Pixel reference, Meta for Developers).
| Visitor action | Standard event | Where it fires |
|---|---|---|
| Submits an enquiry form | Lead | Thank-you page or confirmed submission, never the button |
| Taps WhatsApp, call or email | Contact | The click on that link |
| Books a consultation or visit | Schedule | Booking confirmation |
| Applies for a service | SubmitApplication | Application confirmation |
| Views a key project or treatment page | ViewContent | That page loading |
The thank-you page rule is Meta's own example. A purchase event on a Buy now button fires on every click, whether the purchase went through or not; on the thank-you page it fires only when it succeeded (About the event setup tool for web, Meta). Lead forms work the same way: on the button, failed validations and double clicks count as leads.
- Names are case sensitive. 'viewcontent' instead of 'ViewContent' creates a custom event, not the standard one. The same goes for 'lead'.
- One conversion event per page, unless a further event comes from a user action such as a click.
- Events load after the base code.
Events can go in code, through a partner integration, or through Meta's event setup tool, which attaches them to buttons or page URLs without code; with the tool, put Lead on the thank-you page URL.
I track a WhatsApp tap as Contact and keep Lead for forms: a tap starts a conversation, not a finished enquiry, and keeping them apart lets you choose which to optimise for (see Click-to-WhatsApp ads vs Instant Forms).
What I see in UAE accounts. The common fault is not a missing Pixel but Lead on the submit button, or on a page that loads before the form is checked, so Ads Manager reports more leads than the CRM receives. Moving Lead to the thank-you page costs nothing and changes what the campaign learns from.
Step 4: review the events Meta adds for you
Since 3 August 2026, setting up a new Pixel through Meta Ads Data Advisor, the free Chrome and Edge extension formerly called Meta Pixel Helper, pre-selects the option to detect and add standard events automatically (Meta for Developers).
Left on, it suggests events from activity on your site and, by default, may add conversion events it thinks are missing, such as Lead. Untick it during set-up, or later review events or turn it off in Events Manager under Settings, then Track events automatically without code.
Meta's separate automatic events are deduplicated from your own, and Meta recommends keeping them on. My rule: never optimise for a Lead event until you have checked where it fires. The event setup tool suggests events from button text, and a Lead on a button has the same flaw whoever put it there.
Step 5: test before you spend
Test every event before a campaign optimises for it: in Events Manager, open Data sources, select the Pixel, click Test events, enter your URL and click Open website (Test events tool, Meta).
- Keep the test page open. Website activity is recorded only while it is open.
- Send a real test enquiry. Lead should appear once, from the thank-you page URL.
- Warn your sales team. Clearing the test view does not delete the events; Meta says they still show in Events Manager, Ads Reporting and audiences. I mark test leads in the CRM.
- Do not wait on reports. Meta says data may take 30 minutes or more to appear in analytics.
For a quick check on any page, use Data Advisor. Disable your ad blocker for the site and it lists the Pixels found and each event's status, including errors such as duplicate events.
Step 6: lock the Pixel to your own domains
Add your domains to an allow list under traffic permissions in Events Manager, because your Pixel ID is public and anyone can put it on their own site (About Meta Pixel traffic permissions, Meta).
- Allow list or block list, not both. Meta suggests the allow list, which blocks every domain you have not added. Adding example.com also covers m.example.com.
- Allow the tools you use. Partner integrations and iframes can make events arrive from another domain, so allow both.
- Watch for alerts. When a new domain sends events, Meta emails one person with full control and flags it in Diagnostics.
Events from a copied Pixel or an old test site are leads you did not earn, and the campaign learns from them. I set the allow list on day one.
Clinics and finance firms: check your data category
Meta assigns categories to websites that send it data, and some, including health and wellness and financial services, may come with data sharing restrictions. For a clinic, lender or insurance broker:
- Advanced matching. The automatic version may be unavailable in restricted verticals; Meta's examples include banking, lending, financial services, insurance, pharmaceuticals and health. Manual advanced matching is the alternative.
- Custom conversions. Since 2 September 2025, custom conversions that suggest restricted information, such as a health condition, are flagged and blocked from new campaigns. I name conversions after the step ("consultation booked"), never the treatment.
- Reviews. If Meta's category looks wrong, ask for a review in Events Manager.
More detail in Meta's health data rules for clinics.
The Meta Pixel setup order I use
- Audit: find every Pixel on the site and its owner; remove duplicates. List each lead action (form, WhatsApp, call, booking) and the page or click that confirms it.
- Own it: keep the Pixel in the business's own business portfolio and give the agency access, so it and its history stay with the business.
- Base code once in the head of every page, with automatic advanced matching where available.
- Events: Lead on the thank-you page, Contact on WhatsApp and call taps, Schedule on bookings.
- Review auto-detected events and turn off any in the wrong place.
- Test a real submission and mark it in the CRM.
- Allow list your domains.
- Add the Conversions API with the same events and a shared event ID so Meta can deduplicate: Meta Conversions API setup.
Frequently asked questions
Is the Facebook pixel the same as the Meta Pixel?+
Do I still need the Meta Pixel if I use the Conversions API?+
Where should the Lead event fire on a lead-generation website?+
What happened to Meta Pixel Helper?+
Related
Not sure what your Pixel is really counting?
Apply for a free strategy call. We'll check where your Lead event fires, what Meta is optimising for, and how much of it reaches your CRM.