How to Track a Meta Pixel Lead Event with Google Tag Manager (Thank-You Page)
To track leads from Meta ads with Google Tag Manager, you fire the Meta Pixel Lead event when someone reaches your thank-you page after submitting a form. In GTM that is one Custom HTML tag with the Lead code, and one trigger on the thank-you page URL. It takes about 10 minutes when the base pixel is already installed.
Once Meta receives Lead events, you can optimise your campaigns for leads instead of clicks, and see your real cost per lead in Ads Manager. This guide walks through the setup, how to test it, and the mistakes that make lead numbers wrong.
Quick steps: Meta Pixel Lead event in GTM
- Check that GTM and the Meta base pixel are already on the site.
- Find the exact thank-you page URL your form redirects to.
- In GTM, create a Custom HTML tag with
fbq('track', 'Lead');. - Add a trigger: Page View, where Page URL contains your thank-you path.
- Make the base pixel fire before the Lead tag (tag sequencing).
- Test in GTM Preview and Meta's Test Events.
- Submit and publish the container.
What do you need before you start?
- Google Tag Manager installed on the website.
- The Meta Pixel base code firing on all pages, through GTM or another method.
- A form that sends people to a separate thank-you page after a successful submission.
- Access to Meta Events Manager for the pixel.
How to check GTM and the pixel are installed
Install two free Chrome extensions:
- Tag Assistant (Google): open your site, and it shows whether the GTM container loads.
- Meta Pixel Helper: it shows whether a Meta pixel is on the page and which events it sends.
On a normal page, Pixel Helper should show your pixel with a PageView event. If there is no pixel at all, add the base code first (next section). If you see two pixels or PageView twice, the pixel is installed in two places, for example through GTM and a WordPress plugin. Remove one before going further, or every lead will count twice.
Where to find the Meta base pixel code
If you still need to add the base pixel:
- Open Events Manager and select your pixel (or create one under Connect data sources > Web).
- Choose to set it up and pick the option to install the code manually.
- Copy the base code. It contains your pixel ID and ends with
fbq('track', 'PageView');.
In GTM, add it as a Custom HTML tag with the trigger All Pages, and name it something clear like Meta Pixel - Base. (You can also use a Meta Pixel template from GTM's Community Template Gallery; the steps below work the same way.)
The base code does two jobs: it loads the pixel library and sends a PageView on every page. On its own it does not track leads.
Step 1: Find your thank-you page URL
Submit your own form once and note the address you land on. For example, a home cleaning company's quote form might redirect to:
https://example.com/quote-received/
You need a part of that URL that only the thank-you page has. Here it is /quote-received. Avoid something too short like thank, which might also match a blog post titled "Thank you gifts for clients".
Step 2: Create the Lead tag in GTM
- In GTM, go to Tags > New.
- Name it, for example Meta Pixel - Lead.
- Click Tag Configuration and choose Custom HTML.
- Paste the Lead event code:
<script>
fbq('track', 'Lead');
</script>
You can also send a value with each lead, which helps later when you compare campaigns by lead value. For example, if a lead is worth about 20 USD to the business:
<script>
fbq('track', 'Lead', { value: 20, currency: 'USD' });
</script>
Step 3: Add the thank-you page trigger
- Under the tag, click Triggering and then + to create a new trigger.
- Name it, for example Thank-you page - Quote form.
- Choose Page View as the trigger type.
- Select Some Page Views.
- Set the condition: Page URL (or Page Path) contains
/quote-received. - Save the trigger and the tag.
Now the Lead tag fires only when the thank-you page loads, while the base pixel keeps firing on every page.
Step 4: Make sure the base pixel fires first
The Lead code uses the fbq function, and that function only exists after the base pixel has loaded. If the Lead tag fires first, it does nothing, and you lose leads without any error on the page.
To be safe, use tag sequencing:
- Open the Meta Pixel - Lead tag.
- Go to Advanced Settings > Tag Sequencing.
- Tick Fire a tag before Meta Pixel - Lead fires and choose Meta Pixel - Base.
The base code checks whether the pixel is already loaded, so this does not create a second PageView.
Step 5: Test the Lead event
In GTM Preview
- Click Preview in GTM and enter your site's address.
- Fill in your form and submit it, or open the thank-you page directly for this test.
- In the Tag Assistant window, select the thank-you page load. Under Tags Fired you should see both Meta Pixel - Base and Meta Pixel - Lead.
On other pages, only the base tag should fire.
In Meta Events Manager
- In Events Manager, open your pixel and go to Test Events.
- Enter your website URL and open it from there.
- Reach the thank-you page. You should see PageView and Lead appear.
The Lead event can take a short while to show. If it does not appear, refresh the Test Events window and load the thank-you page again. Meta Pixel Helper should also show both events on the thank-you page.
Step 6: Publish the container
Preview only works for you. Real visitors trigger nothing until you click Submit, add a version name like Meta Lead event on quote form, and Publish.
After publishing, submit the form once more from a normal browser window and check Overview in Events Manager. Real Lead events usually show there within about 20 minutes.
Common mistakes that make lead numbers wrong
The thank-you page can be opened without filling the form
If the thank-you page is linked from the menu, indexed by Google, or bookmarked, anyone who opens it counts as a lead. Keep it reachable only after a submission: no menu links, and set it to noindex in your SEO plugin.
Refreshing the page counts another lead
Each time someone reloads the thank-you page, the trigger fires again. Most people do not refresh, but if your numbers look too high, this is a usual suspect. A form that passes a unique ID to the thank-you page, or a form-submit trigger (below), avoids it.
Several forms share one thank-you page
If the contact form, the quote form and the newsletter sign-up all go to the same thank-you page, every newsletter sign-up becomes a "lead". Give important forms their own thank-you page, or a different URL parameter like ?form=quote, and use that in the trigger.
The pixel is installed twice
A pixel added through GTM and through a plugin or theme setting sends every event twice. Pixel Helper shows duplicate events. Keep one installation.
The form has no thank-you page
Many forms (Contact Form 7, WPForms, Elementor forms) show a success message on the same page instead of redirecting. There is no new URL, so a Page View trigger cannot see the lead. Your options:
- set the form to redirect to a thank-you page after submission (most form plugins have this setting);
- use the form's success event, pushed to the data layer, as a Custom Event trigger in GTM;
- or use an Element Visibility trigger on the success message.
A redirect to a thank-you page is the simplest and most reliable for beginners.
Should you also use the Conversions API?
The browser pixel misses some leads because of ad blockers, browser privacy settings and declined cookie banners. Meta's Conversions API (CAPI) sends the same event from your server, so fewer leads go missing.
If you run both, send the same event name and the same event ID from the browser and the server. Meta then counts the lead once. Without a shared event ID, every lead is counted twice. Many WordPress plugins and server-side GTM setups handle this for you; check Events Manager afterwards to make sure the Lead event shows as deduplicated.
For a small budget, a correctly working pixel Lead event is enough to start. Add CAPI when you spend more and need every conversion to count.
How to use the Lead event in your Meta campaigns
- Create a campaign with the Leads objective.
- Set the conversion location to Website.
- Choose your pixel and the Lead conversion event.
Give the campaign a few days and enough leads before judging it. Meta needs conversion data to learn who is likely to submit your form.
Then compare the cost per lead with what a lead is worth to you. Our guide to forecasting Meta ads leads for a service business shows how to work out a maximum CPL, and Meta ads not performing explains how to find where the funnel breaks.
Frequently asked questions
Do I need to add the base pixel code again for the Lead event?
No. The base pixel should fire once on every page, in its own tag. The Lead tag contains only the fbq('track', 'Lead') line, and fires on the thank-you page after the base tag.
Why does Pixel Helper show the Lead event but Events Manager does not?
Events Manager can take a while to update, and Preview mode events only show in Test Events. If you have not published the GTM container, real visitors do not send the event yet.
Can I track leads without a thank-you page?
Yes, with a custom event from the form or an element visibility trigger on the success message. A thank-you page is still the easiest to set up and test.
What is the difference between a standard event and a custom conversion?
Lead is a standard event that Meta understands everywhere. A custom conversion is a rule you create in Events Manager, for example "a PageView where the URL contains /quote-received". Both can be used for optimisation; the standard event is cleaner and easier to reuse.
Should I use Lead or CompleteRegistration?
Use Lead for enquiries, quotes, bookings and contact forms. Use CompleteRegistration for account sign-ups and registrations, such as a webinar or a free trial.