How to Set Up Meta Pixel With Google Tag Manager
Quick answer: To set up Meta Pixel with Google Tag Manager, copy your Pixel ID from Meta Events Manager, create a Meta Pixel tag in GTM (using a template or custom HTML) that fires on all pages, add a Lead event tag for form success, then test with Meta Pixel Helper and Events Manager before publishing.
Installing the pixel through GTM keeps all your tracking in one place and avoids editing site code each time. Menu names and templates change, so follow the labels you see in each tool.
Before you start
- Admin access to Meta Events Manager and Google Tag Manager
- GTM installed on every page
- Your Pixel (dataset) ID from Events Manager
- No duplicate pixel in a plugin or theme, which would double count events
7 steps
- Copy your Pixel ID from Events Manager.
- Create the base tag in GTM. Use a Meta Pixel template from the Community Template Gallery, or a Custom HTML tag with Meta’s base code.
- Set the trigger to All Pages so PageView fires everywhere.
- Create a Lead event tag that fires only on a successful submission, such as a thank-you page view or a dataLayer event. See how to track form submissions in GA4, since the same trigger works here.
- Add other events if needed, such as a WhatsApp click (Contact) or product view.
- Test in GTM Preview, then check Test Events in Events Manager and the Meta Pixel Helper extension.
- Publish the container and re-test on the live site.
Common mistakes
- Double counting from a plugin and GTM both loading the pixel
- Firing Lead on button clicks, not successful submits
- Forgetting to publish
- Ignoring consent rules for your audience
- Relying only on the browser pixel. Ad blockers and privacy settings can reduce coverage, so consider Meta’s Conversions API with your developer.
If tags aren’t firing, follow our GTM debug guide.
Why it matters for ads
Meta optimises delivery using your events. Broken tracking can cause weak results, such as clicks but no leads. Reliable events also help you judge cost per lead.
Need it done for you? Our Performance Marketing and Website/App Development teams handle tracking setups.
FAQs
Can I install the Meta Pixel with Google Tag Manager?
Yes. Use a template or custom HTML tag and fire it on all pages.
Which Meta Pixel events should I track?
Start with PageView and Lead, then add Contact, ViewContent or Purchase as relevant.
How do I know the pixel is working?
Use Meta Pixel Helper, GTM Preview and Test Events in Events Manager.
Why are my events counted twice?
Probably two installs, such as a plugin plus GTM. Remove one.
Do I need the Conversions API too?
It can improve reliability, especially with browser restrictions. Ask a developer to evaluate it.
Conclusion
Setting up Meta Pixel with Google Tag Manager takes a few steps: base tag, event tags, testing and publishing. Get these right and your campaigns can optimise on real leads. Read more on the Biznex blog.